public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Confused about build proceedure srcdir vs objdir
@ 2001-10-26 22:30 Harry Putnam
  2001-10-27  2:14 ` Florian Weimer
  0 siblings, 1 reply; 14+ messages in thread
From: Harry Putnam @ 2001-10-26 22:30 UTC (permalink / raw)
  To: gcc-help

Setup: Redhat Linux 7.1
       controversial gcc-2.96-85 installed
       from stock RH 7.1 rpm

I'm attempting to install from tar.gz source gcc-3.0.2

The configure instructions at http://gcc.gnu.org/install/configure.html
are just a little to jargon riddled for my inexperienced layman eyes.

>> First, we highly recommend that GCC be built into a separate directory
>> than the sources which does not reside within the source tree. This is
>> how we generally build GCC; building where srcdir == objdir should
>> still work, but doesn't get extensive testing; building where objdir
>> is a subdirectory of srcdir is unsupported.

I'm not sure what an `objdir' refers to or what under gcc-3.0.2 is
considered `srcdir'.  Or how one knows when they are outside the
`tree'.  I don't see the familiar `src' subdirectory.

I'm familiar with the common setup that works like this:

Toplevel/src (and a number of other subdirectories)
Where the build is done in Toplevel like the steps below.

All gnu software that I've built here-to-fore, and that would only
number in the teens, used a procedure like this:

   tar xzvf gnu_packgage-1.tar.gz
   cd gnu_package-1
   ./configure [options]
   make [options]
   make install

From the discussion in the cited web page above, I can't tell if they
are describing something radically different or what.

I followed the above outline.  Is it wrong?

Can someone hand hold a bit here and show brief steps as in the above
build proceedure I described, using actual directory names for a
gcc-3.0.2.tar.gz (or other recent source file)?

My first attemp failed and I posted here the fail messages.  No one
has yet responded.  I have a hunch I'm building this differently than
the recommended proceedure so want to get that nailed down before
discussing any more errors. 

PS-In my previous attempt the `make' process lasted a very long time.
I lost track of the exact amount but well over an hour.
Is that normal on  a 400mhz pc?  

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-26 22:30 Confused about build proceedure srcdir vs objdir Harry Putnam
@ 2001-10-27  2:14 ` Florian Weimer
  2001-10-27 15:10   ` Harry Putnam
  0 siblings, 1 reply; 14+ messages in thread
From: Florian Weimer @ 2001-10-27  2:14 UTC (permalink / raw)
  To: Harry Putnam; +Cc: gcc-help

Harry Putnam <reader@newsguy.com> writes:

> I'm not sure what an `objdir' refers to or what under gcc-3.0.2 is
> considered `srcdir'.  Or how one knows when they are outside the
> `tree'.  I don't see the familiar `src' subdirectory.

'scrdir' and its subdirectories contain the contents of the tarball,
'objdir' is the root of the directory hierarchy in which the build
takes place.

At the beginning, you have to create objdir manually, and invoke the
configure script in srcdir.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-27  2:14 ` Florian Weimer
@ 2001-10-27 15:10   ` Harry Putnam
  2001-10-28  1:13     ` Florian Weimer
  0 siblings, 1 reply; 14+ messages in thread
From: Harry Putnam @ 2001-10-27 15:10 UTC (permalink / raw)
  To: gcc-help

Florian Weimer <fw@deneb.enyo.de> writes:

> Harry Putnam <reader@newsguy.com> writes:
>
>> I'm not sure what an `objdir' refers to or what under gcc-3.0.2 is
>> considered `srcdir'.  Or how one knows when they are outside the
>> `tree'.  I don't see the familiar `src' subdirectory.
>
> 'scrdir' and its subdirectories contain the contents of the tarball,
> 'objdir' is the root of the directory hierarchy in which the build
> takes place.
>
> At the beginning, you have to create objdir manually, and invoke the
> configure script in srcdir.

Very thick skull here.  Can we ditch the jargon?
Sorry that this is sounding like gobs of questions that must seem akin
to shoe tying or toilet chores to you...  I'm not getting what it is
that this `objdir' really does.  Trying to think what details might
lurk behind "build takes place", but drawing blanks.  There must be
basic mechanical things happening here and I'm blinded by the terms or
something.

`objdir' is no doubt an attempt to give a meaningfull clue.  Why `obj'
object.. but what does it mean or do.

I've tried to make this concrete below, and laid out what I think is
being suggested.

