public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling instructions unclear gcc-4.3.0
@ 2008-06-06 14:51 Nick England
  2008-06-06 14:57 ` Andrew Haley
  2008-06-06 15:04 ` Eljay Love-Jensen
  0 siblings, 2 replies; 8+ messages in thread
From: Nick England @ 2008-06-06 14:51 UTC (permalink / raw)
  To: gcc-help

the instructions on http://gcc.gnu.org/install/configure.html

say:

To configure GCC:

        % mkdir objdir
        % cd objdir
        % srcdir/configure [options] [target]

However, in the insctutions on building it only says to do a make.

If I do a make in objdir I get "make: *** No targets specified and no
makefile found.  Stop."

If I do a make in the srcdir then I am building in the srcdir, which
the instructions advise against.

What is the correct command to run to build GCC in a non-src dir?
gcc-4.3.0:
(Incidently I get an error message when building in the src dir
Many similar lines saying functions are mulitpliy defined
....
libs/in_unpack_generic.o: In function `putc_unlocked':
/usr/include/bits/stdio.h:87: multiple definition of `putc_unlocked'
.libs/backtrace.o:/usr/include/bits/stdio.h:87: first defined here
.libs/in_unpack_generic.o: In function `fputc_unlocked':
/usr/include/bits/stdio.h:77: multiple definition of `fputc_unlocked'
.libs/backtrace.o:/usr/include/bits/stdio.h:77: first defined here
.libs/in_unpack_generic.o: In function `putchar':
/usr/include/bits/stdio.h:68: multiple definition of `putchar'
.libs/backtrace.o:/usr/include/bits/stdio.h:68: first defined here
.libs/in_unpack_generic.o: In function `getchar_unlocked':
/usr/include/bits/stdio.h:59: multiple definition of `getchar_unlocked'
.libs/backtrace.o:/usr/include/bits/stdio.h:59: first defined here
.libs/in_unpack_generic.o: In function `getc_unlocked':
/usr/include/bits/stdio.h:52: multiple definition of `getc_unlocked'
.libs/backtrace.o:/usr/include/bits/stdio.h:52: first defined here
.libs/in_unpack_generic.o: In function `getchar':
/usr/include/bits/stdio.h:43: multiple definition of `getchar'
.libs/backtrace.o:/usr/include/bits/stdio.h:43: first defined here
.libs/in_unpack_generic.o: In function `vprintf':
/usr/include/bits/stdio.h:36: multiple definition of `vprintf'
.libs/backtrace.o:/usr/include/bits/stdio.h:36: first defined here
collect2: ld returned 1 exit status
make[3]: *** [libgfortran.la] Error 1
)

Help would be apprechiated!

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

* Re: Compiling instructions unclear gcc-4.3.0
  2008-06-06 14:51 Compiling instructions unclear gcc-4.3.0 Nick England
@ 2008-06-06 14:57 ` Andrew Haley
  2008-06-06 15:04 ` Eljay Love-Jensen
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Haley @ 2008-06-06 14:57 UTC (permalink / raw)
  To: Nick England; +Cc: gcc-help

Nick England wrote:
> the instructions on http://gcc.gnu.org/install/configure.html
> 
> say:
> 
> To configure GCC:
> 
>         % mkdir objdir
>         % cd objdir
>         % srcdir/configure [options] [target]
> 
> However, in the insctutions on building it only says to do a make.

You can't build without first configuring; there's nothing to build
until you've defined a configuration.

> If I do a make in objdir I get "make: *** No targets specified and no
> makefile found.  Stop."
> 
> If I do a make in the srcdir then I am building in the srcdir, which
> the instructions advise against.
> 
> What is the correct command to run to build GCC in a non-src dir?

% mkdir objdir
% cd objdir
% srcdir/configure [options] [target]
% make
% make install

Andrew.

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

