Bug 60355 - gcc 3.4.1-r2 fails to compile with -fstack-protector and multilib enabled
|
Bug#:
60355
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: AMD64
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: toolchain@gentoo.org
|
Reported By: rich0@gentoo.org
|
|
Component: GCC Porting
|
|
|
URL:
|
|
Summary: gcc 3.4.1-r2 fails to compile with -fstack-protector and multilib enabled
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2004-08-14 12:11 0000
|
gcc 3.4.1-r2 was recently marked stable on amd64. However, it does not compile
for me.
gcc 3.4.1-r2 compile terminates with:
config.status: creating config.h
config.status: executing default-1 commands
Adding multilib support to Makefile in
/var/tmp/portage/gcc-3.4.1-r2/work/gcc-3.4.1/libstdc++-v3
multidirs=32
with_multisubdir=
Running configure in multilib subdirs 32
pwd: /var/tmp/portage/gcc-3.4.1-r2/work/build/x86_64-pc-linux-gnu/libstdc++-v3
Running configure in multilib subdir 32
pwd: /var/tmp/portage/gcc-3.4.1-r2/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.1-r2/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4
.1-r2/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.1-r2/work/build'
make: *** [profiledbootstrap] Error 2
!!! ERROR: sys-devel/gcc-3.4.1-r2 failed.
!!! Function src_compile, Line 688, Exitcode 2
!!! (no error message)
Reproducible: Always
Steps to Reproduce:
Gentoo Base System version 1.4.16
Portage 2.0.50-r9 (gcc34-amd64-2004.1, gcc-3.4.1, glibc-2.3.4.20040808-r0,
2.6.7-gentoo-r11-rf15)
=================================================================
System uname: 2.6.7-gentoo-r11-rf15 x86_64 4
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-g -march=k8 -mtune=k8 -O3 -pipe -fomit-frame-pointer
-fstack-protector"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /home /opt/zetagrid /usr/X11R6/lib/X11/xkb
/usr/kde/2/share/config /usr/kde/3.2/share/config /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/bind /var/freenet /var/qmail/control /var/www"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-g -march=k8 -mtune=k8 -O3 -pipe -fomit-frame-pointer
-fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache gpg nostrip severe userpriv usersandbox"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo
http://mirror.clarkson.edu/pub/distributions/gentoo/
ftp://mirrors.tds.net/gentoo http://gentoo.seren.com/gentoo
ftp://gentoo.mirrors.pair.com/"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X aalib acpi alsa amd64 apache2 apm arts avi berkdb bonobo cdr crypt cups
debug divx4linux dvd encode esd ethereal evo fbcon flac foomaticdb gd gdbm gif
gimpprint glut gnome gpm gtk gtk2 gtkhtml guile imagemagick imap imlib innodb
java jpeg kde kerberos ldap libg++ libwww maildir mikmod motif mozilla mpeg
multilib mysql ncurses nls nptl ntlm oav oggvorbis opengl oss pam pda pdflib
perl php png postgres python qt quicktime ruby samba sasl sdl slang speex spell
ssl tcltk tcpd tetex theora tiff truetype wmf xml2 xmms xv zlib"
can you post the config.log it mentions?
Hmm - there are a few of them:
./build/x86_64-pc-linux-gnu/32/libstdc++-v3/config.log
./build/x86_64-pc-linux-gnu/libstdc++-v3/config.log
./build/gcc/config.log
./build/libiberty/config.log
./build/intl/config.log
./build/config.log
The last is probably the relevant one based on the error output, but it doesn't seem to have any useful details.
config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:581: checking host system type
configure:602: checking target system type
configure:620: checking build system type
configure:675: checking for a BSD compatible install
configure:2844: checking for x86_64-pc-linux-gnu-ar
configure:2877: checking for ar
configure:2916: checking for x86_64-pc-linux-gnu-as
configure:2949: checking for as
configure:2988: checking for x86_64-pc-linux-gnu-dlltool
configure:3021: checking for dlltool
configure:3060: checking for x86_64-pc-linux-gnu-ld
configure:3132: checking for x86_64-pc-linux-gnu-nm
configure:3165: checking for nm
configure:3204: checking for x86_64-pc-linux-gnu-ranlib
configure:3237: checking for ranlib
configure:3276: checking for x86_64-pc-linux-gnu-windres
configure:3309: checking for windres
configure:3348: checking for x86_64-pc-linux-gnu-objcopy
configure:3381: checking for objcopy
configure:3420: checking for x86_64-pc-linux-gnu-objdump
configure:3453: checking for objdump
configure:3502: checking for x86_64-pc-linux-gnu-ar
configure:3535: checking for ar
configure:3574: checking for x86_64-pc-linux-gnu-as
configure:3607: checking for as
configure:3646: checking for x86_64-pc-linux-gnu-dlltool
configure:3679: checking for dlltool
configure:3718: checking for x86_64-pc-linux-gnu-ld
configure:3751: checking for ld
configure:3790: checking for x86_64-pc-linux-gnu-nm
configure:3823: checking for nm
configure:3862: checking for x86_64-pc-linux-gnu-ranlib
configure:3895: checking for ranlib
configure:3934: checking for x86_64-pc-linux-gnu-windres
configure:3967: checking for windres
configure:4034: checking whether to enable maintainer-specific portions of Makefiles
build/x86_64-pc-linux-gnu/32/libstdc++-v3/config.log looks like the config.log
i need
Ah, yes this is much better (I looked at it with tail and missed the error
message halfway up...
Config.log attached
configure:2387: checking for C compiler default output file name
configure:2390: /var/tmp/portage/gcc-3.4.1-r2/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.1-r2/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 -g -march=k8 -mtune=k8 -pipe -fstack-protector -O2 -O2 -g -march=k8 -mtune=k8 -pipe -fstack-protector -O2 conftest.c >&5
/var/tmp/portage/gcc-3.4.1-r2/temp/ccSnuAQ2.o(.text+0xa): In function `main':
/var/tmp/portage/gcc-3.4.1-r2/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/conftest.c:12: undefined reference to `__guard'
/var/tmp/portage/gcc-3.4.1-r2/temp/ccSnuAQ2.o(.text+0x2d):/var/tmp/portage/gcc-3.4.1-r2/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/conftest.c:16: undefined reference to `__stack_smash_handler'
collect2: ld returned 1 exit status
bam. that would be it...
ayanami portcvs # fgrep __stack_smash_handler /lib64/libc.so.6
Binary file /lib64/libc.so.6 matches
ayanami portcvs # fgrep __stack_smash_handler /lib32/libc.so.6
ayanami portcvs #
it seems that the person who built the 32bit libc in stable didnt do so using a gentoo glibc... and so it doesnt have our propolice patch.
this is an amd64 toolchain bug, not a gcc-porting bug. re-assigning...
ayanami portcvs # fgrep __stack_smash_handler /lib32/libc.so.6 Binary file
/lib32/libc.so.6 matches
bam. upgrading to emul-linux-x86-baselibs-1.1-r3 should fix your problem. i've
just marked 1.1-r3 stable, so this bug should be fixed.
Hm, i don't understand how that could happen. I used portage to emerge all emul
libs in a 32bit chroot and built the package from them. *scratching head*
i think brad_mssw built the first emul libs by hand and those were still in
stable.