Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

fails to update glibc to 2.19 (hardened profile)



Today's emerge of the glibc update from 2.18-r1 to 2.19 failed to complete the compile phase (near the end).  I'm on a profile of x86-64bit, current, desktop, hardened.  All packages were up to date as of yesterday.  I have two questions:  (1) should I perhaps update binutils manually first with the old glibc and then try building a clean toolchain with the new glibc?  (2) should I abandon the hardened profile, if that is part of the problem, and if so how to switch "hardened" off?


The glibc error is here:

make[3]: Entering directory '/tmp/portage/sys-libs/glibc-2.19/work/glibc-2.19/elf'
make subdir=csu -C ../csu ..=../ objdir=/tmp/portage/sys-libs/glibc-2.19/work/build-x86-x86_64-pc-linux-gnu-nptl -f Makefile -f ../elf/rtld-Rules rtld-al
l rtld-modules='rtld-check_fds.os rtld-errno.os rtld-divdi3.os rtld-init-arch.os'
make subdir=dirent -C ../dirent ..=../ objdir=/tmp/portage/sys-libs/glibc-2.19/work/build-x86-x86_64-pc-linux-gnu-nptl -f Makefile -f ../elf/rtld-Rules r
tld-all rtld-modules='rtld-closedir.os rtld-readdir.os rtld-rewinddir.os rtld-getdents.os rtld-fdopendir.os'
make subdir=gmon -C ../gmon ..=../ objdir=/tmp/portage/sys-libs/glibc-2.19/work/build-x86-x86_64-pc-linux-gnu-nptl -f Makefile -f ../elf/rtld-Rules rtld-
all rtld-modules='rtld-profil.os rtld-prof-freq.os'
make subdir=io -C ../io ..=../ objdir=/tmp/portage/sys-libs/glibc-2.19/work/build-x86-x86_64-pc-linux-gnu-nptl -f Makefile -f ../elf/rtld-Rules rtld-all
rtld-modules='rtld-xstat64.os rtld-fxstat64.os rtld-lxstat64.os rtld-open.os rtld-read.os rtld-write.os rtld-lseek.os rtld-access.os rtld-fcntl.os rtld-c
make[4]: Entering directory '/tmp/portage/sys-libs/glibc-2.19/work/glibc-2.19/csu'
../Makerules:252: *** Cannot allocate memory.  Stop.
make[4]: Leaving directory '/tmp/portage/sys-libs/glibc-2.19/work/glibc-2.19/csu'
../o-iterator.mk:9: recipe for target '/tmp/portage/sys-libs/glibc-2.19/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/rtld-check_fds.os' failed
make[3]: *** [/tmp/portage/sys-libs/glibc-2.19/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/rtld-check_fds.os] Error 2
make[3]: *** Waiting for unfinished jobs....
make[4]: Entering directory '/tmp/portage/sys-libs/glibc-2.19/work/glibc-2.19/io'
make[4]: Entering directory '/tmp/portage/sys-libs/glibc-2.19/work/glibc-2.19/dirent'
make[4]: Entering directory '/tmp/portage/sys-libs/glibc-2.19/work/glibc-2.19/gmon'

Notice the message "Cannot allocate memory" -- there is 16 Gbytes of ram here and plenty of free mem during this compile.  My best wild guess is that my hardened binutils/gcc are throwing the error. 


Here's emerge --info glibc:

__> emerge --info glibc
Portage 2.3.6-r9 (funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.8.2, glibc-2.18-r1, 3.16.5-gentoo x86_64)
                         System Settings
System uname: Linux-3.16.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-2405S_CPU_@_2.50GHz-with-gentoo-2.2.0
KiB Mem:    16317652 total,   2232580 free
KiB Swap:   13096956 total,  13096956 free
Timestamp of tree: Unknown
ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2
app-shells/bash:          4.3_p30
dev-lang/perl:            5.20.1-r2
dev-lang/python:          2.7.8-r1000, 3.3.5-r1000
dev-util/cmake:           3.0.2
sys-apps/baselayout:      2.2.0-r6
sys-apps/openrc:          0.12.3-r3
sys-apps/sandbox:         2.6-r2
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.2-r3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.3-r2
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo stargate
Installed sets: @kernel
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -O2"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
USE="X aac acl alsa amd64 apng avx bash-completion bs2b bzip2 cairo cdda cddb cdio cdr cracklib crypt cups cxx dbus djvu dot dri dvd dvdr dvdread encode ffmpeg fftw flac fluidsynth fontconfig frei0r gdbm gif gpm graphviz gtk guile hardened harfbuzz iconv icu id3tag ipv6 jpeg kipi ladspa lame latex lcdfilter libass mad matroska mmx modplug modules mp3 mp4 mpeg mudflap multilib ncurses nptl nsplugin ocaml ocamlopt ogg opengl openmp opus pam pango pax_kernel pcre pdf pic png postscript pppd python qt3support readline resolvconf speex spell sqlite sse sse2 sse4_1 sse4_2 ssl ssse3 svg t1lib taglib tcpd theora tiff truetype twolame udev unicode urandom vaapi vim-syntax vorbis wavpack win32codecs x264 x265 xattr xcb xft xml xmp xtpax xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias authn_core authz_core socache_shmcb unixd" CALLIGRA_FEATURES="braindump flow krita stage words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_ABIS="2.7 3.3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel fbdev vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

                        Package Settings

sys-libs/glibc-2.18-r1 was built with the following:
USE="hardened (multilib) -debug -gd -nscd -profile (-selinux) -suid -systemtap -vanilla"
CFLAGS="-march=native -O2 -fno-strict-aliasing"
CXXFLAGS="-march=native -O2 -fno-strict-aliasing"





I have had Funtoo pure64 - current - desktop - NOT hardened - running on another partition.  Glibc and friends updated just fine there of course.  If no one has other advice for me I'll switch back to that installation, add zfs to it and get it working with my zfs raidz pool. 


Am (Was) I the only one running a hardened profile on Funtoo??  This is my second show-stopper with "hardened": I couldn't run zfs on a hardened kernel and had to switch to gentoo-sources, and now can't emerge glibc-2.19 on a hardened toolchain.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

@sitquietly things can't be automagically solved out of thin air, definitely there is a problem, i could not catch this failure in any attempts. Is this running on XFS?


I definitely don't believe in magic, so it was embarrasing to report that the problem resolved with no apparent reason.  Sometimes that suggests a race condition -- when I reported the problem I was "-j4" and I intended to check it with "-j1" but then it just compiled to completion with "-j4". 


Yes I'm using XFS for / but  I compile in tmpfs.  My report above shows PORTAGE_TMPDIR="/tmp", which is tmpfs, and notice that I don't use -pipe in my CFLAGS.   (/home is on ZFS raidz.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...