Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68395 - AMD64 linux32 script doesn't unset GCC_SPECS with gcc 3.4.2 in th amd64 part and older gcc elsewhere
Summary: AMD64 linux32 script doesn't unset GCC_SPECS with gcc 3.4.2 in th amd64 part ...
Status: RESOLVED DUPLICATE of bug 68799
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
: 68394 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-21 07:11 UTC by Jacek Sieka
Modified: 2011-03-04 01:09 UTC (History)
11 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 Jacek Sieka 2004-10-21 07:11:44 UTC
I recently tried to install a linux32 environment with one of the x86 stages, but when compiling gcc got the strange message "xgcc: is a directory"gcc: /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.2/: Is a directory". I traced it down to GCC_SPECS being set in my amd64 environment, but not unset by linux32 and not reset by the stage env.d gcc script (which was gcc 3.3.4).
I used stage2-x86-2004.3.20040920.tar.bz2 from the experimental folder, but I assume the problem is the same when building a 3.4.2 gcc from other stages as well.

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




Can be solved by "unset GCC_SPECS && emerge gcc"
Comment 1 Aaron Walker (RETIRED) gentoo-dev 2004-10-21 09:11:49 UTC
*** Bug 68394 has been marked as a duplicate of this bug. ***
Comment 2 Ian Abbott 2004-10-29 07:52:02 UTC
The bug is more general than the summary suggests as it applies to any switch from gcc 3.4.2 (perhaps any gcc 3.4.x) to gcc 3.3.x.

I don't think env-update supports commands to unset environment variables, but could the gcc 3.3.x ebuilds be updated to set GCC_SPECS to something reasonable instead of not setting it at all?  Otherwise, a switch from gcc 3.4.2 to 3.3.x using gcc-config, followed by "source /etc/profile" (as the gcc-config script suggests) leaves the GCC_SPECS environment variable set to its old value, which can cause some ./configure scripts to fail when emerging certain packages.
Comment 3 Travis Tilley (RETIRED) gentoo-dev 2004-10-29 12:18:18 UTC
GCC_SPECS is no longer set in the default config, and should hopefully leave the environment completely at some point for the non-default configs. if you've merged gcc 3.4.2-r2 or 3.4.2-r3 recently, this problem should mostly go away.


*** This bug has been marked as a duplicate of 68799 ***
Comment 4 Martin Walch 2009-01-30 21:43:14 UTC
When updating from sys-devel/gcc-4.3.2-r3 to sys-devel/gcc-4.3.3 everything is fine. But when switching back from 4.3.3 to 4.3.2-r3, I get this warning:

* gcc-config: Active gcc profile is invalid!                                                                                                               
* Switching native-compiler to x86_64-pc-linux-gnu-4.3.2...
* gcc-config: Active gcc profile is invalid!

* Your gcc has a bug with GCC_SPECS.
* Please re-emerge gcc.
* http://bugs.gentoo.org/68395

This goes away when emerging gcc-4.3.2-r3 then a second time.

Should this be this way? Is this a bug?
Comment 5 Auke Booij (tulcod) 2009-02-20 18:25:48 UTC
@M. Anderson: I just found this bug, too, after having some trouble with aspell and trying to use an older version of gcc. Currently trying to remerge gcc 4.3.3 directly, and see if that makes a difference...
Comment 6 Doug Whitesell 2009-06-09 17:39:11 UTC
I just got the same message:

* Your gcc has a bug with GCC_SPECS.
* Please re-emerge gcc

when running gcc-config to set up for 4.3.2, after upgrading from =sys-devel/gcc-4.1.2 to =sys-devel/gcc-4.3.2-r3...on x86.

Things seem to be fine in Portage- and gcc-land, however.
Comment 7 keenblade 2009-08-10 21:39:17 UTC
I got the same message as Doug Whitesell in emerge.log for upgrading gcc from sys-devel/gcc-4.3.3 to sys-devel/gcc-4.3.4 on x86_64.
 
 * Your gcc has a bug with GCC_SPECS.
 * Please re-emerge gcc
 
 Things seem to be fine in Portage- and gcc-land here, too.
gcc-config -l
 [1] mingw32-4.4.0 *

 [2] x86_64-pc-linux-gnu-4.3.4 *

Do we really need to reemerge gcc?


Comment 8 Adam Purkrt 2009-08-25 07:34:06 UTC
I've also run into this when upgrading sys-devel/gcc-4.3.2 to sys-devel/gcc-4.3.4 on x86_64

>>> Installing (1 of 1) sys-devel/gcc-4.3.4
 * Running 'fix_libtool_files.sh 4.3.2'
