Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68799 - GCC_SPECS isnt at any point unset once set by gcc-config
Summary: GCC_SPECS isnt at any point unset once set by gcc-config
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 68395 68919 70184 70437 70456 73264 73305 75165 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-25 03:21 UTC by Andrew V. Plekhanoff
Modified: 2009-12-13 14:04 UTC (History)
15 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 Andrew V. Plekhanoff 2004-10-25 03:21:25 UTC
I try to setup gentoo with USE="ntpl userlocales", CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe".
Bootstrap is ok, but emerge system fails at gcc-3.4.2-r2:

mkinstalldirs='/bin/sh /var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/gcc/mkinstalldirs' \
  /bin/sh mklibgcc > tmp-libgcc.mk
xgcc: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.2/specs: No such file or directory
mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="ansidecl.h" DEFINES="" \
/bin/sh /var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/gcc/mkconfig.sh tconfig.h
/var/tmp/portage/gcc-3.4.2-r2/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.2-r2/work/build/gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -fno-stack-protector-all -O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I/var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/gcc -I/var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/gcc/. -I/var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/gcc/../include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer \
   -c /var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
xgcc: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.2/specs: No such file or directory
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.2-r2/work/build/gcc'
make: *** [all-gcc] Error 2

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

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.7-gentoo-r14 i686)
=================================================================
System uname: 2.6.7-gentoo-r14 i686
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-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/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apm arts avi berkdb bitmap-fonts crypt cups encode f77 foomaticdb gdbm
gif gnome gpm gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mpeg
ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime
readline sdl slang
spell ssl svga tcpd truetype x86 xml2 xmms xprint xv zlib"
Comment 1 Travis Tilley (RETIRED) gentoo-dev 2004-10-26 14:58:31 UTC
is this from inside a chroot?
Comment 2 Travis Tilley (RETIRED) gentoo-dev 2004-10-26 20:44:43 UTC
*** Bug 68919 has been marked as a duplicate of this bug. ***
Comment 3 Andrew V. Plekhanoff 2004-10-27 10:37:03 UTC
Yes, it is from chroot of bilding system.

Also I try "emerge sync" to -r3 and emerge again: 
it ends with same exact error.

Comment 4 Andrew V. Plekhanoff 2004-10-27 10:45:14 UTC
Interest thing: I have working gcc-3.4.2-r2 on system, it was upgraded from 3.4.1 or 3.4.2-r1.
Comment 5 Jory A. Pratt 2004-10-27 19:21:55 UTC
Andrew if you read the thread you will see this is during an install all the tarballs are using gcc 3.3 this is only a problem during a chroot a normal system appears to update without failure.
Comment 6 Travis Tilley (RETIRED) gentoo-dev 2004-10-27 23:28:34 UTC
if you just run "unset GCC_SPECS" does that fix the problem? if so, then it would be a known bug that should be 'fixed' now that we dont specify GCC_SPECS in the gcc configs by default... but to get that fix without re-emerging anything just edit the main config in /etc/env.d/gcc/ to remove any mention of GCC_SPECS.

if you use a specs-specific config (like, say, x86_64-pc-linux-gnu-3.4.2-hardened), for now you will have to unset GCC_SPECS after chrooting to clear that variable from your environment.
Comment 7 Jory A. Pratt 2004-10-28 18:49:44 UTC
this does fix the problem maybe it is time to get the stage packages updated?
Comment 8 Travis Tilley (RETIRED) gentoo-dev 2004-10-28 19:14:45 UTC
at the moment the only stable that should worry is amd64 stable, and our 2004.3 testing stages already have the fix (unless i misunderstood jhuebel).
Comment 9 Jory A. Pratt 2004-10-28 19:54:55 UTC
if the 2004.3 already have the fix why aren't they up under experimental so we can get it tested an moved out to stable? That would make more sence then having a bug report for something as stupid as this wouldn't it?
Comment 10 Andrew V. Plekhanoff 2004-10-29 08:51:56 UTC
With unset GCC_SPECS gcc-3.4.2-r3 emerges successfilly. 
Thanks for help.
Comment 11 Travis Tilley (RETIRED) gentoo-dev 2004-10-29 12:18:18 UTC
*** Bug 68395 has been marked as a duplicate of this bug. ***
Comment 12 Travis Tilley (RETIRED) gentoo-dev 2004-11-08 10:24:37 UTC
*** Bug 70437 has been marked as a duplicate of this bug. ***
Comment 13 Travis Tilley (RETIRED) gentoo-dev 2004-11-08 10:25:19 UTC
*** Bug 70184 has been marked as a duplicate of this bug. ***
Comment 14 Martin Hudec 2004-11-09 00:59:35 UTC
With my gcc-3.4.3 emerged, I was unable to compile anything.

