Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72379 - gcc-3.4.3 fails to compile
Summary: gcc-3.4.3 fails to compile
Status: RESOLVED DUPLICATE of bug 73729
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
: 75116 78171 78772 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-24 12:00 UTC by ivo welch
Modified: 2005-07-17 13:06 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivo welch 2004-11-24 12:00:19 UTC
checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.3/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make: *** [configure-target-libstdc++-v3] Error 1

!!! ERROR: sys-devel/gcc-3.4.3 failed.
!!! Function gcc_do_make, Line 1211, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


# gcc -v

Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.2/specs
Configured with: /var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.2/include/g++-v3 --host=x86_64-pc-linux-gnu --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-shared --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --with-gnu-ld --enable-threads=posix --disable-multilib --disable-libgcj --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.2  (Gentoo Linux 3.4.2-r2, ssp-3.4.1-1, pie-8.7.6.5)


Reproducible: Always
Steps to Reproduce:
1. emerge --rsync
2. emerge gcc libtool
3.

Actual Results:  

error

Expected Results:  

no error ;-)


# emerge info
Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.1,
glibc-2.3.4.20040808-r1, 2.6.7-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.7-gentoo-r14 x86_64 4
Gentoo Base System version 1.4.16
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-pipe -O2"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS=" http://mirror.clarkson.edu/pub/distributions/gentoo/
ftp://gentoo.mirrors.pair.com/ http://ftp.heanet.ie/pub/gentoo/
ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aalib acpi alsa arts berkdb bitmap-fonts bonobo cdr crypt cups
directfb esd f77 fam flac foomaticdb fortran g77 gdbm ggi gif gnome gphoto2 gpm
gtk gtkhtml guile imagemagick imlib ipv6 java jp2 jpeg junit kde ldap libwww lzw
lzw-tiff mad mikmod motif mozilla multilib mysql nas ncurses nls oggvorbis
opengl oss pam pdflib perl png postgres python qt readline ruby scanner sdl
slang snmp ssl tcltk tcpd tetex tiff truetype ungif usb userlocales xml xml2
xmms xpm xrandr xv zlib"
Comment 1 Karol Wojtaszek (RETIRED) gentoo-dev 2004-11-24 12:51:45 UTC
Please, reemerge portage to recompile sandbox and then try gcc-3.4.3.
Comment 2 ivo welch 2004-11-24 18:12:30 UTC
do you mean

  # emerge portage
  # emerge --update gcc

if so, the error remains.

regards, /iaw
Comment 3 Karol Wojtaszek (RETIRED) gentoo-dev 2004-11-25 13:37:44 UTC
OK then, please attach content of config.log from directory in which gcc compile fails
Comment 4 ivo welch 2004-11-26 07:13:35 UTC
This stuff is so long that I decided to put the building tree on a webserver:

http://welch.econ.brown.edu/temp/gcc/

the hierarchy includes all config.log files.  let me know when you are done with it, so that I can delete it again.

hope this helps.

regards,

/iaw
Comment 5 Karol Wojtaszek (RETIRED) gentoo-dev 2004-11-26 08:19:31 UTC
The problem log is hire:
build/x86_64-pc-linux-gnu/32/libstdc++-v3/config.log

Please, add to your CFLAGS -march=athlon64 and `emerge portage =gcc-3.4.3`
Comment 6 ivo welch 2004-11-26 09:23:49 UTC
thanks, karol.  for my education: my /etc/make.globals file has

CFKAG= "-march=x86-64 -O2 -pipe"

did I always have this wrong, or is this obsoleted?

should -march=amd64 replace x86-64 in make.globals?

/iaw
Comment 7 Karol Wojtaszek (RETIRED) gentoo-dev 2004-11-26 14:17:39 UTC
I don't know why your's libsandbox.so library is broken. And this is why i want you to add march to your CFLAGS.
Comment 8 Travis Tilley (RETIRED) gentoo-dev 2004-11-26 15:50:43 UTC
sorry for the delay, I just got to this bug.

FEATURES="-sandbox" USE="multilib" emerge gcc portage

this will fix your issue entirely. the 32bit sandbox is only compiled if using a multilib gcc... multilib gcc cant compile with sandbox enabled if you dont have a 32bit sandbox. it's a bit of a chicken/egg issue.

please ignore the previous statements about -march, that isnt a problem whatsoever.

feel free to re-open this bug if that doesnt fix your problem.
Comment 9 ivo welch 2004-11-26 16:23:51 UTC
hi travis:  very much on the money.  It solved the problem.  very impressive, too.  is there anything you don't know?  (I do wonder what you do for a living.)

