Gentoo Archives: gentoo-user

From: Andrea Conti <alyf@××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gcc upgrade: Active gcc profile is invalid!
Date: Tue, 19 Oct 2010 19:02:35
Message-Id: 4CBDEB3F.6050401@alyf.net
In Reply to: [gentoo-user] gcc upgrade: Active gcc profile is invalid! by Jarry
1 On 19/10/2010 19:45, Jarry wrote:
2 > Hi,
3 > I just tried to upgrade gcc (stable amd64, from 4.4.3-r2
4 > to 4.4.4-r2) following the procedure recommended in Gentoo
5 > GCC Upgrade Guide:
6 >
7 > emerge -uav gcc
8 >
9 > At the end of compilation, I got these strange messages:
10 > ====================================================
11 >
12
13 > in '/etc/env.d/gcc/'
14 > !
15 > * Running 'fix_libtool_files.sh 4.4.3'
16 > * Scanning libtool files for hardcoded gcc library paths...
17 > cat: ld.so.conf.d/*.conf: No such file or directory
18
19 > :0: assertion failed: (gcc -dumpversion) | getline NEWVER)
20 >>>> Original instance of package unmerged safely.
21 > * Switching native-compiler to x86_64-pc-linux-gnu-4.4.4 ...
22 > * gcc-config: Active gcc profile is invalid!
23 > * Your gcc has a bug with GCC_SPECS.
24 > * Please re-emerge gcc.
25 > * http://bugs.gentoo.org/68395
26 >
27 >>>> Regenerating /etc/ld.so.cache... [ ok ]
28 >
29 > * If you intend to use the gcc from the new profile in an already
30 > * running shell, please remember to do:
31 >
32
33 >
34 > * If you have issues with packages unable to locate libstdc++.la,
35 > * then try running 'fix_libtool_files.sh' on the old gcc versions.
36 > * You might want to review the GCC upgrade guide when moving between
37 > * major versions (like 4.2 to 4.3):
38 > * http://www.gentoo.org/doc/en/gcc-upgrading.xml
39 >
40 >>>> Regenerating /etc/ld.so.cache...
41 >>>> Recording sys-devel/gcc in "world" favorites file...
42 >>>> Auto-cleaning packages...
43 >>>> No outdated packages were found on your system.
44 >
45 > * Regenerating GNU info directory index...
46 > * Processed 7 info files.
47 > ====================================================
48 >
49 > What does that "invalid profile" mean, and how can I fix it?
50
51 Well... it means that the active gcc profile is invalid :)
52
53 You can have several gcc versions installed on your system for a given
54 target arch; each version has an associated profile and you can choose
55 the active one (i.e. which version is run when you type "gcc") by using
56 gcc-config.
57
58 When you do a regular (i.e. -multislot) gcc upgrade, the active profile
59 must be changed from the old version to the new one; the ebuild should
60 take care of this for you but sometimes it chokes in the process.
61
62 First you have some warnings about the old profile being broken -- which
63 is expected as you just uninstalled the old gcc version:
64
65 > * gcc-config: Could not locate 'x86_64-pc-linux-gnu-4.4.3'
66 [...]
67 > * gcc-config: Active gcc profile is invalid!
68 > gcc-config: error: could not run/locate 'gcc'
69
70 Then the new profile is correctly selected:
71
72 > * Switching native-compiler to x86_64-pc-linux-gnu-4.4.4 ...
73
74 It's not clear to me whether the following warnings (let alone the whole
75 "your gcc is broken" scary thing) are caused by the new profile being
76 actually broken or -- more likely -- by the problems encountered when
77 trying to do something with the old profile.
78
79 Try a simple "gcc -v" in a new shell. If it works, you are fine.
80 If it does not work, try again after doing "gcc-config 1".
81 If it still does not work, well, you're in for lots of fun.
82
83 HTH,
84 andrea