Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: grub and glibc won't build on my new install
Date: Tue, 19 Jan 2010 10:00:24
Message-Id: pan.2010.01.19.09.21.09@cox.net
In Reply to: [gentoo-amd64] grub and glibc won't build on my new install by Randy Barlow
1 Randy Barlow posted on Mon, 18 Jan 2010 16:39:07 -0500 as excerpted:
2
3 > Howdy! I'm trying to perform a Gentoo install in a VM (KVM), and I seem
4 > to have a problem building grub. It fails in the configure process like
5 > this:
6 >
7 > checking for i686-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
8 > -m32 checking for C compiler default output file name... a.out checking
9 > whether the C compiler works... configure: error: in
10 > `/var/tmp/portage/sys-boot/grub-0.97-r9/work/grub-0.97': configure:
11 > error: cannot run C compiled programs. If you meant to cross compile,
12 > use `--host'.
13 >
14 > I thought that was pretty odd. I also discovered that glibc won't build
15 > correctly, with this:
16
17 That's classic screwed-up-32-bit symptoms. Your primary 64-bit toolchain
18 is fine, so most things compile fine, but the 32-bit toolchain is
19 screwed, so anything attempting to use it fails. Grub is of course 32-
20 bit, so it's failing. glibc compiles for both bitnesses, so the 32-bit
21 side of it is failing. If I'm not mistaken, you'll likely find that gcc
22 won't build either, because it too compiles dual bitnesses.
23
24 There are a number of reasons this might have happened. You mention that
25 this is a new install, which should eliminate some of the historical
26 ones. Your current profile looks good (it's a current 10th anniversary
27 amd64 profile and isn't no-multilib), but you didn't mistakenly try a no-
28 multilib version and compile some bits of the toolchain, did you?
29
30 gcc 4.3.4... should be fine. I know of no issues with glibc.
31
32 Hmm, kernel config! You have 32-bit executable format turned on in the
33 kernel, right? That's under Executable file formats / Emulations, IA32
34 Emulation. (It's not emulation, but anyway...) If that's it, you're not
35 the first one that's messed up, and probably won't be the last, either.
36
37 I haven't messed with VMs here (my machine doesn't have the hardware
38 extensions, and I haven't particularly needed a slower software-only a VM
39 for anything, so...), so I know not what if any options may need enabled
40 there, in either the host or the VM. If it's related to that, you'll
41 need to find help from someone else.
42
43 One other possibility to try is FEATURES=-sandbox emerge sandbox.
44 Multilib profiles include sandboxing libs for both 32-bit and 64-bit as
45 well, and sometimes it's simply the 32-bit side of that which gets
46 screwed up. Of course, building sandbox requires 32-bit as well, but if
47 it's just the 32-bit sandbox libs that are screwed,t then bypassing them
48 to remerge sandbox itself will work, and hopefully the newly built
49 sandbox will be functional. If that fails with 32-bit errors as well,
50 the problem is deeper in your toolchain, likely a screwed-up 32-bit gcc,
51 or possibly a screwed-up 32-bit glibc. It can also be binutils.
52
53 If it's not sandbox and not kernel, particularly since you're just fresh
54 installing, it's probably best to extract the stage tarball in a temp dir
55 somewhere, chroot into it, and quickpkg gcc, glibc, binutils, and
56 sandbox. That will give you binpkgs of the stage tarball versions of
57 those packages. Back out of that temp chroot again, you can
58 emerge --usepkgonly the binpkgs you just created, thus getting back a
59 working toolchain including 32-bit again. (You can try one at a time and
60 then test, to figure out what broke, or just do them all, then rebuild
61 them later.) Using that toolchain, you should be able to rebuild the
62 packages you binpkg installed from the stage tarball, and get back on
63 track.
64
65 Given the automated stage tarball building process gentoo uses these
66 days, it's narrowly possible the current tarball is somehow screwed, too,
67 and the binpkgs you create from it won't solve the problem. That is
68 quite unlikely, but narrowly possible. If that turns out to be the case,
69 you can try a tarball from a week or two ago, and hopefully it'll work
70 better. If it too gives problems, then it's likely something you're
71 doing wrong. In either case, when it gets to this stage it's time to
72 file a bug and get someone who knows a bit more about the intricacies of
73 multilib toolchains involved.
74
75 (FWIW, I run a no-multilib profile and have for a couple years now, I
76 think, but I also use a 32-bit chroot, generally following the gentoo/
77 amd64 32-bit chroot guide but with a few changes since I'm making a fully
78 bootable but not on that machine image, to compile the x86 gentoo image I
79 use on my netbook.)
80
81 --
82 Duncan - List replies preferred. No HTML msgs.
83 "Every nonfree program has a lord, a master --
84 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: grub and glibc won't build on my new install Randy Barlow <randy@×××××××××××××××××.com>