I have set GCC_SPECS in /etc/env.d/gcc/i686-pc-linux-gnu-3.4.3 to:
GCC_SPECS="/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs"

rerun gcc-config and source /etc/profile et voila :)
Comment 15 Phil Richards 2004-11-09 01:07:38 UTC
Adding myself to Cc list (since I was on Cc for bug #70437 which has now been closed as a duplicate).

Isn't this bug going to affect all ~x86 people who upgrade from 3.4.2* to 3.4.3?
If so, the ebuild either needs masking or fixing - leaving it in its current
state is going to cause quite a lot of unnecessary grief...

Phil
Comment 16 Caleb Tennis (RETIRED) gentoo-dev 2004-11-09 04:54:28 UTC
*** Bug 70456 has been marked as a duplicate of this bug. ***
Comment 17 Travis Tilley (RETIRED) gentoo-dev 2004-11-09 08:55:14 UTC
this is going to effect some users who migrate, I stopped setting the GCC_SPECS variable for the default config shortly after it was pointed out to me that it's never unset.

martin: you might want to remove that and type "unset GCC_SPECS" instead.

vapier: perhaps we should set a different variable in the gcc configs and have the wrapper translate that to GCC_SPECS before calling gcc? or some other gcc-config voodoo?
Comment 18 SpanKY gentoo-dev 2004-12-02 18:41:31 UTC
gcc-config-1.3.7-r3 now performs sanity checking on GCC_SPECS (makes sure it exists) before exporting it into the env
Comment 19 Marien Zwart (RETIRED) gentoo-dev 2004-12-03 12:20:57 UTC
The current test seems to check for a sane environment value for GCC_SPECS. However right before that it loops over all profiles, sourcing them all. And since my "default" profile doesn't set GCC_SPECS at all (not to "" or anything, it's just not in there at all) GCC_SPECS gets set in the grand loop, then never unset, and makes it into /etc/env.d/05gcc no matter what profile I choose. Now I know this hardened thing can be nice and everything, but I still want it off when I choose to :)

I haven't tried remerging gcc yet. Is that supposed to fix it by setting GCC_SPECS to something in the default non-hardened profile? or is this a bug that should be handled in gcc-config, possibly by unsetting GCC_SPECS (and possibly other things too) before sourcing things?
Comment 20 SpanKY gentoo-dev 2004-12-03 13:39:32 UTC
very true

1.3.7-r4 unsets GCC_CONFIG before sourcing the one the user has chosen
Comment 21 SpanKY gentoo-dev 2004-12-03 19:53:26 UTC
*** Bug 73264 has been marked as a duplicate of this bug. ***
Comment 22 SpanKY gentoo-dev 2004-12-03 23:15:09 UTC
*** Bug 73305 has been marked as a duplicate of this bug. ***
Comment 23 Stephane Loeuillet 2004-12-04 07:23:57 UTC
using gcc-config 1.3.7-r4 with only gcc-3.4.3-r1 (just emerged both), it stills fucks up GCC_SPECS and LD_PATH env variables :

i choosed : i686-pc-linux-gnu-3.4.3

but it generated the following /etc/env.d/05gcc file :
PATH="/usr/i686-pc-linux-gnu/gcc-bin/3.4.3"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/3.4.3"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3/info"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/3.4.3:/usr/lib/gcc/i686-pc-linux-gnu/3.4.3:/usr/lib/gcc/i686-pc-linux-gnu/3.4.3:/usr/lib/gcc/i686-pc-linux-gnu/3.4.3"
GCC_SPECS="/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/hardened.specs"


see how LD_PATH contains 4 times the same value and the GCC_SPECS is set to an hardened one

should this one be reopened ?
Comment 24 SpanKY gentoo-dev 2004-12-04 19:17:11 UTC
the LDPATH is not a new thing and is an unrelated bug ... it's also not a critical bug at all

as for GCC_SPECS ... i'm retarted and spelled the var wrong in 1.3.7-r4 ...

i'll look into fixing LDPATH before releasing 1.3.7-r5
Comment 25 SpanKY gentoo-dev 2004-12-05 00:12:34 UTC
ok i just put out 1.3.7-r5 which has my stupid variable name fixed and i updated the code to trim multiple LDPATHs
Comment 26 Gregorio Guidi (RETIRED) gentoo-dev 2004-12-21 06:45:59 UTC
*** Bug 75165 has been marked as a duplicate of this bug. ***