thanks a lot for this fix.  is there a way that this can be integrated into the ebuild file, and/or that upon such a failure, a short instructional message appears?

regards,

/iaw
Comment 10 Pat Suwalski 2004-12-22 12:21:36 UTC
I can confirm that this solved the same issue for me on amd64.
Comment 11 Pat Suwalski 2004-12-22 12:26:08 UTC
*** Bug 75116 has been marked as a duplicate of this bug. ***
Comment 12 Benjamin 2004-12-27 14:22:42 UTC
The command FEATURES="-sandbox" USE="multilib" emerge gcc portage was my friend. After gcc-3.4.3 was properly installed, I just need to set the default gcc using gcc-config.

Thx,
Ben
Comment 13 Wayne 2005-01-04 06:46:54 UTC
After running

FEATURES="-sandbox" USE="multilib" emerge gcc portage

it still bombs with the following errors.

-fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  "  \
  MULTILIB_CFLAGS="" T= crtend.o
make[3]: Entering directory `/var/tmp/portage/libstdc++-v3-3.3.4/work/build/gcc'
gcc   -O2 -pipe -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long-DHAVE_CONFIG_H -DGENERATOR_FILE  -o genconfig \
  genconfig.o rtl.o read-rtl.o bitmap.o ggc-none.o gensupport.o insn-conditions.o print-rtl1.o \
    errors.o ../libiberty/libiberty.a
genconfig.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make[3]: *** [genconfig] Error 1
make[3]: Leaving directory `/var/tmp/portage/libstdc++-v3-3.3.4/work/build/gcc'
make[2]: *** [crtend.o] Error 2
make[2]: *** Waiting for unfinished jobs....
gcc   -O2 -pipe -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long-DHAVE_CONFIG_H -DGENERATOR_FILE  -o genconfig \
  genconfig.o rtl.o read-rtl.o bitmap.o ggc-none.o gensupport.o insn-conditions.o print-rtl1.o \
    errors.o ../libiberty/libiberty.a
./genconfig /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/gcc/config/i386/i386.md > tmp-config.h
/bin/sh /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/gcc/move-if-change tmp-config.h insn-config.h
insn-config.h is unchanged
echo timestamp > s-config
make[3]: Leaving directory `/var/tmp/portage/libstdc++-v3-3.3.4/work/build/gcc'
make[2]: Leaving directory `/var/tmp/portage/libstdc++-v3-3.3.4/work/build/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/var/tmp/portage/libstdc++-v3-3.3.4/work/build/gcc'
make: *** [all-gcc] Error 2

!!! ERROR: sys-libs/libstdc++-v3-3.3.4 failed.
!!! Function src_compile, Line 230, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

Anyone got any ideas?

gcc-v

eading specs from /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/specs
Configured with: /var/tmp/portage/gcc-3.3.4-r1/work/gcc-3.3.4/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/info --enable-shared --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77 --enable-threads=posix --enable-long-long --disable-checking --disable-libunwind-exceptions --enable-cstdio=stdio--enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/include/g++-v3--with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --disable-multilib --enable-__cxa_atexit --enable-clocale=generic
Thread model: posix
gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)

emerge info
Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r1 x86_64 4
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -march=athlone64"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=athlone64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa apache2 arts avi berkdb bitmap-fonts bzlib calendar cdb cdr crypt cups dbase directfb divx4linuxdoc dvd dvdr emacs encode esd exif f77 fam flac flash foomatic foomaticdb fortran gdbm gif gimpprint gphoto2 gpm gps gstreamer gtk gtk2 imagemagick imlib ipv6 java jp2 jpeg junit kde kerberos ldap libwww lzw lzw-tiff mad mikmod mime motif mozilla mpeg mpi msn multilib mysql ncurses nls ntpl oav odbc oggvorbis opengl oss pam pdflib perl php png posix postgres ppds python qt quicktime readline samba scanner sdl slang spell ssl tcltk tcpd threads tiff truetype truetype-fonts type1-fonts usb userlocales videos xml xml2 xmms xpm xprint xrandr xv zlib"

