Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 82104

Summary: Re-compile of gcc-3.4.3-r1 fails with nptl-glibc
Product: Gentoo Linux Reporter: Karsten Becker <karstenrbecker>
Component: [OLD] GCC PortingAssignee: Please assign to toolchain <gcc-porting>
Status: RESOLVED DUPLICATE    
Severity: major CC: amd64
Priority: High    
Version: 2004.3   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: config.log

Description Karsten Becker 2005-02-15 04:23:01 UTC
----------------------------------------
ERROR MESSAGE
----------------------------------------

updating cache ./config.cache
checking for gxx-include-dir... /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3
checking for --enable-version-specific-runtime-libs... yes
checking for install location... /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating libmath/Makefile
config.status: creating libsupc++/Makefile
config.status: creating src/Makefile
config.status: creating po/Makefile
config.status: creating testsuite/Makefile
config.status: creating scripts/check_survey
config.status: creating scripts/testsuite_flags
config.status: creating config.h
config.status: executing default-1 commands
Adding multilib support to Makefile in /var/tmp/portage/gcc-3.4.3-r1/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-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3
Running configure in multilib subdir 32
pwd: /var/tmp/portage/gcc-3.4.3-r1/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-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 `/var/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 1113, Exitcode 2
!!! make failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.

----------------------------------------
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-1.760_FC3 x86_64)
=================================================================
System uname: 2.6.10-1.760_FC3 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 28 2004, 08:02:56)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r5
virtual/os-headers:  2.6.6-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=x86-64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=x86-64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.inode.at/ http://ftp.easynet.nl/mirror/gentoo/ http://ftp.lug.ro/gentoo/ http://mir.zyrianes.net/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ http://gentoo.prz.rzeszow.pl http://ftp.rhnet.is/pub/gentoo/"
LANG="de_DE.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa apache2 arts avi berkdb bitmap-fonts cdr crypt cups divx4linux doc dvd dvdr emul-linux-x86 encode f77 font-server foomaticdb fortran gdbm gif gtk2 imlib ipv6 ithreads jp2 jpeg kde libg++ libwww lzw lzw-tiff mad mikmod motif mozilla mpeg multilib ncurses nls nptl oggvorbis opengl pam pdflib perl png pthreads python qt quicktime readline samba scanner sdl spell ssl tcpd tiff truetype truetype-fonts type1-fonts unicode usb userlocales xine xml2 xmms xpm xrandr xv zlib linguas_de"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


Reproducible: Always
Steps to Reproduce:
Because the Live CD didn't work for my chipset, I installed 'Fedore Core 3 for  AMD64' for doing the initial stages of installation.

1. First I tried to do a normal 'stage 1'-install, following the instructions in the amd64-handbook. After 'bootstrap.sh' and 'emerge --system' I changed the USE-flags, adding nptl. I recompiled glibc, then started to recompile gcc. And it failed.
2. I am following this guide 'http://forums.gentoo.org/viewtopic.php?t=274968', doing a 'stage 1' from a 'stage 3' install. As mentioned in the guide, I changed the USE-Flags, adding nptl, pthreads and ithreads. I recompiled glibc, then started to recompile gcc. And it failed.
3. I tried several -mcpu, -march and -mtune settings. But nothing worked. For the output above I used -march=x86-64. I also got the same crash with -march=athlon64 and completely without CFLAGS/CXXFLAGS.
Actual Results:  
Re-compiling gcc-3.4.3-r1 with nptl-enabled glibc doesn't work.

Expected Results:  
nptl should work for amd64-platforms.

Because I tried a 'stage 1' before I think I know the solution of this bug: 

http://bugs.gentoo.org/show_bug.cgi?id=82027

Unfortunately I don't know where to post this, so I do it here because it seems
to be a close problem. I already informed the author per mail.

Try using '-march=x86-64' instead of '-march=athlon64'. That was the only 
possibility for me to get through the bootstrap while I was trying the stage 1
install. It seems to me that the compiler internally uses 'x86-64', because if
you omit all CFLAGS, you will see during compilation that it uses
'-march=x86-64'. But actually the translation from the specified 'athlon64' to
internal 'x86-64' seems not to work. So you get a 'cannot create executable'.
Comment 1 Karsten Becker 2005-02-15 05:20:14 UTC
Created attachment 51267 [details]
config.log

/var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3/config.log
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2005-02-15 08:40:44 UTC

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