Summary: | [3.x/hardened] sys-devel/gcc-3.3.6: cannot compile using hardened gcc-3.4.5 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Martin Mokrejš <mmokrejs> |
Component: | [OLD] Development | Assignee: | The Gentoo Linux Hardened Team <hardened> |
Status: | RESOLVED WONTFIX | ||
Severity: | minor | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
gcc-v-strace.log
gcc-dumpspecs-strace.log /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs |
Description
Martin Mokrejš
2006-03-06 11:03:00 UTC
this has been posted in bugzilla a few times, but i'll leave it to hardened to determine what to do with this Martin, if you still have the half-built working directory at the point it failed, could you try: strace -o/tmp/gcc-v-strace.log /var/tmp/portage/gcc-3.3.6/work/build/gcc/xgcc -v (emerge strace if you don't already have it) and attach the output file /tmp/gcc-v-strace.log? Similarly, attach the output of: /var/tmp/portage/gcc-3.3.6/work/build/gcc/xgcc -dumpspecs /var/tmp/portage/gcc-3.3.6/work/build/gcc/xgcc -v and also any files listed by 'gcc -v' mentioned by 'Reading specs from <file>'? Hopefully that may give us a hint as to what's going on. Created attachment 81592 [details]
gcc-v-strace.log
# strace -o/tmp/gcc-v-strace.log /var/tmp/portage/gcc-3.3.6/work/build/gcc/xgcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
Configured with: /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.6 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
#
The strace output is attached.
Created attachment 81593 [details]
gcc-dumpspecs-strace.log
Created attachment 81595 [details]
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
This file is referenced from ./xgcc but beware the file is actually from the already installed gcc-3.6.6 (compiled yesterday using gcc without the hardened option).
# ./xgcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
Configured with: /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.6 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
# pwd
/var/tmp/portage/gcc-3.3.6/work/build/gcc
# gcc-config -l
[1] i686-pc-linux-gnu-3.3.6
[2] i686-pc-linux-gnu-3.3.6-hardened
[3] i686-pc-linux-gnu-3.3.6-hardenednopie
[4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
[5] i686-pc-linux-gnu-3.3.6-hardenednossp
[6] i686-pc-linux-gnu-3.4.5
[7] i686-pc-linux-gnu-3.4.5-hardened *
[8] i686-pc-linux-gnu-3.4.5-hardenednopie
[9] i686-pc-linux-gnu-3.4.5-hardenednopiessp
[10] i686-pc-linux-gnu-3.4.5-hardenednossp
#
Could it be the problem is with the bash shell? I think I have seen some ebuilds of I don't know what packages which break with bash-3.1 ... vrapenec gcc # ./xgcc -B./ -B/usr/i686-pc-linux-gnu/bin/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -fno-stack-protector -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/. -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/config -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-omit-frame-pointer \ > -c /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c -DCRT_BEGIN \ > -o crtbegin.o /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:122: error: syntax error before "TARGET_ATTRIBUTE_WEAK" /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:122: warning: type defaults to `int' in declaration of `TARGET_ATTRIBUTE_WEAK' /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:122: warning: data definition has no type or storage class /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:125: error: syntax error before "TARGET_ATTRIBUTE_WEAK" /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:125: warning: type defaults to `int' in declaration of `TARGET_ATTRIBUTE_WEAK' /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:125: warning: data definition has no type or storage class /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:127: error: syntax error before "TARGET_ATTRIBUTE_WEAK" /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:127: warning: type defaults to `int' in declaration of `TARGET_ATTRIBUTE_WEAK' /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:127: warning: data definition has no type or storage class /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:129: error: syntax error before "TARGET_ATTRIBUTE_WEAK" /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:129: warning: type defaults to `int' in declaration of `TARGET_ATTRIBUTE_WEAK' /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:129: warning: data definition has no type or storage class /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:132: error: syntax error before "TARGET_ATTRIBUTE_WEAK" /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:132: warning: type defaults to `int' in declaration of `TARGET_ATTRIBUTE_WEAK' /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:132: warning: data definition has no type or storage class /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:418:2: #error "What are you doing with crtstuff.c, then?" vrapenec gcc # vrapenec gcc # vrapenec gcc # TM_DEFINES="" \ > HEADERS="ansidecl.h i386/i386.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h defaults.h" XM_DEFINES="POSIX" \ > TARGET_CPU_DEFAULT="" \ > /bin/sh /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/mkconfig.sh tconfig.h vrapenec gcc # ./xgcc -B./ -B/usr/i686-pc-linux-gnu/bin/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -fno-stack-protector -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/. -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/config -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-omit-frame-pointer \ > -c /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c -DCRT_BEGIN \ > -o crtbegin.o vrapenec gcc # ls -la crtbegin.o -rw-r--r-- 1 root root 1672 Mar 7 14:29 crtbegin.o vrapenec gcc # (In reply to comment #5) > This file is referenced from ./xgcc but beware the file is actually from the > already installed gcc-3.6.6 (compiled yesterday using gcc without the hardened > option). hmm; does the xgcc command that failed before still fail? Answer to comment #7: yes, it still fails when run through emerge. But, it seems when run from commandline the very same command works fine, see comment #6 (the last command executed with proper env variables set). I have no idea what was the parent shell command, maybe "make bootstrap" or whatever similar? I could test that if you tell me what emerge has been doing in that moment. Just a guess, but this is probably related to the gcc-3.4 -> 4.x split specs issue. We use the system compiler to build the new spec file, instead of the bootstrapped xgcc. Something 3.4 puts into the spec file is probably screwing up 3.3. Of course, I could be completely wrong and have no idea what I'm talking about :) From talking to Mike, 3.x is no longer supported by toolchain. 3.3.x is not |