Comment 14 Wayne 2005-01-04 12:39:08 UTC
ooooh, removed -march=athlon64 and it worked...
Comment 15 nick moore 2005-01-16 16:08:14 UTC
last night i got the same exact error as the bug report shows on a brand new install on amd64 i followed the installation directions to the letter. i tried everything listed here to fix it. i decided to reinstall again i did everything the same except install the portage snapshot that the installation directions called for which i did not do, orginally i had used the 01/14/05 snapshot. my install went completely fine after the install i did my normal emerge -u world afterwards and it did not hang on gcc 3.4.3 like it had been doing. i do not know if removing the snapshot fixed i just felt that i should share my findings. 
Comment 16 ivo welch 2005-01-16 18:21:54 UTC
same here---yesterday night, one of my two amd64 machines decided to give up on me in the gcc update... I do not have the option of reinstalling, so does someone know how to fix this?

regards, /iaw


$ FEATURES="-sandbox" USE="multilib" emerge gcc
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/tmp/portage/gcc-3.4.3-r1/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.3-r1 failed.
!!! Function gcc_do_make, Line 1035, Exitcode 2
!!! make failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.




Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r12 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r12 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1-r2
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS=" http://mirror.clarkson.edu/pub/distributions/gentoo/ ftp://gentoo.mirrors.pair.com/ http://ftp.heanet.ie/pub/gentoo/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aalib acpi alsa arts berkdb bitmap-fonts bonobo cdr crypt cups curl directfb dvd dvdr emul-linux-x86 esdf77 fam fbcon flac font-server foomaticdb fortran g77 gdbm ggi gif gnome gphoto2 gpm gtk gtkhtml guile imagemagick imlib ipv6 java jp2 jpeg junit kde ldap libwww lzw lzw-tiff mad mikmod motif mozilla mpeg multilib mysql nas ncurses nlsoggvorbis opengl oss pam pdflib perl png postgres python qt readline ruby scanner sdl slang snmp ssl tcltk tcpd tetextiff truetype truetype-fonts type1-fonts ungif usb userlocales xml xml2 xmms xpm xrandr xv zlib"


Comment 17 Andy Wang 2005-01-17 00:24:11 UTC
I was able to solve the problem by:
USE="-multilib" emerge gcc
FEATURES="-sandbox" USE="multilib" emerge gcc portage

The key is to re-emerge gcc without multilib support.  My current gcc was emerge'd with multilib and apparently it was causing problems building the new gcc.
Comment 18 ivo welch 2005-01-17 07:07:35 UTC
USE="-multilib" emerge gcc

still fails on my system.

checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/tmp/portage/gcc-3.4.3-r1/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.3-r1 failed.
!!! Function gcc_do_make, Line 1035, Exitcode 2
!!! make failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.

Comment 19 SpanKY gentoo-dev 2005-01-20 18:30:01 UTC
*** Bug 78171 has been marked as a duplicate of this bug. ***
Comment 20 SpanKY gentoo-dev 2005-01-20 18:30:05 UTC
*** Bug 78772 has been marked as a duplicate of this bug. ***
Comment 21 Blu3 2005-01-27 10:27:40 UTC
I hate to say it, but we have to be talking about different bugs.

none of the listed solutions works.  the only way i can compile gcc is with -multilib which naturally limits my options for compiling other things on my computer.

Adding multilib support to Makefile in /var/tmp/portage/gcc-3.4.3.20050110/work/gcc-3.4.3/libstdc++-v3
multidirs=32
with_multisubdir=
Running configure in multilib subdirs 32
pwd: /var/tmp/portage/gcc-3.4.3.20050110/work/build/x86_64-pc-linux-gnu/libstdc++-v3
Running configure in multilib subdir 32
pwd: /var/tmp/portage/gcc-3.4.3.20050110/work/build/x86_64-pc-linux-gnu
mkdir 32
configure: creating cache ./config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.3.20050110/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3.20050110/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.3.20050110/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.3.20050110 failed.
!!! Function gcc_do_make, Line 1074, Exitcode 2
!!! make failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.