ls /exp/gcc-3.0.2.tar.gz
cd /exp/
tar xzvf gcc-3.0.2.tar.gz

=====================================================================
      /exp/gcc-3.0.2/  <== configure, make, make install happen here 
INSTALL/ config/ contrib/ gcc/  i586-pc-linux-gnu/ include/ lib*/ zlib/
=======================================================================

srcdir = gcc-3.0.2 
mkdir build <= `objdir'

                            /exp/
  what happens here => build/     gcc-3.0.2/                     

What happens inside build (in general). What subdirectories might be
under it?  Why is it necessary? 

Do I give special options to ./configure or `make'
to cause things to happen in /exp/build?

OUTLINE of commands:
cd /exp
mkdir build <== any subdirectories required?
tar xzvf gcc-3.0.2.tar.gz
cd gcc-3.0.2 
./configure [...]<= what goes here if anything
                    as regards /exp/build/?

make [...] <== any thing special here regarding /exp/build

I started this project just to have a gcc installed that would work
with swish++.  I understood I needed recent gcc but not 2.96.

I hoped a basic no frills build would be similar to other tools I've
built.  And in fact it seems to have worked.  My first attempt was
with gcc-3.0.1  Which errored out at `make install'.  I had not done
anything special regarding `objdir', so suspected that was my trouble.

Meantime 3.0.2 was released
I've downloaded and tried gcc-3.0.2 now.  Again, with no
special `objdir' preparations.  The ./configure make and make install
went off with no errors.  I did see a number of warnings.  I captured
all the output if I need to show some of it here.

Before changing path and going whole hog, I wondered if I should
retrench or expect problems because of my build process?  Should I
back off and redo the build?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-27 15:10   ` Harry Putnam
@ 2001-10-28  1:13     ` Florian Weimer
  2001-10-28  7:25       ` Harry Putnam
  0 siblings, 1 reply; 14+ messages in thread
From: Florian Weimer @ 2001-10-28  1:13 UTC (permalink / raw)
  To: Harry Putnam; +Cc: gcc-help

Harry Putnam <reader@newsguy.com> writes:

> Very thick skull here.  Can we ditch the jargon?

| We use @var{srcdir} to refer to the toplevel source directory for
| GCC; we use @var{objdir} to refer to the toplevel build/object directory.
 
Why is this description so unclear?  Do you think it would help to
change it to:

| We use @var{srcdir} to refer to the toplevel source directory for
| GCC (populated with the contents of the distribution tarball, or a
| checked-out copy from the GCC CVS); we use @var{objdir} to refer to
| the toplevel build/object directory (in which the files generated
| during the build process will reside).

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-28  1:13     ` Florian Weimer
@ 2001-10-28  7:25       ` Harry Putnam
  2001-10-28  7:37         ` Florian Weimer
  2001-10-29  4:59         ` John Love-Jensen
  0 siblings, 2 replies; 14+ messages in thread
From: Harry Putnam @ 2001-10-28  7:25 UTC (permalink / raw)
  To: Florian Weimer; +Cc: gcc-help

Florian Weimer <fw@deneb.enyo.de> writes:

> Harry Putnam <reader@newsguy.com> writes:
>
>> Very thick skull here.  Can we ditch the jargon?
>
> | We use @var{srcdir} to refer to the toplevel source directory for
> | GCC; we use @var{objdir} to refer to the toplevel build/object directory.
>  
> Why is this description so unclear?  Do you think it would help to
> change it to:

