Gentoo Archives: gentoo-user

From: Alan Mackenzie <acm@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] glibc-2.33-r1 crashes out at the start before building.
Date: Tue, 13 Jul 2021 20:33:54
Message-Id: YO34qLPM9vUftDFp@ACM
In Reply to: Re: [gentoo-user] glibc-2.33-r1 crashes out at the start before building. by Sergei Trofimovich
1 Hello, Sergei and Gentoo.
2
3 On Thu, Jul 08, 2021 at 09:00:59 +0100, Sergei Trofimovich wrote:
4 > On Wed, 7 Jul 2021 18:16:44 +0000
5 > Alan Mackenzie <acm@×××.de> wrote:
6
7 > > Hello, Gentoo.
8
9 > > Would somebody help me here, please.
10
11 > > When I try to emerge glibc-2.33-r1, the very first phase of the build
12 > > crashes out with:
13
14 > > x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed glibc-test.c -o glibc-test
15 > > * Checking that IA32 emulation is enabled in the running kernel ...
16 > > /usr/portage/sys-libs/glibc/glibc-2.33-r1.ebuild: line 608: 199 Segmentation fault "${T}/check-ia32-emulation.elf32"
17 > > [ !! ]
18 > > * ERROR: sys-libs/glibc-2.33-r1::gentoo failed (pretend phase):
19 > > * CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc.
20 > > *
21 > > * Call stack:
22 > > * ebuild.sh, line 127: Called pkg_pretend
23 > > * glibc-2.33-r1.ebuild, line 721: Called sanity_prechecks
24 > > * glibc-2.33-r1.ebuild, line 670: Called die
25 > > * The specific snippet of code:
26 > > * [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
27 > > *
28 > > * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.33-r1::gentoo'`,
29 > > * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.33-r1::gentoo'`.
30 > > * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.33-r1/temp/build.log'.
31 > > * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.33-r1/temp/die.env'.
32 > > * Working directory: '/var/tmp/portage/sys-libs/glibc-2.33-r1/empty'
33 > > * S: '/var/tmp/portage/sys-libs/glibc-2.33-r1/work/glibc-2.33'
34
35 > > >>> Failed to emerge sys-libs/glibc-2.33-r1, Log file:
36
37 > > >>> '/var/tmp/portage/sys-libs/glibc-2.33-r1/temp/build.log'
38
39 > > What is clearly happening is that the C Compiler is crashing out with a
40 > > segfault. I actually have CONFIG_IA32_EMULATION in my kernel config.
41
42 > > I've tried this with both GCC-10.3.0 and GCC-9.3.0 with the same results
43 > > on both.
44
45 > > What is going wrong? (Horrible thought - maybe my RAM is failing.)
46
47 > If it happens consistently it's more likely a software problem and
48 > not a hardware problem.
49
50 > Try getting a backtrace and instructing dump out of SIGSEGVing glibc-test.
51
52 > The typical session would look like:
53 > $ gdb ./glibc-test
54 > (gdb) run
55 > (gdb) bt
56 > (gdb) disassemble
57
58 In the end, I submitted bug #802036 to the Gentoo bugzilla. Ben Kohler
59 noticed straight away I was still using a very old binutils (hence the
60 benefit of supplying complete documentation with a bug), and remarked
61 that problems had been seen with glibc and old binutils. Sergei then
62 helped with practical suggestions.
63
64 I didn't even know you had manually to configure binutils versions, but I
65 did this, and glibc continued to crash out. Then I tried editing the
66 ebuild file, removing the check that was causing the crash. This gave me
67 ebuild validation errors. So, after looking up the man page, I gave the
68 argument --digest to emerge, and it built. Phew!
69
70 So, after catching up on my emerging, I've just got one package which
71 isn't building, libdrm, but that can wait till another day.
72
73 > --
74
75 > Sergei
76
77 --
78 Alan Mackenzie (Nuremberg, Germany).