* Scanning libtool files for hardcoded gcc library paths...
* gcc-config: Active gcc profile is invalid!
gcc-config: error: could not run/locate 'gcc'
:0: assertion failed: (gcc -dumpversion) | getline NEWVER)
* gcc-config: Active gcc profile is invalid!
* Switching native-compiler to x86_64-pc-linux-gnu-4.3.4...
* gcc-config: Active gcc profile is invalid!

* Your gcc has a bug with GCC_SPECS.
* Please re-emerge gcc.
* http://bugs.gentoo.org/68395


But gcc was upgraded correctly anyway

# gcc --version
gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4
Comment 9 Tim Weber 2009-10-09 08:34:59 UTC
AFAICS (regarding comments #4 to #8) gcc-config says this when switching from an invalid profile (e.g. because you just uninstalled the active gcc version) to another one. When you run gcc-config again, the new profile is active and working, and no warning is displayed.

I consider this a bit of a confusing uglyness in gcc-config, maybe we should file another bug?
Comment 10 Dirkjan Ochtman (RETIRED) gentoo-dev 2009-10-19 07:37:26 UTC
If that's really the case, filing another bug sounds great (I just ran into this, too, on a couple of boxes).
Comment 11 Tim Weber 2009-10-25 08:40:00 UTC
(In reply to comment #10)
> If that's really the case, filing another bug sounds great (I just ran into
> this, too, on a couple of boxes).

Filed a new bug on this: bug #290437.

People who came here because your gcc-config told you to visit this page: Probably you don't need to re-emerge gcc, have a look at bug #290437 and see whether it applies to you.
Comment 12 Claudio Roberto França Pereira 2010-01-23 05:57:16 UTC
I managed to correct the problem here with this 2 commands:
gcc-config -l (to list the current gcc installed)
gcc-config 1 (ONE) (to config for the first profile)

If you have more than one profile, select the appropriate.

The error message really is a bit weird and out of context. Maybe changing it to "current profile is invalid, please run gcc-config to set the correct profile." would do the trick?
Comment 13 PetaMem R&D 2010-10-26 10:40:39 UTC
Yes, I came here too because of the message.

BEFORE I came here, I did a gcc-config -l to see what is wrong.
And it seemed there is nothing wrong (just one gcc profile), so I came here...

Probably it would be best to perform another "gcc-config -l" internally instead of displaying this message.

My guess:

I suspect this warning message is triggered if you have just one gcc version installed and this gets updated (eventually unmerging the old version), gcc-config then may think - for a moment - there is no valid gcc profile and shouts, just to be corrected on second invocation.

Comment 14 Dennis Schridde 2011-02-02 11:04:24 UTC
I received this message because I unmerged GCC 4.5.2, falling back to 4.4.4. The ebuild apparently did not switch my GCC back to the only available version, and later gcc-config claimed the old GCC 4.4.4 has broken specs.
Comment 15 Isaac ‘Will It Work’ Dansicker 2011-03-01 17:57:22 UTC
(In reply to comment #13)
> Yes, I came here too because of the message.
> 
> BEFORE I came here, I did a gcc-config -l to see what is wrong.
> And it seemed there is nothing wrong (just one gcc profile), so I came here...
> 
> Probably it would be best to perform another "gcc-config -l" internally instead
> of displaying this message.
> 
> My guess:
> 
> I suspect this warning message is triggered if you have just one gcc version
> installed and this gets updated (eventually unmerging the old version),
> gcc-config then may think - for a moment - there is no valid gcc profile and
> shouts, just to be corrected on second invocation.
> 
This is a reasonable explanation for my upgrade issues from 4.4.4 to 4.4.5
Comment 16 michael higgins 2011-03-04 01:09:59 UTC
(In reply to comment #15)
> (In reply to comment #13)
> > Yes, I came here too because of the message.
> > 
> > BEFORE I came here, I did a gcc-config -l to see what is wrong.
> > And it seemed there is nothing wrong (just one gcc profile), so I came here...
> > 
> > Probably it would be best to perform another "gcc-config -l" internally instead
> > of displaying this message.
> > 
> > My guess:
> > 
> > I suspect this warning message is triggered if you have just one gcc version
> > installed and this gets updated (eventually unmerging the old version),
> > gcc-config then may think - for a moment - there is no valid gcc profile and
> > shouts, just to be corrected on second invocation.
> > 
> This is a reasonable explanation for my upgrade issues from 4.4.4 to 4.4.5
> 

Yes, this just appeared for me as well. Serves me right for checking on an emerge in a shell, I guess. Anyway, it may be good to spit out something like, gcc-config errors may be spurious if you have only one profile.

However, I use distccd... IDK what the implications are for that, if the gcc versions aren't the same, so I stopped it.