Let me start by saying that it is clear that some extensive effort
went into trying to provide adequate instruction.  And that it is all
there if one pays close attention and reads *all* the INSTALL/*.html
files.

Now in answer to your question: Objdir was meaningless to me. I
suspect it would be to many people.  Calling what is really just a
certain file, an `object' may be the `in term' amongst programmers,
but not at large.

Other aspects of compiling gcc are different than one expects.
The `make bootstrap' part, and building from somewhere besides the toplevel
directory. 

> | We use @var{srcdir} to refer to the toplevel source directory for
> | GCC (populated with the contents of the distribution tarball, or a
> | checked-out copy from the GCC CVS); we use @var{objdir} to refer to
> | the toplevel build/object directory (in which the files generated
> | during the build process will reside).

This doesn't seem much clearer than what is there, but contains more
verbiage.  objdir should disappear altogether in favor of builddir..
or some other name that couples the idea of building with a directory
name. What is currently there:

   We  use  srcdir  to refer to the toplevel source directory for GCC; we
   use objdir to refer to the toplevel build/object directory.

Could be edited a bit to read:

(Keep in mind, that I am still not totally sure of where `builddir' is 
 supposed to be... The help files and posts here seem to indicate it
 should be a subdirectory of gcc-3.0.2, but then there is talk of it
 being `outside' the source tree.. that is confusing)

   We use srcdir to refer to the toplevel directory of GCC package.
   (Top level of unpacked GCC.tar.gz)

   We use `builddir' to refer to a user created sub-directory under
   the top level directory of GCC package.  We recommend running the
   compile from `builddir'.

Most gnu packages include an INSTALL file in the top level directory,
with a simple outline of what steps are needed:
 
They boil down to this:
tar xzvf gnu_package-1.1.tar.gz
cd gnu_package-1.1.tar.gz
./configure
make
make install

The gcc package lacks that file and instead has an INSTALL directory
with a series of *.html instruction files.  I think the package would
benefit by renaming INSTALL to install and keeping a single INSTALL
file with a few basic things like a simplified outline.  And pointers to
the more detailed instruction in ./install/*.html

INSTALL/Configure.html contains an outline but it may be
too brief (and jargonized) to be usefull.

   To configure GCC:
   % mkdir objdir
   % cd objdir
   % srcdir/configure [options] [target]

People familiar with gnu software will expect the traditional INSTALL
and look there for quick instructions.

I mentioned that I am not very experienced in this, but of the 20 or so
gnu packages I have built from source, all followed the above proceedure

Why not follow that tradition?  In this case using 
Paolo Carlinis' useful and clear outline

gunzip gcc-3.0.2.tar.gz

tar xf gcc-3.0.2.tar

mkdir gcc-3.0.2-builddir
cd gcc-3.0.2-builddir
../gcc-3.0.2/configure {options}
 (possible include a brief explanation here of why this unusual step
  is needed -ed HP)

make bootstrap
 (possibly include a brief explanantion here of this unsual option and why
  it is needed -ed HP)

make check
su
make install


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-28  7:25       ` Harry Putnam
@ 2001-10-28  7:37         ` Florian Weimer
  2001-10-28  8:05           ` Harry Putnam
  2001-10-28  8:07           ` John Levon
  2001-10-29  4:59         ` John Love-Jensen
  1 sibling, 2 replies; 14+ messages in thread
From: Florian Weimer @ 2001-10-28  7:37 UTC (permalink / raw)
  To: Harry Putnam; +Cc: gcc-help

Harry Putnam <reader@newsguy.com> writes:

>    We use srcdir to refer to the toplevel directory of GCC package.
>    (Top level of unpacked GCC.tar.gz)
> 
>    We use `builddir' to refer to a user created sub-directory under
>    the top level directory of GCC package.  We recommend running the
>    compile from `builddir'.

Certainly not! objdir/builddir may not be a directory under srcdir,
otherwise the build process will fail in very obscure ways.  (Yes,
I've made this mistake before.)

Any other suggestions for rewording this section?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-28  7:37         ` Florian Weimer
@ 2001-10-28  8:05           ` Harry Putnam
  2001-10-28  8:58             ` lange92
  2001-10-28  8:07           ` John Levon
  1 sibling, 1 reply; 14+ messages in thread
From: Harry Putnam @ 2001-10-28  8:05 UTC (permalink / raw)
  To: gcc-help

Florian Weimer <fw@deneb.enyo.de> writes:

> Harry Putnam <reader@newsguy.com> writes:
>
>>    We use srcdir to refer to the toplevel directory of GCC package.
>>    (Top level of unpacked GCC.tar.gz)
>> 
>>    We use `builddir' to refer to a user created sub-directory under
>>    the top level directory of GCC package.  We recommend running the
>>    compile from `builddir'.
>
> Certainly not! objdir/builddir may not be a directory under srcdir,
> otherwise the build process will fail in very obscure ways.  (Yes,
> I've made this mistake before.)

Yikes, I meant the other way round?  In the configure.html it
appears as if srcdir is a subdirectory of objdir:

   To configure GCC:
   % mkdir objdir
   % cd objdir
   % srcdir/configure [options] [target]

If one were to cd into objdir and call: `srcdir/configure' then srcdir
would need to be a subdir of objdir.  Is this correct? If so, can we put
this more clearly by just saying builddir is a level above gcc-3.0.2?
or:

mkdir working_dir
cd working_dir
tar xzvf /path/to/gcc-3.0.2.tar.gz
gcc-3.0.2/configure [options]
(same as what is now in configure.html but with concreteness added)

Or:
mkdir working_dir
tar zxvf /path/to/gcc-3.0.2.tar.gz
cd working_dir
../gcc-3.0.2/configure [options]

Where working_dir is side by side with gcc-3.0.2

> Any other suggestions for rewording this section?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-28  7:37         ` Florian Weimer
  2001-10-28  8:05           ` Harry Putnam
@ 2001-10-28  8:07           ` John Levon
  2001-10-29  9:25             ` Florian Weimer
  1 sibling, 1 reply; 14+ messages in thread
From: John Levon @ 2001-10-28  8:07 UTC (permalink / raw)
  To: gcc-help

On Sun, Oct 28, 2001 at 04:59:52PM +0100, Florian Weimer wrote:

> Certainly not! objdir/builddir may not be a directory under srcdir,
> otherwise the build process will fail in very obscure ways.  (Yes,
> I've made this mistake before.)

in what circumstances ? I have built with objdir e.g. gcc-3.0/obj
then ../configure, many times, without problems.

regards
john

-- 
"If the software that a company produces isn't reliable, adding a bunch of
'Mother, may I' rules to the language and the code won't fix it."
	- Pete Becker

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-28  8:05           ` Harry Putnam
@ 2001-10-28  8:58             ` lange92
  0 siblings, 0 replies; 14+ messages in thread
From: lange92 @ 2001-10-28  8:58 UTC (permalink / raw)
  To: Harry Putnam; +Cc: gcc-help

On Sun, 28 Oct 2001, Harry Putnam wrote:

> Florian Weimer <fw@deneb.enyo.de> writes:
>
> > Harry Putnam <reader@newsguy.com> writes:
> >
> >>    We use srcdir to refer to the toplevel directory of GCC package.
> >>    (Top level of unpacked GCC.tar.gz)
> >>
> >>    We use `builddir' to refer to a user created sub-directory under
> >>    the top level directory of GCC package.  We recommend running the
> >>    compile from `builddir'.
> >
> > Certainly not! objdir/builddir may not be a directory under srcdir,
> > otherwise the build process will fail in very obscure ways.  (Yes,
> > I've made this mistake before.)
>
> Yikes, I meant the other way round?  In the configure.html it
> appears as if srcdir is a subdirectory of objdir:
>
>    To configure GCC:
>    % mkdir objdir
>    % cd objdir
>    % srcdir/configure [options] [target]
>
> If one were to cd into objdir and call: `srcdir/configure' then srcdir
> would need to be a subdir of objdir.  Is this correct?

No. you can (and probably should) specify scrdir with an absolute path
(one that starts with a /) So the srcdir actually has no relation
to where the objdir is, and vice versa.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-28  7:25       ` Harry Putnam
  2001-10-28  7:37         ` Florian Weimer
@ 2001-10-29  4:59         ` John Love-Jensen
  2001-10-29 10:10           ` Harry Putnam
  1 sibling, 1 reply; 14+ messages in thread
From: John Love-Jensen @ 2001-10-29  4:59 UTC (permalink / raw)
  To: Harry Putnam, gcc-help

Hi Harry,

>Calling what is really just a certain file, an `object' may be the `in
term' amongst programmers, but not at large.

When I talk to my auto-mechanic, and I describe the whatchamawhozits that
rubbing against the thingamabob... I understand why he becomes a bit
confused as to what is the actual problem.  I'm not savvy that the actual
terms are "fan belt" and "radiator grille".  I'm not a car guy.

The computer programmer jargon that you are complaining about *is* the
terminology for those computer programming components.  So you'll have to
excuse using computer programming terminology in regards to computer
programming.

I recommend any introductory computer science book from your local
university.

Sincerely,
--Eljay






^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-28  8:07           ` John Levon
@ 2001-10-29  9:25             ` Florian Weimer
  0 siblings, 0 replies; 14+ messages in thread
From: Florian Weimer @ 2001-10-29  9:25 UTC (permalink / raw)
  To: John Levon; +Cc: gcc-help

John Levon <moz@compsoc.man.ac.uk> writes:

>> Certainly not! objdir/builddir may not be a directory under srcdir,
>> otherwise the build process will fail in very obscure ways.  (Yes,
>> I've made this mistake before.)
> 
> in what circumstances ?

The Ada front end build breaks definitely, and others might as well.
(It's already documented that objdir must not be a subdirectory of
srcdir.)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
  2001-10-29  4:59         ` John Love-Jensen
@ 2001-10-29 10:10           ` Harry Putnam
  0 siblings, 0 replies; 14+ messages in thread
From: Harry Putnam @ 2001-10-29 10:10 UTC (permalink / raw)
  To: gcc-help

"John Love-Jensen" <eljay@adobe.com> writes:

> The computer programmer jargon that you are complaining about *is* the
> terminology for those computer programming components.  So you'll have to
> excuse using computer programming terminology in regards to computer
> programming.

When did building an application become programming?  I must not have
been looking.  All this time I thought the programmers wrote the
sources for us non-programmer slobs.

Jargon is objdir, srcdir
non-programmer slobs, that is, people likely to build the application
provided by a programmer. May not know, or need to know programmer
terminology. 

Scanning the nearest University for programmer books seems a bit far
fetched when the documentation can be written in plain english and be 
just as informative.

I proposed no language including thingamabobs or the like.

> When I talk to my auto-mechanic, and I describe the whatchamawhozits
> that rubbing against the thingamabob... I understand why he becomes
> a bit confused as to what is the actual problem.

Its usually only the novice or poorly trained mechanic that can't
understand a laymans complaint.

> I recommend any introductory computer science book from your local
> university.

I suspect a mechanic sending perspective customers to a school so they
can learn to talk to him may not be such a great boost for his
mechanic business.

Maybe you should rethink your analogy...

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
@ 2001-10-27  8:08 Paolo Carlini
  0 siblings, 0 replies; 14+ messages in thread
From: Paolo Carlini @ 2001-10-27  8:08 UTC (permalink / raw)
  To: reader; +Cc: gcc-help

Hi Harry,

>Oh, thanks Paolo.  I already posted another `amateur hour' message
before seeing your post.
>What is the significance of `bootstrap'? I didn't notice anything about
that at the config help page.
>Now looking at the `build' instructions ... maybe in there.

Do you know the novel "THE ADVENTURES OF BARON MUNCHHAUSEN"?
"Bootstrap" has to do with lifting yourself in the air by pulling your
own boot-straps!

So, for compilers, you have the problem that after your un-tar you have
to compile your own compiler?!? How to do it? Well, you cannot really do
what MUNCHHAUSEN does in the novel (i.e., you *need* a basic working C
compiler to begin with!) but then, after having built a new C compiler,
the boostrap process uses it to build the others (C++, Fortran, Java,
...). In the meanwhile it is also carried out a sanity check of the
system (this is for another time ;-)

I suggest you to always use "make bootstrap" even if you are confident
that you installed compiler could be used right away to build the new
suite (plain "make" does this). This should be also explained in the
docs.

Cheers,
Paolo.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Confused about build proceedure srcdir vs objdir
       [not found] <3BDA7B75.119F779D@unitus.it>
@ 2001-10-27  4:10 ` Harry Putnam
  0 siblings, 0 replies; 14+ messages in thread
From: Harry Putnam @ 2001-10-27  4:10 UTC (permalink / raw)
  To: gcc-help

Paolo Carlini <pcarlini@unitus.it> writes:

> Hi Harry,
>
> in short, "srcdir" is the dir containing the compiler sources that you

[...]

> So, you ends up doing something like this:

Oh, thanks Paolo.  I already posted another `amateur hour' message
before seeing your post.  What is the significance of `bootstrap'? I
didn't notice anything about that at the config help page.  Now
looking at the `build' instructions ... maybe in there.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2001-10-29 10:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-26 22:30 Confused about build proceedure srcdir vs objdir Harry Putnam
2001-10-27  2:14 ` Florian Weimer
2001-10-27 15:10   ` Harry Putnam
2001-10-28  1:13     ` Florian Weimer
2001-10-28  7:25       ` Harry Putnam
2001-10-28  7:37         ` Florian Weimer
2001-10-28  8:05           ` Harry Putnam
2001-10-28  8:58             ` lange92
2001-10-28  8:07           ` John Levon
2001-10-29  9:25             ` Florian Weimer
2001-10-29  4:59         ` John Love-Jensen
2001-10-29 10:10           ` Harry Putnam
     [not found] <3BDA7B75.119F779D@unitus.it>
2001-10-27  4:10 ` Harry Putnam
2001-10-27  8:08 Paolo Carlini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).