Summary: | sys-libs/glibc-2.3.6-r3 compile failure on hardened due to x86_64/string patches | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Julian Sasse <julian.sasse> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | amd64, as.gentoo, bugs.gentoo.org, eric.brown, gabe, laurento.frittella |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 100289 | ||
Attachments: |
Full compile log for glibc-2.3.6-r3 (failed)
Full compile log (with errors) for glibc-2.3.6-r3 Compile stderr output only for glibc-2.3.6-r3 Use direct GOT offsets instead of _rtld_global_ro for PIE builds glibc-2.3.3-amd64-string-PIE-fixes.diff |
Description
Julian Sasse
2006-03-02 12:20:52 UTC
Created attachment 81132 [details]
Full compile log for glibc-2.3.6-r3 (failed)
unless i missed something, what you posted doesnt actually contain an error Yes ty, I feel real stupid now since I obviously used "| tee" when I should have done "2>&1 | tee". I will upload a new attachment shortly that will contain everything. In the meantime, some/all of the error text should be in comment #22 of Bug 116613: http://bugs.gentoo.org/show_bug.cgi?id=116613#c22 BTW, this is not a duplicate; I was told that my issue was different and that I should open a new bug. I think the errors involved undefined references to `_rtld_global_ro' from memset, mempcpy, etc during the linuxthreads build. Created attachment 81216 [details]
Full compile log (with errors) for glibc-2.3.6-r3
Created attachment 81230 [details]
Compile stderr output only for glibc-2.3.6-r3
This attachment has only the output that was written to stderr, so it has the warnings and errors from the whole compile in case you don't want to sift through the 26MB full output. But of course if you need to see the errors in context, you will need to look at the other attachment.
Created attachment 81233 [details, diff] Use direct GOT offsets instead of _rtld_global_ro for PIE builds This problem has been introduced by the x86_64 optimisation patch and is triggerd by the hardened compiler. It needs a similar treatment to that in bug #78951, I think. Here is an untried patch that may fix the problem - please try it out and see what happens (in a chroot or lemming system, don't try in your main system as it may hose your glibc if I've made any mistakes). Unfortunately I don't have access to an x86_64 development box so I can't really test it at the moment. Time permitting, I will try to setup a chroot in the next few days to test the patch, but perhaps there is someone else that can help test this in the meantime. Kevin: i would just go ahead and update the glibc 2.3.6 patches in cvs with your changes here ... (In reply to comment #7) > Created an attachment (id=81233) [edit] > Use direct GOT offsets instead of _rtld_global_ro for PIE builds > > This problem has been introduced by the x86_64 optimisation patch and is > triggerd by the hardened compiler. It needs a similar treatment to that in bug > #78951, I think. Here is an untried patch that may fix the problem - please > try it out and see what happens (in a chroot or lemming system, don't try in > your main system as it may hose your glibc if I've made any mistakes). > Changes are not complete -fPIC is still missing which causes hardened to fail. for tracking purposes adding amd64 herd so we can keep up with status. Same errors here: /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(strlen.o): In function `strlen': ../sysdeps/x86_64/strlen.S:(.text+0x145): undefined reference to `_rtld_global_ro' /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(memset.o): In function `memset': ../sysdeps/x86_64/memset.S:(.text+0xd3): undefined reference to `_rtld_global_ro' ../sysdeps/x86_64/memset.S:(.text+0x103): undefined reference to `_rtld_global_ro' /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(mempcpy.o): In function `mempcpy': ../sysdeps/x86_64/mempcpy.S:(.text+0x123): undefined reference to `_rtld_global_ro' ../sysdeps/x86_64/mempcpy.S:(.text+0x173): undefined reference to `_rtld_global_ro' /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(mempcpy.o):../sysdeps/x86_64/mempcpy.S:(.text+0x293): more undefined references to `_rtld_global_ro' follow collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/elf/sln] Error 1 make[2]: *** Waiting for unfinished jobs.... /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(strcpy.o): In function `strcpy': ../sysdeps/x86_64/strcpy.S:(.text+0x161): undefined reference to `_rtld_global_ro' ../sysdeps/x86_64/strcpy.S:(.text+0x29d): undefined reference to `_rtld_global_ro' /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(strlen.o): In function `strlen': ../sysdeps/x86_64/strlen.S:(.text+0x145): undefined reference to `_rtld_global_ro' /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(memset.o): In function `memset': ../sysdeps/x86_64/memset.S:(.text+0xd3): undefined reference to `_rtld_global_ro' ../sysdeps/x86_64/memset.S:(.text+0x103): undefined reference to `_rtld_global_ro' /var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/libc.a(mempcpy.o):../sysdeps/x86_64/mempcpy.S:(.text+0x123): more undefined references to `_rtld_global_ro' follow collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/glibc-2.3.6-r3/work/build-amd64-x86_64-pc-linux-gnu-linuxthreads/elf/ldconfig] Error 1 make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.6-r3/work/glibc-2.3.6/elf' make[1]: *** [elf/others] Error 2 make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.6-r3/work/glibc-2.3.6' make: *** [all] Error 2 !!! ERROR: sys-libs/glibc-2.3.6-r3 failed. Call stack: ebuild.sh, line 1933: Called dyn_compile ebuild.sh, line 971: Called src_compile glibc-2.3.6-r3.ebuild, line 1240: Called src_compile glibc-2.3.6-r3.ebuild, line 1251: Called toolchain-glibc_src_compile emerge info: Portage 2.1_pre5-r4 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.13-gentoo x86_64) ================================================================= System uname: 2.6.13-gentoo x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.0_pre16 dev-lang/python: 2.3.5, 2.4.2-r1 sys-apps/sandbox: 1.2.17 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-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -fomit-frame-pointer -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -fomit-frame-pointer -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 apache2 bash-completion berkdb bitmap-fonts crypt cups dri eds emboss encode foomaticdb fortran gif gpm gstreamer hardened imlib ipv6 jpeg lzw lzw-tiff mpeg mysql ncurses nls nptl opengl pam pdflib perl png python readline sasl sdl spell ssl tcpd tiff truetype-fonts type1-fonts unicode usb userlocales vhosts xpm xv zlib elibc_glibc kernel_linux userland_GNU" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY Thanks, Nes ok, the proposed patch doesnt work cause Kevin typoed his define checks ... -#include <rtld-global-offsets.h> +#if defined PIC && !defined SHARED +# include <rtld-global-offsets.h> +#endif that should of course be: +#if defined PIC && defined SHARED drop the '!' in other words i'll fix this up and contact the SuSE guys Created attachment 82184 [details, diff]
glibc-2.3.3-amd64-string-PIE-fixes.diff
Kevin's real work + my trivial typo fixes
ok, ive committed this to our cvs patchsets and it'll be in glibc-2.3.6-r4 *** Bug 132082 has been marked as a duplicate of this bug. *** *** Bug 132104 has been marked as a duplicate of this bug. *** *** Bug 132137 has been marked as a duplicate of this bug. *** glibc-2.3.6-r4 and glibc-2.4 should have this fixed Thanks for redirecting me here Spanky. Seems there's still an issue with the ebuild someplace for 2.3.6-r4 on amd64 rm -f /var/tmp/portage/glibc-2.3.6-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/symlink.list test ! -x /var/tmp/portage/glibc-2.3.6-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/ldconfig || LC_ALL=C LANGUAGE=C \ /var/tmp/portage/glibc-2.3.6-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/ldconfig -r /var/tmp/portage/glibc-2.3.6-r4/image/ \ /lib64 /usr/lib64 /var/tmp/portage/glibc-2.3.6-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/ldconfig: Can't open configuration file /etc/ld.so.conf: No such file or directory make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.6-r4/work/glibc-2.3.6' /var/tmp/portage/glibc-2.3.6-r4/temp/gentoo-multilib /var/tmp/portage/glibc-2.3.6-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl /var/tmp/portage/glibc-2.3.6-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl ln: creating symbolic link `/var/tmp/portage/glibc-2.3.6-r4/image//usr/lib/locale' to `/usr/lib64/locale': No such file or directory * Installing info pages... make: *** No rule to make target `info'. Stop. !!! ERROR: sys-libs/glibc-2.3.6-r4 failed. !!! Function toolchain-glibc_src_install, Line 463, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. *** Bug 132252 has been marked as a duplicate of this bug. *** (In reply to comment #20) > Thanks for redirecting me here Spanky. Seems there's still an issue with the > ebuild someplace for 2.3.6-r4 on amd64 Unrelated. File a new bug, please... (In reply to comment #22) >(In reply to comment #20) >>Thanks for redirecting me here Spanky. Seems there's still an issue with the >>ebuild someplace for 2.3.6-r4 on amd64 > >Unrelated. File a new bug, please... Done: Bug #132257 *** Bug 132685 has been marked as a duplicate of this bug. *** |