After upgrading gcc to 3.3.6 (from 3.3.5.20050130-r1) and linux-headers to 2.4.22-r1 (from 2.4.21- r1) I was going to upgrade glibc to 2.3.5-r2 (from 2.3.4.20040808-r1) but after a while I get the following error: --cut-- make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5' * Installing man pages... /usr/portage/sys-libs/glibc/glibc-2.3.5-r2.ebuild: line 498: 10391 Segmentation fault "${D}"/$ (get_libdir)/ld-*.so --library-path "${D}"/$(get_libdir) ${x} >/dev/null !!! ERROR: sys-libs/glibc-2.3.5-r2 failed. !!! Function toolchain-glibc_src_install, Line 507, Exitcode 139 !!! simple run test (/bin/date) failed !!! If you need support, post the topmost build error, NOT this status message. --cut-- I've looked at the fixed (what's that about?) bug 90836 but the fix in the ebuild/portage doesn't seem to work (well, I guess the check works but my newly compiled glibc is screwed up). I've tried to re- emerge coreutils, but that didn't help. Reproducible: Always Steps to Reproduce: 1. emerge -uva glibc 2. 3. Actual Results: make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5' * Installing man pages... /usr/portage/sys-libs/glibc/glibc-2.3.5-r2.ebuild: line 498: 10391 Segmentation fault "${D}"/$ (get_libdir)/ld-*.so --library-path "${D}"/$(get_libdir) ${x} >/dev/null !!! ERROR: sys-libs/glibc-2.3.5-r2 failed. !!! Function toolchain-glibc_src_install, Line 507, Exitcode 139 !!! simple run test (/bin/date) failed !!! If you need support, post the topmost build error, NOT this status message. Here's the output of emerge --info: Portage 2.0.51.22-r3 (default-linux/x86/2005.0/2.4, gcc-3.3.6, glibc-2.3.4.20040808-r1, 2.4.19- gentoo-r10 i686) =============================================================== == System uname: 2.4.19-gentoo-r10 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.6.13 ccache version 2.3 [enabled] dev-lang/python: 2.2.3-r6, 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/ kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/ qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo// ftp://ftp.easynet.nl/mirror/gentoo// ftp:// ftp.tu-clausthal.de/pub/linux/gentoo/" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X apache apm bash-completion berkdb bitmap-fonts crypt cscope curl eds emboss ethereal fam gd gdbm gif gpm gtk gtk2 icc icc-pgo imap imlib innodb ipv6 jpeg junit kde libg++ libwww motif mp3 mpeg mysql ncurses nls no-htdocs notlsbeforeauth opengl pam pdflib perl png postgres python qt readline samba sdl slang snmp spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts xml2 xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Hello? Anybody have an update on this. It seems to be a very common problem, and lots of people seem to get stuck upgrading their Gentoo machines, so any pointers on what to do would be nice...
I can vouch that I'm having glibc-related segfault issues on an x86 chroot on an amd64 box. The glibc build is pure x86, so it should be parallel to any x86 issues out there. I've seen this issue on a few versions now - I'm on 2.3.5-r2 at the moment. I get segfaults emerging just about anything big - glibc obviously fits the bill. I can usually fix the problem by installing a binary glibc from the gentoo stage3 tarball. (Install it in a chroot, quickpkg glibc, copy and emerge --usepkg). For me that is no sweat since only my x86 chroot is broken and I have an otherwise working system. This would be a bigger pain for somebody whose core system is buggy. The problem must be upstream with glibc...
I had the exact same problem. Pentium 4 x86. I tried about a dozen times and got a seg-fault every time, but in different locations in the code. At that point my mind was screaming "bad memory". Before booting up memtest86, I tried once more, but I changed my MAKEOPTS from "-j3" to "-j1". It emerged just fine. I since booted up memtest86 and my memory checks out OK. A long time ago, I believe that a "-j1" option was forced into the glibc ebuild to prevent just this problem, as the parallel spawning of linker processes could result in missing dependencies and other weirdness. I see it's effect during the emerge process, e.g. "make -j1 -j1 threads". The second -j1 is forced by the ebuild. However my guess at this point is that this approach somehow 'misses' some sections of the build process, allowing user MAKOPTS to be in effect. So as a suggestion, try setting your MAKEOPTS="-j1" and see if that makes any difference. If so, the ebuild maintainer might want to go through the ebuild and see if user MAKEOPTS are getting into the actual make process somehow.
Just tried to recompile with MAKEOPTS="-j1" but I still get a segmentation fault. Also tried to recompile first linux-headers and then glibc, both with MAKEOPTS="-j1", but still no luck...
Still a problem with the newest version of gcc/binutils?
(In reply to comment #5) > Still a problem with the newest version of gcc/binutils? Yep, same problem as the one I reported. I've since updated my profile, so here's my new emerge -- info: --cut-- Portage 2.0.51.22-r3 (default-linux/x86/no-nptl/2.4, gcc-3.4.4, glibc-2.3.4.20040808-r1, 2.4.19- gentoo-r10 i686) =============================================================== == System uname: 2.4.19-gentoo-r10 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.6.13 ccache version 2.3 [enabled] dev-lang/python: 2.2.3-r6, 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/ share/config /var/bind /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo// ftp://ftp.easynet.nl/mirror/gentoo// ftp:// ftp.tu-clausthal.de/pub/linux/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acl apache apm audiofile bash-completion berkdb bitmap-fonts bzip2 crypt cscope curl eds emboss ethereal expat fam gd gdbm gif glibc-omitfp glut gmp gpm gtk gtk2 icc icc-pgo idn imap imlib innodb ipv6 jpeg junit kde lcms libg++ libwww mhash mng motif mp3 mpeg mysql ncurses nls no-htdocs notlsbeforeauth opengl pam pcre pdflib perl png postgres python qt readline samba sdl slang snmp spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts xml2 xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS --cut--
wild guess: in ppc arch, random segfaults in big compilations are almost always related with CONFIG_PREEMPT in kernel (considered broken there even if it can run for days when no heavy IO/CPU activity takes place). Don't know if something alike could be happening under x86. Hope this helps
*** Bug 112708 has been marked as a duplicate of this bug. ***
*** Bug 120354 has been marked as a duplicate of this bug. ***
*** Bug 105689 has been marked as a duplicate of this bug. ***
*** Bug 125539 has been marked as a duplicate of this bug. ***
I've managed to fix the problem using the following procedure: 1) I upgraded the kernel from gentoo-sources-2.4.19-r10 to gentoo-sources-2.4.31-r1 2) Booted using the new kernel 3) Re-emerged glibc-2.3.5-r2 which was successful and I have since been able to upgrade all my other packages. I have a feeling the problem occured because I had previously upgraded linux-headers and glibc without compiling a new kernel and without rebooting, so the glibc I was trying to emerge would be compiled against linux-headers-2.4.22-r1 which has features not available in the kernel I was using at that point...