Summary: | [glibc/hardened] emerge glibc-2.3.5-r2 failed: undefined reference to `.LC2' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jacek Sieka <arnetheduck> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | GNUtoo, hardened, jni, jsaker, ticho |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 99934 | ||
Bug Blocks: |
Description
Jacek Sieka
2005-11-02 01:50:00 UTC
Jacek, You should relax on those CFLAGS. Mainly that -finline-functions one. Ah, but as I wrote, I've tried with plain -O2 -march=xxx, and still no go. I've never had any problems with inline before either (on the 4 different stage1 systems I've set up so far...they weren't hardened though). Or are you suggesting that because the rest of my system is compiled with inlining, some symbols that glibc expects are gone? Any tips what else I might try? Hm, perhaps during the weekend I'll give it a shot with no CFLAGS, no LDFLAGS and no distcc. Normally, I wouldn't even bother updating glibc, but other stable packages are showing up that depend on 2.3.5 now, and it's becoming frustrating to mask them all. *** Bug 113625 has been marked as a duplicate of this bug. *** (In reply to comment #2) > Ah, but as I wrote, I've tried with plain -O2 -march=xxx Yes, I'm hitting this with minimal CFLAGS except for --fstack-protector (and from looking at the referenced csu/crtn file, I'm guessing stack smash protection is tripping up the build). Jamie In big bold lettering. <b> CFLAGS=-fstack-ptorector is not safe. Dont do it. </b> <i>CFLAGS=-fstack-ptorector is not safe. Dont do it.</i> That's ok, mine is set to -fstack-protector-all so I'm sure that's safe! All kidding aside, the Gentoo hardened docs all recommend the CFLAGS and I've run that way with many dozens of systems for several years without an incident (save for being cautious around X11). Since this is somewhat of a surprise and counter to the docs, can you elaborate or point me to a good reference on the change in thinking? I very much appreciate it! Jamie -fstack-* remains problematic via CFLAGS= If you can find any reference in the hardened docs to where we say it's safe to enable please make me aware of such docs so they can be removed. Basically fstack* must not be enabled on any code which makes use of -nostdlib or when _LIBC is defined. The -all option can not be enabled when _LIBC_REENTRANT is defined. The only clean way to handle these exceptions is via the toolchain directly. And todo that you enabbled USE=hardened or switch to the hardenednopie specs. Bug reported with -fstack* in CFLAGS= make.conf will be marked as INVALID. I've just had this happen as well, on a stable hardened x86 box: root@daria ~ # emerge --info Portage 2.0.53 (hardened/x86/2.6, gcc-3.4.4, glibc-2.3.5-r2, 2.6.11-hardened-r15 i686) ================================================================= System uname: 2.6.11-hardened-r15 i686 Celeron (Coppermine) Gentoo Base System version 1.6.13 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] dev-lang/python: 2.4.2 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.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/ config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -pipe" DISTDIR="/usr/gentoo/distfiles" FEATURES="autoconfig ccache collision-protect distcc distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo http://ftp.easynet. nl/mirror/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/gentoo/packages" PORTAGE_TMPDIR="/var/tmp/portage" PORTDIR="/usr/gentoo/portage" PORTDIR_OVERLAY="/usr/gentoo/overlay" SYNC="rsync://mirror.gentoo.sk/gentoo-portage" USE="adns apache2 bash-completion berkdb bzip2 crypt curl dlloader ethereal expat flac gd gdbm gmp hardened idn imagemagick ipv6 ldap libwww mcal mhash mp3 mysql ncurses nls nptl nptlonly ogg oss pam pcre perl pic python readline ruby samba slang snmp sse ssl tcpd truetype udev unicode userlocales vorbis x86 xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS I have a similar issue on my machine while trying zu update to glibc-2.3.5-r3. (without any unusual stuff in CFLAGS) If you think it is not related to this bug, then just say so. ;-) i686-pc-linux-gnu-gcc -nostdlib -nostartfiles -o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/iconv_prog -Wl,-dynamic-linker=/lib/ld-linux.so.2 -Wl,-z,combreloc -Wl,-z,relro /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crt1.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.o `i686-pc-linux-gnu-gcc --print-file-name=crtbegin.o` /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/iconv_prog.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/iconv_charmap.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/charmap.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/charmap-dir.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/linereader.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/dummy-repertoire.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/simple-hash.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/xstrdup.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/xmalloc.o -Wl,-rpath-link=/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/math:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/elf:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/dlfcn:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/nss:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/nis:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/rt:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/resolv:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/crypt:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/linuxthreads /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/libc.so.6 /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/libc_nonshared.a -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed `i686-pc-linux-gnu-gcc --print-file-name=crtend.o` /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.o /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.o:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S:15: undefined reference to `.LC2' /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.o:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S:37: undefined reference to `.LC3' collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/iconv_prog] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r3/work/glibc-2.3.5/iconv' make[1]: *** [iconv/others] Error 2 make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r3/work/glibc-2.3.5' make: *** [all] Error 2 # emerge --info Portage 2.1_pre6-r5 (hardened/x86/2.6, gcc-3.4.5, glibc-2.3.5-r2, 2.6.14-hardened-r5 i686) ================================================================= System uname: 2.6.14-hardened-r5 i686 Pentium III (Coppermine) Gentoo Base System version 1.6.14 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 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.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-mtune=pentium3 -march=pentium3 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /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 /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d" CXXFLAGS="-mtune=pentium3 -march=pentium3 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect confcache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict test" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/" LINGUAS="de en" MAKEOPTS="-j3" PKGDIR="/usr/portage//packages/x86/" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage/" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage" USE="X X509 a52 aac acpi alsa arts avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cardbus chroot crypt css curlwrappers dga dlloader dri dvd font-server ftp gif gnuplot gs gtk2 hardened imap jabber javascript jpeg lesstif lzo lzw mbox md5sum mime mmx mmxext mozilla mozsvg mp3 mpeg mplayer network nls no_wxgtk1 nodrm nptl nsplugin ntlm offensive ogg opengl pam pam_timestamp pcmcia pic png pnp ppds qt readline recode sftplogging smime sockets sse ssl tcpd theora tiff truetype truetype-fonts type1 type1-fonts userlocales vcd vorbis wifi win32codecs x86 xv zlib elibc_glibc kernel_linux linguas_de linguas_en userland_GNU" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS Just to try something else out: (chroot) gh-gsmtp0 portage # cat /etc/portage/package.mask >sys-libs/glibc-2.3.5 (chroot) gh-gsmtp0 portage # collect2: ld returned 1 exit status distcc[29911] ERROR: compile (null) on localhost failed make[2]: *** [/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-powerpc-unknown-linux-gnu-linuxthreads/iconv/iconvconfig] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20041102-r1/work/glibc-2.3.3/iconv' make[1]: *** [iconv/others] Error 2 make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20041102-r1/work/glibc-2.3.3' make: *** [all] Error 2 !!! ERROR: sys-libs/glibc-2.3.4.20041102-r1 failed. !!! Function src_compile, Line 759, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Same situation. (chroot) gh-gsmtp0 portage # emerge info Portage 2.0.54 (default-linux/ppc/ppc64/2006.0/32bit-userland/power5, gcc-3.4.5, glibc-2.3.5-r3, 2.6.12.2-pseries ppc64) ================================================================= System uname: 2.6.12.2-pseries ppc64 POWER5 (gr) Gentoo Base System version 1.6.14 distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: [Not Present] sys-devel/binutils: 2.16.1 sys-devel/libtool: [Not Present] virtual/os-headers: 2.6.11-r4 ACCEPT_KEYWORDS="ppc" AUTOCLEAN="yes" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -pipe -mtune=power5 -mcpu=power5" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe -mtune=power5 -mcpu=power5" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distcc distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.uni-c.dk/pub/gentoo/" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.nordic/gentoo-portage" USE="ppc berkdb bzip2 esd fortran gcc64 gdbm gif gpm hardened ibm imlib mikmod ncurses nls nptl pam pcre pdflib perl pic png python readline reflection session spl ssl tcpd udev unicode zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY (chroot) gh-gsmtp0 portage # *** Bug 169270 has been marked as a duplicate of this bug. *** these versions of glibc are no longer supported ... if glibc-2.5 shows issues, open a new bug report But 2.5 and 2.4 are profile masked on hardened! I'm still getting this error on 2.3.6-r5 and I'm running gentoo on a server in a remote location where a glibc breakage means a five hour trip to boot from cd. profiles/hardened/package.mask: # Mask off glibc-2.4 until the approach for SSP compatibilty is # resolved in a way that doesn't break running systems, and we # have a sensible upgrade path. Advise having a static busybox # around if you try it in a live system. # 2006-03-13 kevquinn =sys-libs/glibc-2.4* # And 2.5... # 2006-10-09 kevquinn =sys-libs/glibc-2.5* glibc-2.5 is being worked on for hardened support ... that doesnt change that glibc-2.3.x will not be seeing any more updates so having a bug open about it doesnt carry much value |