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"
*** Bug 68394 has been marked as a duplicate of this bug. ***
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.
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 ***
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?
@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...
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.
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?
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
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?
If that's really the case, filing another bug sounds great (I just ran into this, too, on a couple of boxes).
(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.
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?
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.
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.
(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
(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.