Scott ~ # emerge info
Portage 2.0.51-r15 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10 x86_64)
=================================================================
System uname: 2.6.10 x86_64 AMD Opteron(tm) Processor 148
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Dec 28 2004, 13:41:49)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r3
virtual/os-headers:  2.6.8.1-r3
ACCEPT_KEYWORDS="~amd64"
AUTOCLEAN="yes"
CFLAGS="-fPIC -mtune=opteron -march=opteron -O2 -pipe -fexpensive-optimizations -ffast-math -mfpmath=sse,387 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-fPIC -mtune=opteron -march=opteron -O2 -pipe -fexpensive-optimizations -ffast-math -mfpmath=sse,387 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks keepwork sandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 GAPING_SECURITY_HOLE X X509 a52 aac acpi acpi4linux aim alsa aotuv apache2 arts artswrappersuid artworkextra atm audiofile avantgo avi bluetooth bzip2 bzlib cairo caps cdda cddb cdf cdio cdparanoia cdr chipcard chroot cle266 codecs crypt css cups curl curlwrappers dba dbx devfs26 dga dio distcache divx4linux djbfft dnd dts dv dvb dvd dvdr dvdread dxr3 edl emoticon emul-linux encode erandom escreen esd ethereal exif extensions faac faad fam fame fax ffmpeg fftw flac flash flexresp fmod font-server foomaticdb fpx freetts freetype ftp ftruncate gd gdbm geoip gif gimp gimpprint glade glgd glitz glut gmail gmp gnokii gphoto2 gpm gps graphviz gs gsl gstreamer gtk gtk2 gtkhtml hal hbci hdf hdf5 high-ints i8x0 icq ide idea idled ieee1394 imagemagick imap imlib imlib2 iodbc ipv6 irda irmc j2ee jabber jack jack-tmpfs java javacomm javamail javascript jbig jp2 jpeg jpeg2k junit kadu-modules kadu-voice kcal kde kdepim koffice-plugin lcms libgd libgda libsamplerate libwww lirclive lm_sensors ltsp lzo lzw lzw-tiff mad mbox mbrola mcal md5sum memlimit mhash mikmod mime mimencode ming mixer mjpeg mmap mng mnogosearch monkey motif mozcalendar mozdevelop mozilla moznoirc mozp3p mozsvg mp3 mpeg mpeg2 mpeg4 mpi mplayer mpm-leader mpm-metux mpm-peruser mpm-prefork mpm-threadpool mpm-worker msdav msn multicall multilib mythtv nagios-dns nagios-ntp nagios-ping nagios-ssh nas ncurses netcdf network nls no-old-linux nopri nozaptel nptl nptlonly ntlm nvidia nviz oav odbc offensive ofx ogg oggvorbis openal opengl operanom2 oscaross pam parse-clocks pcap pcntl pcre pda pdflib perl pg-hier pg-vacuumdelay php pic plotutils png pnp portaudio posix postgres ppds pthreads python readline real recode remote rtc samba scanner sdl serial session sharedsharedmem slang slp smime sms sndfile snmp snortsam soap sockets socks5 speex spell spl ssl stats stream svg sysvipc t1lib tcpd tga theora threads thumbnail tidy tiff timidity tokenizer transcode transparent-proxy truetype truetype-fonts type1 type1-fonts underscores usb userlocales uudeview v4l v4l2 vcd vidix vorbis wddx wifi wmf xface xgetdefault xine xinerama xml xml2 xmlrpc xmms xosd xpm xprint xrandr xscreensaver xv xvid xvmc yahoo yaz yv12 zlib zvbi"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS

Don't get onto me about CFLAGS because changing them to "-O2" doesn't solve jack.
Comment 22 Blu3 2005-01-27 10:30:19 UTC
configure:2390: checking for C compiler default output file name
configure:2393: /var/tmp/portage/gcc-3.4.3.20050110/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3.20050110/
work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-
gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32 -O2 -fPIC -mtune=opteron -march=opteron -O2 -p
ipe -O2 -fPIC -mtune=opteron -march=opteron -O2 -pipe  conftest.c  >&5
/var/tmp/portage/gcc-3.4.3.20050110/work/build/gcc/32/libgcc.a: could not read symbols: Archive has no index;
run ranlib to add one
collect2: ld returned 1 exit status
configure:2396: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2435: error: C compiler cannot create executables
Comment 23 Andrew Kruse 2005-01-27 10:52:34 UTC
I agree. None of the listed solutions in the other threads worked for me either. This has got to be something seperate.
Comment 24 Blu3 2005-01-30 12:17:34 UTC
readers, see bug 57280, quite probably the real root of this quagmire...solved back in september :P
Comment 25 Daniel Karlsson 2005-02-03 19:29:53 UTC
I managed to rebuild it with: USE="bootstrap build" FEATURES="-sandbox" emerge --oneshot --nodeps gcc
Comment 26 Joe Womack 2005-02-16 23:30:28 UTC
I ran into this bug when I changed my use flags.  After I changed my use flags, I ran the command:  emerge --update --deep --newuse --verbose world

Addition comment #8 fixed the problem and I have since added the multilib to my use flags.

