Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390865 - hardened Stage1 building is dying on glibc merge
Summary: hardened Stage1 building is dying on glibc merge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 19:35 UTC by Jorge Manuel B. S. Vicetto
Modified: 2011-11-20 04:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Crompressed log for amd64 hardened stage1 build (amd64-hardened-multilib.bz2,94.34 KB, application/octet-stream)
2011-11-17 19:37 UTC, Jorge Manuel B. S. Vicetto (RETIRED)
Details
Crompressed log for x86 hardened stage1 build (x86-hardened-stage1.bz2,95.00 KB, application/octet-stream)
2011-11-17 19:37 UTC, Jorge Manuel B. S. Vicetto (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-11-17 19:35:43 UTC
The build fails on hardened x86 with:

mv -f /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/rtld-libc.aT /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/rtld-libc.a
make[3]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf'
i686-pc-linux-gnu-gcc  -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -r -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os '-Wl,-(' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/dl-allobjs.os /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/rtld-libc.a -lgcc '-Wl,-)' \
          -Wl,-Map,/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os.map
i686-pc-linux-gnu-gcc  -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -shared -Wl,-z,now      \
          -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,--verbose 2>&1 |        \
          LC_ALL=C \
          sed -e '/^=========/,/^=========/!d;/^=========/d'    \
              -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
          > /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so.lds
i686-pc-linux-gnu-gcc  -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -shared -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so                   \
          -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,-z,now  \
          /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os -Wl,--version-script=/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/ld.map          \
          -Wl,-soname=ld-linux.so.2 -T /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so.lds
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `_dl_initial_error_catch_tsd':
(.text+0xa6): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_lock_recursive':
rtld.c:(.text+0xd8): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_unlock_recursive':
rtld.c:(.text+0x108): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `lookup_doit':
rtld.c:(.text+0x193): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `dlmopen_doit':
rtld.c:(.text+0x21c): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os:rtld.c:(.text+0x7f6): more undefined references to `__stack_chk_fail_local' follow
/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2'
make: *** [all] Error 2
emake failed
 * ERROR: sys-libs/glibc-2.12.2 failed (compile phase):


and fails on amd64 multilib hardened with:

mv -f /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/rtld-libc.aT /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/rtld-libc.a
make[3]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf'
x86_64-pc-linux-gnu-gcc -m32 -march=x86_64 -march=x86_64 -march=i686 -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -r -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/
elf/librtld.os '-Wl,-(' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/dl-allobjs.os /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf
/rtld-libc.a -lgcc '-Wl,-)' \
          -Wl,-Map,/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os.map
x86_64-pc-linux-gnu-gcc -m32 -march=x86_64 -march=x86_64 -march=i686 -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -shared -Wl,-z,now        \
          -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,--verbose 2>&1 |        \
          LC_ALL=C \
          sed -e '/^=========/,/^=========/!d;/^=========/d'    \
              -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
          > /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so.lds
x86_64-pc-linux-gnu-gcc -m32 -march=x86_64 -march=x86_64 -march=i686 -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -shared -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-
nptl/elf/ld.so                       \
          -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,-z,now  \
          /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os -Wl,--version-script=/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl
/ld.map              \
          -Wl,-soname=ld-linux.so.2 -T /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so.lds
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `_dl_initial_error_catch_tsd':
(.text+0xa6): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_lock_recursive':
rtld.c:(.text+0xd8): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_unlock_recursive':
rtld.c:(.text+0x108): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `lookup_doit':
rtld.c:(.text+0x193): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `dlmopen_doit':
rtld.c:(.text+0x21c): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os:rtld.c:(.text+0x830): more undefined references to `__stack_chk_fail_local' follow
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so: hidden symbol `__stack_chk_fail_lo
cal' isn't defined
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2'
make: *** [all] Error 2
emake failed
 * ERROR: sys-libs/glibc-2.12.2 failed (compile phase):
Comment 1 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-11-17 19:37:08 UTC
Created attachment 292939 [details]
Crompressed log for amd64 hardened stage1 build
Comment 2 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-11-17 19:37:30 UTC
Created attachment 292941 [details]
Crompressed log for x86 hardened stage1 build
Comment 3 SpanKY gentoo-dev 2011-11-17 21:27:54 UTC
ok, i missed that you were building for hardened when we talked on irc

your USE is buggered:
USE:        amd64 build elibc_glibc kernel_linux multilib userland_GNU

seems to be missing pic/hardened/etc...
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-11-18 20:46:49 UTC
After looking more carefully, it seems the issue was caused by the rename of STAGE1_USE to BOOTSTRAP_USE as catalyst also used it for stage1.
I've took this chance to update catalyst and make it use BOOTSTRAP_USE and dropped cxx from stage1 target as it's picked up from BOOTSTRAP_USE.
I've bumped catalyst in the tree[1] and will run some tests tonight to confirm if the issue is fixed. I'll leave the bug open until I get the results.

 [1] - http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/catalyst/catalyst-2.0.7.ebuild?view=log
Comment 5 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-11-20 04:05:30 UTC
This issue was fixed on catalyst-2.0.7.1[1], [2].

 [1] - http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=shortlog;h=refs/tags/CATALYST-2.0.7.1
 [2] - http://www.jmbsvicetto.name/releases/amd64/hardened/20111119/