* Re: Compiling instructions unclear gcc-4.3.0
  2008-06-06 14:51 Compiling instructions unclear gcc-4.3.0 Nick England
  2008-06-06 14:57 ` Andrew Haley
@ 2008-06-06 15:04 ` Eljay Love-Jensen
  2008-06-06 15:05   ` Nick England
  1 sibling, 1 reply; 8+ messages in thread
From: Eljay Love-Jensen @ 2008-06-06 15:04 UTC (permalink / raw)
  To: Nick England, GCC-help

Hi Nick,

> However, in the insctutions on building it only says to do a make.

The configure is step #3.

The build is step #4.

Before you can do a make, you need to do the configure.

And, as per the instructions, do not make your objdir anywhere within the
GCC source code directory.  (You can make it a peer to the source code, so
it's "../objdir" relative to the GCC source.)

You'd configure it by:
../gcc-4.3.0/configure

Or use a full path:
/home/nickengland/gcc-4.3.0/configure

HTH,
--Eljay

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

* Re: Compiling instructions unclear gcc-4.3.0
  2008-06-06 15:04 ` Eljay Love-Jensen
@ 2008-06-06 15:05   ` Nick England
  2008-06-06 15:14     ` Eljay Love-Jensen
  0 siblings, 1 reply; 8+ messages in thread
From: Nick England @ 2008-06-06 15:05 UTC (permalink / raw)
  To: Eljay Love-Jensen; +Cc: GCC-help

Thanks to the helpfull people but it seems I haven't explained myself very well:

I have alrleady done the configure
in objdir ../srcdir/configure

but then I cannot run make from the objdir because the only file in
the objdir is a config.log.


2008/6/6 Eljay Love-Jensen <eljay@adobe.com>:
> Hi Nick,
>
>> However, in the insctutions on building it only says to do a make.
>
> The configure is step #3.
>
> The build is step #4.
>
> Before you can do a make, you need to do the configure.
>
> And, as per the instructions, do not make your objdir anywhere within the
> GCC source code directory.  (You can make it a peer to the source code, so
> it's "../objdir" relative to the GCC source.)
>
> You'd configure it by:
> ../gcc-4.3.0/configure
>
> Or use a full path:
> /home/nickengland/gcc-4.3.0/configure
>
> HTH,
> --Eljay
>
>

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

* Re: Compiling instructions unclear gcc-4.3.0
  2008-06-06 15:05   ` Nick England
@ 2008-06-06 15:14     ` Eljay Love-Jensen
  2008-06-06 15:24       ` Nick England
  0 siblings, 1 reply; 8+ messages in thread
From: Eljay Love-Jensen @ 2008-06-06 15:14 UTC (permalink / raw)
  To: Nick England; +Cc: GCC-help

Hi Nick,

It appears that your configure failed.

The config.log should indicate what failed.

What is your configure line?

What platform are you using?

Did you complete step #1 (prerequisites)?

I presume you completed step #2 (downloading GCC source) or you wouldn't
have gotten to step #3 (configure).

Thanks,
--Eljay

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

* Re: Compiling instructions unclear gcc-4.3.0
  2008-06-06 15:14     ` Eljay Love-Jensen
@ 2008-06-06 15:24       ` Nick England
  2008-06-06 19:44         ` Brian Dessent
  0 siblings, 1 reply; 8+ messages in thread
From: Nick England @ 2008-06-06 15:24 UTC (permalink / raw)
  To: Eljay Love-Jensen; +Cc: GCC-help

Yes, I downloaded the source and dependancies previously to running
the configure.

machine is a x86_64 running SUSE linux

I re-ran the
../gcc-4.3.0/configure --prefix=/foo --with-mpfr=/bar
and this time it generated a makefile in the objdir.

I have no idea why it didn't do so the first time. (I overwrote the
config.log unfortunately) I don't remmeber it ending with an error the
first time though.

