1 |
Peter Humphrey <prh@××××××××××.uk> posted |
2 |
200609261118.18556.prh@××××××××××.uk, excerpted below, on Tue, 26 Sep |
3 |
2006 11:18:18 +0000: |
4 |
|
5 |
> Well, I decided to forge ahead while I still have the steam. I'm upgrading |
6 |
> GCC from 3.4.4 to 4.1.1-r1. |
7 |
> |
8 |
> I followed the instructions thus: |
9 |
> |
10 |
> # emerge -uav gcc |
11 |
> # gcc-config i686-pc-linux-gnu-4.1.1 |
12 |
> # source /etc/profile |
13 |
> # fix_libtool_files.sh 3.4.4 |
14 |
> # emerge --oneshot -av libtool |
15 |
> |
16 |
> I then decided, before emerging -e system and risking confusion of GCC |
17 |
> versions as before, to remove 3.4.4 and emerge libtool again to check that |
18 |
> the compiler works ok. That went without a problem, so I do have a working |
19 |
> 4.1.1 compiler. |
20 |
> |
21 |
> Now, during emerge -e system, emerge of sandbox (the ninth package of 114) |
22 |
> falls over with the dreaded "C compiler cannot create executables". I |
23 |
> followed its own advice and ran: |
24 |
> FEATURES="-sandbox" emerge sandbox |
25 |
> which failed at the same point. Here are some extracts |
26 |
> from /var/tmp/portage/sandbox-1.2.18.1/work/build-x86-x86_64-pc-linux-gnu/config.log: |
27 |
> |
28 |
> Invocation command line was |
29 |
> $ ../sandbox-1.2.18.1//configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr |
30 |
> /share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib32 --enable-multili |
31 |
> b --build=i686-pc-linux-gnu |
32 |
> |
33 |
> Note the "--host=i686-pc-linux-gnu". I think that's wrong: it should |
34 |
> say "--host=x86_64-pc-linux-gnu", no? Continuing the log extract: |
35 |
|
36 |
No, that's correct in this case. I see your problem now. While most |
37 |
packages you install are 64-bit only and work, sandbox has both 32-bit and |
38 |
64-bit components -- libraries that enforce sandbox restrictions in both |
39 |
32-bit and 64-bit mode. What's happening is that your 64-bit gcc is |
40 |
working, but somewhere along the way, you lost a working 32-bit compiler. |
41 |
With it horked, you can't compile any 32-bit stuff, including the 32-bit |
42 |
part of sandbox. However, since most of the system is 64-bit and that's |
43 |
working, you can compile most packages just fine. |
44 |
|
45 |
Other packages that likely won't compile will be glibc and gcc, since they |
46 |
both have 32-bit aspects as well, and that's what's horked. |
47 |
|
48 |
> configure:1942: checking for i686-pc-linux-gnu-gcc |
49 |
> configure:1958: found /usr/bin/i686-pc-linux-gnu-gcc |
50 |
> configure:1968: result: i686-pc-linux-gnu-gcc |
51 |
> configure:2250: checking for C compiler version |
52 |
> configure:2253: i686-pc-linux-gnu-gcc --version </dev/null >&5 |
53 |
> gcc-config error: i686-pc-linux-gnu-gcc wrapper: Could not |
54 |
> determine which compiler to use. Invalid CTARGET or CTARGET has no |
55 |
> selected profile. |
56 |
> |
57 |
> Indeed, issuing commands manually I get this: |
58 |
> |
59 |
> $ i686-pc-linux-gnu-gcc --version |
60 |
> gcc-config error: i686-pc-linux-gnu-gcc wrapper: Could not determine |
61 |
> which compiler to use. Invalid CTARGET or CTARGET has no selected |
62 |
> profile. |
63 |
|
64 |
This simply confirms the above -- you have a dead 32-bit gcc. |
65 |
|
66 |
> $ which i686-pc-linux-gnu-gcc |
67 |
> /usr/bin/i686-pc-linux-gnu-gcc |
68 |
> $ eselect compiler list |
69 |
> Available compilers for CTARGET i686-pc-linux-gnu |
70 |
> [1] x86_64-pc-linux-gnu-4.1.1/x86-vanilla |
71 |
> Available compilers for CTARGET x86_64-pc-linux-gnu |
72 |
> [2] x86_64-pc-linux-gnu-4.1.1/amd64-vanilla |
73 |
> |
74 |
> Activated profiles: |
75 |
> [null] |
76 |
> $ x86_64-pc-linux-gnu-gcc --version |
77 |
> x86_64-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1) |
78 |
> [...copyright notice...] |
79 |
> |
80 |
> [End of log extracts] |
81 |
|
82 |
Note the [null]. That should be where it lists the configured active |
83 |
32-bit compiler. It's not set, so you are having problems. |
84 |
|
85 |
FWIW, this is almost certainly one of the reasons eselect-compiler is |
86 |
currently masked... Also note that since it's masked, the instructions |
87 |
for upgrading gcc needn't bother with any eselect compiler specific |
88 |
issues. Here's what happened. The old gcc-config (which the instructions |
89 |
have in mind) set both, but eselect compiler sets them separately and since |
90 |
you used the gcc-config compatibility wrapper with instructions for the |
91 |
old both-at-once gcc-config, guess what, you set only one. |
92 |
|
93 |
So... Try eselect compiler list, then eselect compiler set <number>, |
94 |
where <number> is an appropriate number selected from the available 32-bit |
95 |
compiler options. |
96 |
|
97 |
Hopefully, that gets you back on the right track, and you can successfully |
98 |
complete the sandbox emerge. If it doesn't, things get more difficult, |
99 |
but we identified the problem now, which is certainly half the way to |
100 |
fixing it right there. If necessary, you can rebuild gcc using the |
101 |
multilib version in the stage tarball to get working multilib back, and go |
102 |
from there. Same with glibc if necessary. |
103 |
|
104 |
> |
105 |
> Other packages are compiling as I write, having got to package 38 of |
106 |
> 105, so the environment is broadly correct. |
107 |
|
108 |
As I said, the majority of the packages will be 64-bit, so lack of a valid |
109 |
32-bit compiler setting won't affect them at all. Only the toolchain |
110 |
packages, for the most part, will be affected, so sandbox, glibc, gcc, and |
111 |
maybe binutils. (I don't have a good grasp of exactly how much of |
112 |
binutils is multilib split, but various remarks I've read indicate that at |
113 |
least some of it is.) However, if you are lucky, simply setting the |
114 |
32-bit compiler will put you back in good form. |
115 |
|
116 |
... I wonder how much of your earlier problems might have the same thing? |
117 |
Oh, well, hindsight's always 20/20, as they say. One more thing to add |
118 |
to our list of things to check... |
119 |
|
120 |
-- |
121 |
Duncan - List replies preferred. No HTML msgs. |
122 |
"Every nonfree program has a lord, a master -- |
123 |
and if you use the program, he is your master." Richard Stallman |
124 |
|
125 |
-- |
126 |
gentoo-amd64@g.o mailing list |