Created attachment 388308 [details] build.log This happens on timberdoodle main host. Portage 2.2.8-r2 (default/linux/powerpc/ppc64/13.0/32bit-userland, gcc-4.8.3, glibc-2.19-r1, 3.12.20-gentoo ppc64) ================================================================= System uname: Linux-3.12.20-gentoo-ppc64-POWER7_-architected-with-gentoo-2.2 KiB Mem: 16514732 total, 2575028 free KiB Swap: 7814548 total, 7805980 free Timestamp of tree: Sun, 02 Nov 2014 06:00:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 app-shells/bash: 4.2_p53 dev-lang/perl: 5.18.2-r2 dev-lang/python: 2.7.7, 3.3.5-r1, 3.4.1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.13.4 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.7.3-r1, 4.8.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.13 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo ACCEPT_KEYWORDS="ppc" ACCEPT_LICENSE="* -@EULA" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -pipe" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/spool/munin-async/.ssh" 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" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distfiles.gentoo.org" LANG="it_IT.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j24" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://bobolink.gentoo.osuosl.org/gentoo-portage" USE="acl berkdb bzip2 cli cracklib crypt cxx dri fortran gcc64 gdbm iconv ipv6 modules ncurses nptl openmp pam pcre ppc readline session ssl tcpd unicode zlib" ABI_PPC="32" ELIBC="glibc" KERNEL="linux" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" USERLAND="GNU" USE_PYTHON="2.7"
This occurred on a fresh install on a powerbook G4 for me.
*** Bug 531754 has been marked as a duplicate of this bug. ***
*** Bug 531756 has been marked as a duplicate of this bug. ***
Actually this can be worked around by compiling and linking: sys-fs/e2fsprogs sys-fs/e2fsprogs-libs sys-boot/yaboot with: CFLAGS="-fno-stack-protector" LDFLAGS="-fno-stack-protector" ( as can be done using /usr/portage/env ... ) stack protection is the default in recent gcc and hence the bug. As yaboot is the only bootloader for this platform it should be disabled in these ebuilds by default i guess.
(In reply to Thomas Haschka from comment #4) > Actually this can be worked around by compiling and linking: > > sys-fs/e2fsprogs > sys-fs/e2fsprogs-libs > sys-boot/yaboot > > with: > CFLAGS="-fno-stack-protector" > LDFLAGS="-fno-stack-protector" > > ( as can be done using /usr/portage/env ... ) > > stack protection is the default in recent gcc and hence the bug. As yaboot > is the only bootloader for this platform it should be disabled in these > ebuilds by default i guess. It worked for me as a workaround, but I just don't need sys-fs/e2fsprogs-libs with -fno-stack-protector.
Dear base-system, to fix it we need sys-fs/e2fsprogs compiled without stack-protection. Apart make something like an IUSE nossp which compiles without stack-protection, do you have suggestions on how to handle it?
Maybe one should be just be pragmatic and just add the required cflags to the ebuilds. i.e. CFLAGS="{$CFLAGS} -fno-stack-protection" LDFLAGS... I don't see why this should hurt to much
-fno-stack-protector , my excuses
(In reply to Agostino Sarubbo from comment #6) that won't really solve the problem, just push it down until the next failure. if yaboot wants to use code compiled for Linux userland, then it should provide stubs for the pieces that code expects. simply update yaboot to provide a __stack_chk_fail stub.
I'll see if i can file a bug upstream, I just think that a pragmatic solution should be found as yaboot is the "only" reasonable boot manager for newworld macs. In my opinion not being able to install a boot manager at the end of a successful gentoo install (without quirks), is probably a major bummer for any gentoo newcomer on PPC.
(In reply to Thomas Haschka from comment #10) the pragmatic solution is to deploy my suggested stub into the yaboot package. it's like one line of code in the right file.
I don't know if it's a good idea to add this here or if I should have opened a new bug instead, but when trying to install yaboot-1.3.17-r2 on a system that has sys-fs/e2fsprogs-1.42.12 and sys-libs/e2fsprogs-libs-1.42.12 (with -fno-stack-protector) installed, I get this: gcc -Os -fno-stack-protector -Wall -I/usr/include -Wno-error -fdiagnostics-show-option -o util/addnote util/addnote.c ld -Ttext 0x100000 -Bstatic -melf32ppclinux second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o second/fs_of.o second/fs_ext2.o second/fs_iso.o second/fs_swap.o second/iso_util.o lib/nonstd.o lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o lib/ssp.o second/md5.o second/fs_xfs.o second/fs_reiserfs.o -lext2fs `gcc -m32 -print-libgcc-file-name` -o second/yaboot /usr/lib/libext2fs.a(unix_io.o): In function `raw_write_blk': (.text+0x1a4): undefined reference to `pwrite64' /usr/lib/libext2fs.a(unix_io.o): In function `raw_read_blk': (.text+0x630): undefined reference to `pread64' Makefile:112: recipe for target 'yaboot' failed make: *** [yaboot] Error 1 Masking version 1.42.12 of the two e2fs packages and letting portage take version 1.42.11 instead works fine - yaboot will then build nicely.
(In reply to Nils Holland from comment #12) file a new report please
(In reply to SpanKY from comment #9) > (In reply to Agostino Sarubbo from comment #6) > > that won't really solve the problem, just push it down until the next > failure. if yaboot wants to use code compiled for Linux userland, then it > should provide stubs for the pieces that code expects. simply update yaboot > to provide a __stack_chk_fail stub. i remember doing this long ago (when my g5 used to work ~2009) and it worked just fine. i don't remember if i published it, but it was just a trivial function like void __stack_chk_fail() { }
Created attachment 403388 [details, diff] Updated stub function patch Here's an updated stub function patch that implements a stub for __stack_chk_fail and wraps pread64/pwrite64 to OF PROM functions. For testing, just copy this over the current stub function patch and re-build. I got a "new" PB G4 to test this on, but it won't be ready to go for a little while, so a little help testing (beyond the compile testing I did) would be appreciated!
Created attachment 403390 [details, diff] Updated the stub function patch again Sorry, I forgot to include the malloc patch as well in the previous patch. This version should be okay!
Created attachment 403392 [details, diff] Fixed the stubfuncs patch Sorry, hopefully the last time. I had a malformed patch with the last submission.
*** Bug 544688 has been marked as a duplicate of this bug. ***
Created attachment 403416 [details, diff] Updated stub function patch Sorry, another change!
Created attachment 403418 [details, diff] Updated stub function patch
Created attachment 403420 [details, diff] Updated stub function patch Updated again for a typo.
The patch works here for sys-boot/yaboot-1.3.17-r2 on ppc (PowerBook G4 867 MHz).
Commit message: Drop support for ssp found in gcc-3 and older http://sources.gentoo.org/sys-boot/yaboot/yaboot-1.3.14-r2.ebuild?r1=1.10&r2=1.11 http://sources.gentoo.org/sys-boot/yaboot/yaboot-1.3.16.ebuild?r1=1.10&r2=1.11 http://sources.gentoo.org/sys-boot/yaboot/yaboot-1.3.17-r2.ebuild?r1=1.7&r2=1.8
Commit message: Add stub func for newer ssp builds http://sources.gentoo.org/sys-boot/yaboot/files/yaboot-1.3.17-nopiessp-gcc4.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/sys-boot/yaboot/files/yaboot-nopiessp-gcc4.patch?r1=1.1&r2=1.2
Comment on attachment 403420 [details, diff] Updated stub function patch the pwrite/pread stubs are wrong. you have to handle the offset field.
should be all set now in the tree; thanks for the report! Commit message: Add pread/pwrite stubs that newer ext2 libs use http://sources.gentoo.org/sys-boot/yaboot/files/yaboot-stubfuncs.patch?r1=1.3&r2=1.4 http://sources.gentoo.org/sys-boot/yaboot/yaboot-1.3.17-r2.ebuild?r1=1.8&r2=1.9
The fix in the tree does not compile. powerpc-unknown-linux-gnu-ld -Ttext 0x100000 -Bstatic -melf32ppclinux second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o second/fs_of.o second/fs_ext2.o second/fs_iso.o second/fs_swap.o second/iso_util.o lib/nonstd.o lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o lib/ssp.o second/md5.o second/fs_xfs.o second/fs_reiserfs.o -lext2fs `powerpc-unknown-linux-gnu-gcc -m32 -print-libgcc-file-name` -o second/yaboot /usr/lib/libext2fs.a(unix_io.o): In function `unix_open': (.text+0x1428): undefined reference to `fcntl' Makefile:112: recipe for target 'yaboot' failed make: *** [yaboot] Error 1
Commit message: Also stub out fcntl http://sources.gentoo.org/sys-boot/yaboot/files/yaboot-stubfuncs.patch?r1=1.4&r2=1.5
Thanks, now it compiles from the tree as well!