Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Can not compile gcc
Date: Fri, 14 Nov 2008 19:30:44
Message-Id: pan.2008.11.14.19.30.28@cox.net
In Reply to: [gentoo-amd64] Can not compile gcc by Mansour Al Akeel
1 "Mansour Al Akeel" <mansour.alakeel@×××××.com> posted
2 2a21586d0811141002p735a3839h74ec70ff8dd7f524@××××××××××.com, excerpted
3 below, on Fri, 14 Nov 2008 14:02:19 -0400:
4
5 > checking for x86_64-pc-linux-gnu-gcc...
6 > /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/xgcc
7 > -B/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/
8 > -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
9 > /usr/x86_64-pc-linux-gnu/include -isystem
10 > /usr/x86_64-pc-linux-gnu/sys-include -m32
11
12 First, please kill the HTML. There's enough "old fogies" like me that
13 don't like it, on most Linux related lists at least, that it's really not
14 a good idea. We have a choice as to whether to reply or not, and some of
15 the guys that have been around the longest and therefore tend to have the
16 most wisdom to apply to a problem, may not reply to HTML posts at all --
17 or even see them in some cases, if they filter them out, as I do for
18 regular mail. Do you really want to potentially kill the single reply
19 that might have otherwise been the only one with a working fix?
20
21 Anyway, back to your question. See that -m32? That's telling the new
22 gcc it just built while bootstrapping itself and is there testing, to
23 compile the test in 32-bit mode. It (I think) builds the 64-bit stuff
24 first, and is then failing on the 32-bit stuff. IOW, it's an issue
25 related to the 32-bit aspect of the compile for both 64-bit and 32-bit
26 support, that you get when you are running a multilib profile.
27
28 Personally, since I don't do the proprietaryware that's the biggest
29 reason to do 32-bit compatibility in the first place, and all the
30 freedomware I run has long since been 64-bit, I didn't have any reason to
31 stay with multilib. And, since it gave me headaches like this every so
32 often, and even when it was working, both gcc and glibc, which are both
33 already fairly long merges, took effectively double the time to build
34 because they were being built for both 64-bit and 32-bit, I had lots of
35 reason NOT to stay with multilib.
36
37 So I switched to the no-multilib profile and simplified my life with
38 faster and more trouble-free gcc and glibc compiles, and have been VERY
39 happy I did so.
40
41 Of course if you're still held captive by some proprietaryware or other
42 that's only available in 32-bit, that's not going to be an option for you.
43
44 There are several possible triggers for this problem. The first one is a
45 broken 32-bit sandbox. For that, try turning it off and remerging
46 sandbox. If it works, you should then be able to remerge gcc without
47 issue and remerge sandbox normally.
48
49 FEATURES=-sandbox emerge sandbox
50
51 If that doesn't work, one thing that has been a problem in the past but
52 one would hope doesn't apply any more, is if you had eselect-compiler and
53 gcc-config-2.0 merged at some point. If you did, there's a bug on it you
54 should look at. If you didn't, this one doesn't apply.
55
56 There are various other possibilities due to various broken configs and
57 etc relating to the 32-bit side of the multilib toolchain. Often the
58 simplest solution to these is to remerge a known working usually older
59 gcc, hopefully overwriting whatever's wrong with your current setup,
60 after which you can normally rebuild the newer gcc using the working old
61 one, and be back on track.
62
63 If you've been running FEATURES=buildpkg for some time, you may have
64 several older versions of gcc in your binary package archive and can just
65 remerge one of them, temporarily downgrading gcc to fix the problem, then
66 use it to merge a current gcc. This of course is one of the benefits of
67 running with that feature enabled.
68
69 If you have NOT been running with FEATURES=buildpkg enabled, you have a
70 choice. If you have another working gentoo/amd64 machine available, you
71 can quickpkg it's gcc, copy it over and emerge -K it onto the affected
72 machine. Otherwise you'll have to choose between trusting a version
73 someone else may offer you and grabbing one off the latest gentoo/amd64
74 install stages. This would involve downloading a stage tarball,
75 untarring it somewhere temporary, chrooting into it, doing a quickpkg of
76 the gcc therein, then from outside the chroot, doing an emerge -K of the
77 binpkg built by the quickpkg.
78
79 When you get your system working correctly again (but before you go back
80 to your system/world rebuild), you may wish to consider
81 FEATURES=buildpkg. If you turn it on, you can then do your system/world
82 rebuild and will have binpkgs of everything, available if you need them.
83 After awhile, you'll have a couple older versions of most packages as
84 well, in case you need to revert to an older one for some reason. It's a
85 quite handy thing to have available, and can sure save a lot of needless
86 recompiling at times, even if you /don't/ ever use it to get out of
87 another hole like a busted gcc.
88
89 Spacewise, a full FEATURES=buildpkg system and world set, with what I
90 have merged here, runs about a gig, but you'll want at least 2 gigs
91 available for binpkgs and preferably 4 gigs or so, so you don't have to
92 clean out old versions too often, on whatever partition you decide to
93 store them on. The default storage location is $PORTDIR/packages, IIRC,
94 but you can point portage at a different location by setting PKGDIR in
95 make.conf as appropriate.
96
97 --
98 Duncan - List replies preferred. No HTML msgs.
99 "Every nonfree program has a lord, a master --
100 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: Can not compile gcc Mansour Al Akeel <mansour.alakeel@×××××.com>