1 |
Richard Freeman <rich@××××××××××××××.net> posted |
2 |
44F88FD3.2020809@××××××××××××××.net, excerpted below, on Fri, 01 Sep 2006 |
3 |
15:53:55 -0400: |
4 |
|
5 |
> Duncan wrote: |
6 |
>> |
7 |
>> Quoting the gist of the general instructions: |
8 |
>> |
9 |
>> Code Listing 2.1: Upgrading GCC |
10 |
>> # emerge -uav gcc |
11 |
>> |
12 |
> |
13 |
> |
14 |
> Ok, that is failing for me after a long time (probably on the second pass): |
15 |
> |
16 |
> |
17 |
> checking for x86_64-pc-linux-gnu-gcc... |
18 |
> /var/tmp/portage/gcc-4.1.1/work/build/./gcc/xgcc -B/var/tmp/po |
19 |
> rtage/gcc-4.1.1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ |
20 |
> - -B/usr/x86_64-pc-linux-gnu/lib/ -isystem |
21 |
> /usr/x86_64-pc-linux-gnu/include -isystem |
22 |
> /usr/x86_64-pc-linux-gnu/sys-include -m32 |
23 |
> checking for C compiler default output file name... a.out |
24 |
> checking whether the C compiler works... |
25 |
> configure: error: cannot run C compiled programs. |
26 |
|
27 |
> Not sure what is going on here. That -m32 doesn't look good though (but |
28 |
> what do I know?). |
29 |
> |
30 |
> I am able to compile both 64-bit and 32-bit in general (tested simple |
31 |
> shell of a .c file). And it compiled for a long time before dieing. |
32 |
|
33 |
Last time that happened here, it was due to some crap left over from an |
34 |
unclean upgrade. (I had a partial hard drive failure and in recovering |
35 |
from that using backups, my portage database in /var/db got out of sync |
36 |
with what I really had merged on the rest of my system. I remerged all |
37 |
the new packages to get everything back in sync, but that left a lot of |
38 |
orphaned old files around.) It was seeing an old copy of some things and |
39 |
therefore getting screwed up. After I devised a script that matched up |
40 |
the files that portage said belonged to packages (using equery files or |
41 |
equery belongs) with the files actually on the disk, and listed any that |
42 |
didn't belong to anything, then manually removed most of those files (a few |
43 |
were there for a reason), the problem disappeared. |
44 |
|
45 |
If you aren't handy enough with bash or other scripting to devise such a |
46 |
script, you can do it manually, but it'll take awhile. I'd start with an |
47 |
equery files for glibc and gcc, comparing the actual files you have |
48 |
on-disk including version with what portage says you should have, paying |
49 |
special attention where you have two versions of a file. If you find a |
50 |
few orphaned files there, that may fix the problem and you won't have to |
51 |
go further (except that you should do so eventually anyway, as those old |
52 |
stale versions will continue to cause problems for some time, and may be |
53 |
security vulnerabilities if they get used instead of the newer and |
54 |
presumably patched versions). |
55 |
|
56 |
Alternatively, you may be able to work with someone who knows a quite a |
57 |
lot more than I do about gcc and/or glibc, and be able to find the |
58 |
problem. For a start, after the broken compile, you should have a |
59 |
config.log file in the build dir, that will tell you what lines of the |
60 |
configure script actually went wrong and how, and you (or someone else who |
61 |
knows about it) can work from there at discovering the problem. |
62 |
|
63 |
-- |
64 |
Duncan - List replies preferred. No HTML msgs. |
65 |
"Every nonfree program has a lord, a master -- |
66 |
and if you use the program, he is your master." Richard Stallman |
67 |
|
68 |
-- |
69 |
gentoo-amd64@g.o mailing list |