however now the build fails when I run "make" with:
make[3]: Entering directory `/home/nwe23/software/gccbuild/gcc'
TARGET_CPU_DEFAULT="" \
        HEADERS="auto-host.h ansidecl.h" DEFINES="" \
        /bin/sh ../../gcc-4.3.0/gcc/mkconfig.sh config.h
TARGET_CPU_DEFAULT="" \
        HEADERS="options.h config/i386/biarch64.h config/i386/i386.h
config/i386/unix.h config/i386/att.h config/dbxelf.h config/elfos.h
config/svr4.h config/linux.h config/i386/x86-64.h
config/i386/linux64.h defaults.h" DEFINES="UCLIBC_DEFAULT=0" \
        /bin/sh ../../gcc-4.3.0/gcc/mkconfig.sh tm.h
gawk -f ../../gcc-4.3.0/gcc/opt-gather.awk
../../gcc-4.3.0/gcc/ada/lang.opt ../../gcc-4.3.0/gcc/fortran/lang.opt
../../gcc-4.3.0/gcc/java/lang.opt
../../gcc-4.3.0/gcc/treelang/lang.opt ../../gcc-4.3.0/gcc/c.opt
../../gcc-4.3.0/gcc/common.opt
../../gcc-4.3.0/gcc/config/i386/i386.opt
../../gcc-4.3.0/gcc/config/linux.opt > tmp-optionlist
/bin/sh ../../gcc-4.3.0/gcc/../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
gawk -f ../../gcc-4.3.0/gcc/opt-functions.awk -f
../../gcc-4.3.0/gcc/opth-gen.awk \
               < optionlist > tmp-options.h
/bin/sh ../../gcc-4.3.0/gcc/../move-if-change tmp-options.h options.h
echo timestamp > s-options-h
TARGET_CPU_DEFAULT="" \
        HEADERS="auto-host.h ansidecl.h" DEFINES="" \
        /bin/sh ../../gcc-4.3.0/gcc/mkconfig.sh bconfig.h
gcc -c   -g -fkeep-inline-functions -DIN_GCC   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -fno-common
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.3.0/gcc
-I../../gcc-4.3.0/gcc/build -I../../gcc-4.3.0/gcc/../include
-I../../gcc-4.3.0/gcc/../libcpp/include -I/home/nwe23/bin/include
-I../../gcc-4.3.0/gcc/../libdecnumber
-I../../gcc-4.3.0/gcc/../libdecnumber/bid -I../libdecnumber    -o
build/errors.o ../../gcc-4.3.0/gcc/errors.c
build/genmodes -h > tmp-modes.h
/bin/sh: build/genmodes: No such file or directory
make[3]: *** [s-modes-h] Error 127
make[3]: Leaving directory `/home/nwe23/software/gccbuild/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/nwe23/software/gccbuild'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/nwe23/software/gccbuild'
make: *** [all] Error 2


2008/6/6 Eljay Love-Jensen <eljay@adobe.com>:
> Hi Nick,
>
> It appears that your configure failed.
>
> The config.log should indicate what failed.
>
> What is your configure line?
>
> What platform are you using?
>
> Did you complete step #1 (prerequisites)?
>
> I presume you completed step #2 (downloading GCC source) or you wouldn't
> have gotten to step #3 (configure).
>
> Thanks,
> --Eljay
>
>

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

* Re: Compiling instructions unclear gcc-4.3.0
  2008-06-06 15:24       ` Nick England
@ 2008-06-06 19:44         ` Brian Dessent
  2008-06-10 12:55           ` Nick England
  0 siblings, 1 reply; 8+ messages in thread
From: Brian Dessent @ 2008-06-06 19:44 UTC (permalink / raw)
  To: Nick England; +Cc: Eljay Love-Jensen, GCC-help

Nick England wrote:

> /bin/sh: build/genmodes: No such file or directory

You get this error if you at some point tried to build in the source
dir.  See comment #6 of PR32272 for an analysis of why:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32272#c6

Start from a cleanly unpacked source dir without any remnants of failed
attempts.

Brian

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

* Re: Compiling instructions unclear gcc-4.3.0
  2008-06-06 19:44         ` Brian Dessent
@ 2008-06-10 12:55           ` Nick England
  0 siblings, 0 replies; 8+ messages in thread
From: Nick England @ 2008-06-10 12:55 UTC (permalink / raw)
  To: GCC-help

Thanks for your help, it seems I had tried to build it previously in
the source folder, and a clean tar-xf of the sources resulted in a
working build. :)

2008/6/6 Brian Dessent <brian@dessent.net>:
> Nick England wrote:
>
>> /bin/sh: build/genmodes: No such file or directory
>
> You get this error if you at some point tried to build in the source
> dir.  See comment #6 of PR32272 for an analysis of why:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32272#c6
>
> Start from a cleanly unpacked source dir without any remnants of failed
> attempts.
>
> Brian
>

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

end of thread, other threads:[~2008-06-10 12:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-06 14:51 Compiling instructions unclear gcc-4.3.0 Nick England
2008-06-06 14:57 ` Andrew Haley
2008-06-06 15:04 ` Eljay Love-Jensen
2008-06-06 15:05   ` Nick England
2008-06-06 15:14     ` Eljay Love-Jensen
2008-06-06 15:24       ` Nick England
2008-06-06 19:44         ` Brian Dessent
2008-06-10 12:55           ` Nick England

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).