My question is:  
Is there a problem with one of the ebuilds?  (gcc and/or portage)
If the problem is with the 32bit sandbox, why would I have one if I did not have the multilib defined in my use flags  (i.e. pure 64-bit system)
Comment 27 Joe Womack 2005-02-16 23:34:16 UTC
# emerge info
Portage 2.0.51-r15 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-
r0, 2.6.9-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r14 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 16 2005, 00:17:11)
]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.9.4, 1.6.3, 1.7.9-r1, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X1
1/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://mirror.datapipe.net/gentoo http:
//gentoo.ccccom.com http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d acpi aim alsa apache2 bash-completion berkdb bitmap-fonts bzl
ib cdr crypt cups dbm dbx doc dvd fastcgi fbcon flatfile font-server foomaticdb
ftp gd gdbm gif gnome gphoto2 gpm gps gtk gtk2 icq imap inifile innodb iodbc ipv
6 java javascript jikes joystick jp2 jpeg junit kde kerberos ldap libg++ libwww
lm_sensors lzw lzw-tiff mbox milter mime mmap motif mozilla mp3 mpeg msn mssql m
ultilib mysql mysqli ncurses nls ntpl odbc opengl oscar oss pam pcre pdflib perl
 php png posix postgres ppds python qt quicktime readline samba sasl scanner ses
sion sharedmem simplexml skey slang snmp soap sockets spell spl ssl symlink tclt
k tcpd tetex threads tidy tiff tokenizer truetype truetype-fonts type1-fonts usb
 userlocales vhosts xml xml2 xmlrpc xmms xpm xrandr xsl xv zeo zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

Comment 28 Peter Palm 2005-02-18 11:09:33 UTC
Right, after exactly applying the described workaround, gcc and glibc
compiles now. But, just all other packages refuse to compile with the same
error (for example "nano"):


=== # emerge --newuse --oneshot nano ===

Calculating dependencies ...done!
>>> emerge (1 of 1) app-editors/nano-1.3.4 to /
>>> md5 src_uri ;-) nano-1.3.4.tar.gz
>>> Unpacking source...
>>> Unpacking nano-1.3.4.tar.gz to /var/tmp/portage/nano-1.3.4/work
 * Applying 1.3.4-nanobrack.patch ...                                     [ ok ]
>>> Source unpacked.
 * econf: updating nano-1.3.4/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating nano-1.3.4/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib --bindir=/bin --enable-color --enable-multibuffer --enable-nanorc --enable-spell --disable-justify --disable-debug --enable-nls
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/nano-1.3.4/work/nano-1.3.4/config.log

!!! ERROR: app-editors/nano-1.3.4 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.


Here are some informations about my system and settings: 

=== emerge --info ===

Portage 2.0.51-r15 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r14 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 18 2005, 08:58:07)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.4_p6, 1.8.5-r3, 1.5, 1.7.9-r1, 1.9.4, 1.6.3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=amd64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=amd64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac acpi alsa apm arts audiofile avi berkdb bitmap-fonts calendar cdr crypt cups curl divx4linux doc dvd dvdr dvdread encode exif f77 fam fbcon flac font-server foomaticdb fortran gdbm gif gstreamer imagemagick imap imlib ipv6jp2 jpeg kde libwww lzw lzw-tiff mad maildir mime motif mozilla mpeg multilib mysql ncurses nls nptl odbc oggvorbis opengl oss pam pda pdflib perl png posix ppds python qt quicktime readline samba sdl sndfile sox speex spell ssl svg tcpd theora threads tidy tiff truetype truetype-fonts type1-fonts unicode usb userlocales wmf xine xinerama xml xml2 xmms xpm xprint xrandr xv xvid zlib linguas_de"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


=== # gcc --version ===

gcc (GCC) 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Best regards,

Peter
Comment 29 Radek "rush" Senfeld 2005-02-19 16:32:07 UTC
I had exactly the same problem while bootstraping brand new AMD64 box. None solution helped. But I realized that it's caused by portage and sandbox. Don't know why but the newer versions of portage don't install libsandbox.so into /lib32. So I tried older one and succeded.

emerge --nodeps \=portage-2.0.51-r3
Comment 30 Simon Strandman 2005-02-20 12:08:29 UTC
@Peter:

Amd64 is not a valid -march option. Change it to -march=athlon64 and it should work.
Comment 31 Radek "rush" Senfeld 2005-02-20 16:56:00 UTC
I know, I'm using -march=athlon64.. Look at the end of this bug-thread ( http://bugs.gentoo.org/show_bug.cgi?id=75236 ) - it seems like the solution of this problem..
Comment 32 SpanKY gentoo-dev 2005-03-21 17:24:47 UTC

*** This bug has been marked as a duplicate of 73729 ***