Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641560 - sys-boot/yaboot cannot be compiled for Gentoo 17 with gcc 6.4
Summary: sys-boot/yaboot cannot be compiled for Gentoo 17 with gcc 6.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal blocker with 1 vote (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-18 13:37 UTC by Paul Osmialowski
Modified: 2019-04-18 06:33 UTC (History)
6 users (show)

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


Attachments
emerge --info (ppcinfo.txt,9.39 KB, text/plain)
2017-12-18 13:39 UTC, Paul Osmialowski
Details
24.02.2019 ppc: emerge --info (file_641560.txt,5.21 KB, text/plain)
2019-02-24 19:58 UTC, xela
Details
24.02.2019 ppc: link failed (file_641560.txt,13.00 KB, text/plain)
2019-02-24 19:59 UTC, xela
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Osmialowski 2017-12-18 13:37:16 UTC
I've tried to upgrade my PPC Gentoo system to default/linux/powerpc/ppc32/17.0. The very last step is the world rebuild. Unfortunately, it can't be finished as yaboot can't be compiled with gcc 6.4.0. This package is vital for the PPC system, so its removal is not an option.


Reproducible: Always

Steps to Reproduce:
1. eselect profile set default/linux/powerpc/ppc32/17.0
2. emerge -e @world
3. wait for a crash
Actual Results:  
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(gen_bitmap.o): In function `ext2fs_test_generic_bitmap':
gen_bitmap.c:(.text+0x39c): multiple definition of `ext2fs_test_generic_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xc0c): first defined here
/usr/lib/libext2fs.a(gen_bitmap.o): In function `ext2fs_test_block_bitmap_range':
gen_bitmap.c:(.text+0x11e0): multiple definition of `ext2fs_test_block_bitmap_range'
second/fs_ext2.o:fs_ext2.c:(.text+0xeb8): first defined here
/usr/lib/libext2fs.a(gen_bitmap.o): In function `ext2fs_mark_block_bitmap_range':
gen_bitmap.c:(.text+0x1320): multiple definition of `ext2fs_mark_block_bitmap_range'
second/fs_ext2.o:fs_ext2.c:(.text+0xfa8): first defined here
/usr/lib/libext2fs.a(gen_bitmap.o): In function `ext2fs_unmark_block_bitmap_range':
gen_bitmap.c:(.text+0x13d0): multiple definition of `ext2fs_unmark_block_bitmap_range'
second/fs_ext2.o:fs_ext2.c:(.text+0x1094): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_mark_block_bitmap':
inline.c:(.text+0x144): multiple definition of `ext2fs_mark_block_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xc6c): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_unmark_block_bitmap':
inline.c:(.text+0x17c): multiple definition of `ext2fs_unmark_block_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xc98): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_test_block_bitmap':
inline.c:(.text+0x1b4): multiple definition of `ext2fs_test_block_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xcc4): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_mark_inode_bitmap':
inline.c:(.text+0x1ec): multiple definition of `ext2fs_mark_inode_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xcdc): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_unmark_inode_bitmap':
inline.c:(.text+0x224): multiple definition of `ext2fs_unmark_inode_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xd08): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_test_inode_bitmap':
inline.c:(.text+0x25c): multiple definition of `ext2fs_test_inode_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xd34): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_mark_block_bitmap':
inline.c:(.text+0x294): multiple definition of `ext2fs_fast_mark_block_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xd88): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_unmark_block_bitmap':
inline.c:(.text+0x2cc): multiple definition of `ext2fs_fast_unmark_block_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xddc): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_test_block_bitmap':
inline.c:(.text+0x304): multiple definition of `ext2fs_fast_test_block_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xe30): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_mark_inode_bitmap':
inline.c:(.text+0x33c): multiple definition of `ext2fs_fast_mark_inode_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xd4c): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_unmark_inode_bitmap':
inline.c:(.text+0x374): multiple definition of `ext2fs_fast_unmark_inode_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xda0): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_test_inode_bitmap':
inline.c:(.text+0x3ac): multiple definition of `ext2fs_fast_test_inode_bitmap'
second/fs_ext2.o:fs_ext2.c:(.text+0xdf4): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_get_block_bitmap_start':
inline.c:(.text+0x3e4): multiple definition of `ext2fs_get_block_bitmap_start'
second/fs_ext2.o:fs_ext2.c:(.text+0xe48): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_get_inode_bitmap_start':
inline.c:(.text+0x41c): multiple definition of `ext2fs_get_inode_bitmap_start'
second/fs_ext2.o:fs_ext2.c:(.text+0xe64): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_get_block_bitmap_end':
inline.c:(.text+0x454): multiple definition of `ext2fs_get_block_bitmap_end'
second/fs_ext2.o:fs_ext2.c:(.text+0xe80): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_get_inode_bitmap_end':
inline.c:(.text+0x48c): multiple definition of `ext2fs_get_inode_bitmap_end'
second/fs_ext2.o:fs_ext2.c:(.text+0xe9c): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_test_block_bitmap_range':
inline.c:(.text+0x4c4): multiple definition of `ext2fs_fast_test_block_bitmap_range'
second/fs_ext2.o:fs_ext2.c:(.text+0xf50): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_mark_block_bitmap_range':
inline.c:(.text+0x4fc): multiple definition of `ext2fs_fast_mark_block_bitmap_range'
second/fs_ext2.o:fs_ext2.c:(.text+0x1038): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_fast_unmark_block_bitmap_range':
inline.c:(.text+0x534): multiple definition of `ext2fs_fast_unmark_block_bitmap_range'
second/fs_ext2.o:fs_ext2.c:(.text+0x1124): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_get_mem':
inline.c:(.text+0xbec): multiple definition of `ext2fs_get_mem'
second/fs_ext2.o:fs_ext2.c:(.text+0x1180): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_free_mem':
inline.c:(.text+0xdb8): multiple definition of `ext2fs_free_mem'
second/fs_ext2.o:fs_ext2.c:(.text+0x11c8): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_resize_mem':
inline.c:(.text+0xe0c): multiple definition of `ext2fs_resize_mem'
second/fs_ext2.o:fs_ext2.c:(.text+0x1208): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_mark_super_dirty':
inline.c:(.text+0xe84): multiple definition of `ext2fs_mark_super_dirty'
second/fs_ext2.o:fs_ext2.c:(.text+0x125c): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_mark_changed':
inline.c:(.text+0xea4): multiple definition of `ext2fs_mark_changed'
second/fs_ext2.o:fs_ext2.c:(.text+0x1280): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_test_changed':
inline.c:(.text+0xec4): multiple definition of `ext2fs_test_changed'
second/fs_ext2.o:fs_ext2.c:(.text+0x12a4): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_mark_valid':
inline.c:(.text+0xee0): multiple definition of `ext2fs_mark_valid'
second/fs_ext2.o:fs_ext2.c:(.text+0x12c4): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_unmark_valid':
inline.c:(.text+0xf00): multiple definition of `ext2fs_unmark_valid'
second/fs_ext2.o:fs_ext2.c:(.text+0x12e8): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_test_valid':
inline.c:(.text+0xf20): multiple definition of `ext2fs_test_valid'
second/fs_ext2.o:fs_ext2.c:(.text+0x130c): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_mark_ib_dirty':
inline.c:(.text+0xf3c): multiple definition of `ext2fs_mark_ib_dirty'
second/fs_ext2.o:fs_ext2.c:(.text+0x132c): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_mark_bb_dirty':
inline.c:(.text+0xf5c): multiple definition of `ext2fs_mark_bb_dirty'
second/fs_ext2.o:fs_ext2.c:(.text+0x1350): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_test_ib_dirty':
inline.c:(.text+0xf7c): multiple definition of `ext2fs_test_ib_dirty'
second/fs_ext2.o:fs_ext2.c:(.text+0x1374): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_test_bb_dirty':
inline.c:(.text+0xf98): multiple definition of `ext2fs_test_bb_dirty'
second/fs_ext2.o:fs_ext2.c:(.text+0x1394): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_group_of_blk':
inline.c:(.text+0xfb4): multiple definition of `ext2fs_group_of_blk'
second/fs_ext2.o:fs_ext2.c:(.text+0x13b4): first defined here
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_group_of_ino':
inline.c:(.text+0xff4): multiple definition of `ext2fs_group_of_ino'
second/fs_ext2.o:fs_ext2.c:(.text+0x13e0): first defined here
/usr/lib/libext2fs.a(mkjournal.o): In function `ext2fs_add_journal_device':
mkjournal.c:(.text+0x53c): undefined reference to `__xstat'
/usr/lib/libext2fs.a(mkjournal.o): In function `ext2fs_add_journal_inode2':
mkjournal.c:(.text+0x87c): undefined reference to `__strcat_chk'
mkjournal.c:(.text+0xb7c): undefined reference to `__fxstat'
/usr/lib/libext2fs.a(blkmap64_rb.o): In function `rb_insert_extent':
blkmap64_rb.c:(.text+0x122c): undefined reference to `abort'
/usr/lib/libext2fs.a(ismounted.o): In function `is_swap_device':
ismounted.c:(.text+0x60): undefined reference to `__xstat'
ismounted.c:(.text+0x8c): undefined reference to `fopen'
ismounted.c:(.text+0xa8): undefined reference to `fgets'
ismounted.c:(.text+0x12c): undefined reference to `fclose'
ismounted.c:(.text+0x188): undefined reference to `__xstat'
ismounted.c:(.text+0x1c8): undefined reference to `fgets'
/usr/lib/libext2fs.a(ismounted.o): In function `check_mntent_file':
ismounted.c:(.text+0x278): undefined reference to `setmntent'
ismounted.c:(.text+0x294): undefined reference to `__xstat'
ismounted.c:(.text+0x2cc): undefined reference to `getmntent'
ismounted.c:(.text+0x308): undefined reference to `__xstat'
ismounted.c:(.text+0x358): undefined reference to `__xstat'
ismounted.c:(.text+0x380): undefined reference to `endmntent'
ismounted.c:(.text+0x50c): undefined reference to `__xstat'
ismounted.c:(.text+0x57c): undefined reference to `hasmntopt'
ismounted.c:(.text+0x5f8): undefined reference to `unlink'
ismounted.c:(.text+0x614): undefined reference to `__xstat'
/usr/lib/libext2fs.a(ismounted.o): In function `ext2fs_check_mount_point':
ismounted.c:(.text+0x75c): undefined reference to `__xstat'
/usr/lib/libext2fs.a(unix_io.o): In function `unix_cache_readahead':
unix_io.c:(.text+0x198): undefined reference to `posix_fadvise64'
/usr/lib/libext2fs.a(unix_io.o): In function `safe_getenv':
unix_io.c:(.text+0xcb0): undefined reference to `geteuid'
unix_io.c:(.text+0xcbc): undefined reference to `getgid'
unix_io.c:(.text+0xcc4): undefined reference to `getegid'
unix_io.c:(.text+0xce8): undefined reference to `prctl'
unix_io.c:(.text+0xcf8): undefined reference to `secure_getenv'
/usr/lib/libext2fs.a(unix_io.o): In function `unix_open_channel':
unix_io.c:(.text+0x108c): undefined reference to `setrlimit64'
unix_io.c:(.text+0x1098): undefined reference to `getrlimit64'
unix_io.c:(.text+0x10c0): undefined reference to `setrlimit64'
/usr/lib/libext2fs.a(unix_io.o): In function `unix_zeroout':
unix_io.c:(.text+0x1304): undefined reference to `ftruncate64'
unix_io.c:(.text+0x1360): undefined reference to `fallocate64'
unix_io.c:(.text+0x13bc): undefined reference to `fallocate64'
/usr/lib/libext2fs.a(unix_io.o): In function `unix_discard':
unix_io.c:(.text+0x1584): undefined reference to `fallocate64'
make: *** [Makefile:112: yaboot] Error 1

Expected Results:  
yaboot compiled for the new profile.

[ebuild   R    ] sys-fs/e2fsprogs-1.43.6::gentoo  USE="nls static-libs -fuse" 0 KiB
Comment 1 Paul Osmialowski 2017-12-18 13:39:35 UTC
Created attachment 510722 [details]
emerge --info

Added as a file since it makes bug report too big to accept.
Comment 2 Jonas Stein gentoo-dev 2017-12-18 14:44:23 UTC
you can simply attach the build.log next time 
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-03-27 22:11:10 UTC
As a last resort workaround there is sys-boot/yaboot-static precompiled binary.

I had a glance at this bug today. The failure is probably caused by newer version of sys-fs/e2fsprogs. Some symbols collide with bundled copy of ext2 and some are missing as sys-fs/e2fsprogs pulls in libc.

I think we should go ahead and bundle a bit more pieces from e2fsprogs and drop link-time dependency on a library.
Comment 4 Olivier Néumin 2019-01-15 14:11:27 UTC
More than 1 year since this bug was filed and still no real solution so far ...

I just wanted to point to a working work-around by downgrading to 'sys-fs/e2fsprogs-1.42.13' that was posted here: "https://forums.gentoo.org/viewtopic-p-8028040.html#8028040".

1. Get 'sys-fs/e2fsprogs-1.42.13' from here: "https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/e2fsprogs?id=158b6e620049ed2728440a0213978967bb0e26ce"

2. yaboot requires 'sys-fs/e2fsprogs' to be built with the static-libs use flag, so add this to /etc/portage/package.use:
"=sys-fs/e2fsprogs-1.42.13 static-libs"

3. Build 'sys-fs/e2fsprogs':
"ebuild e2fsprogs-1.42.13.ebuild manifest clean merge"

4. To prevent upgrading package 'sys-fs/e2fsprogs' >v1.42.13 mask later versions by adding this to /etc/portage/package.mask:
">sys-fs/e2fsprogs-1.42.13"
Comment 5 Matt Turner gentoo-dev 2019-01-16 01:09:37 UTC
(In reply to Olivier Néumin from comment #4)
> More than 1 year since this bug was filed and still no real solution so far
> ...

The solution I took to build the new PPC installation CDs was... to use sys-boot/grub instead.

We don't have any instructions on installing grub on PPC yet, but I used some links Google found for me.

I strongly forgetting about yaboot.
Comment 6 Larry the Git Cow gentoo-dev 2019-01-16 22:13:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80e699db21db9352bb9d309c6c9056ffb1902c69

commit 80e699db21db9352bb9d309c6c9056ffb1902c69
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-01-16 22:13:26 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-01-16 22:13:35 +0000

    sys-boot/yaboot: bundle e2fsprogs-1.42.13, bug #641560
    
    By default yaboot setup is unusual: it provides it's own
    ext2fs headers and links against systems' ext2fs code.
    
    That occasionally breaks when ext2fs.a gets too much out
    of sync with expected interface. Pin it to something that
    was observed to work by Olivier Néumin.
    
    Reported-by: Paul Osmialowski
    Bug: https://bugs.gentoo.org/641560
    Package-Manager: Portage-2.3.56, Repoman-2.3.12
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-boot/yaboot/Manifest                           |   1 +
 .../files/e2fsprogs-1.42.13-sysmacros.h.patch      |  85 ++++++++++++++++
 sys-boot/yaboot/yaboot-1.3.17-r3.ebuild            | 112 +++++++++++++++++++++
 3 files changed, 198 insertions(+)
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-01-16 22:18:45 UTC
I attempted to bundle e2fsprogs-1.42.13 with yaboot.

It compiles for me in cross-environment but someone should try to boot the machine for real with it. Chances are I've completely destroyed yaboot.

+1 for trying grub instead.
Comment 8 Paul Osmialowski 2019-01-25 10:31:32 UTC
Did anyone actually booted it before marking this RESOLVED FIXED?! Nowadays I have only on-line access to both of those machines still in operation, I can't risk making them non(re)bootable...
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-01-25 22:25:11 UTC
Nobody reported any attempts so far to try.
Comment 10 xela 2019-02-24 19:58:27 UTC
Created attachment 566374 [details]
24.02.2019 ppc: emerge --info
Comment 11 xela 2019-02-24 19:59:47 UTC
Created attachment 566376 [details]
24.02.2019 ppc: link failed
Comment 12 xela 2019-02-24 20:03:12 UTC
Unfortunately it still doesn't build. I've attached an excerpt of emerge log and emerge --info output. I can install yaboot-static though, but it doesn't work – it cannot find kernel image. I've seen multiple reports that it cannot boot from ext4 and I suspect I'm hitting this too – I have single partition in ext4.

I also have both e2fsprogs with "static-libs" USE enabled:
# eix e2fs     
[I] sys-fs/e2fsprogs
     Available versions:  1.43.6 1.43.9 ~1.44.4 1.44.5 {fuse nls static-libs ELIBC="FreeBSD"}
     Installed versions:  1.44.5(04:21:35 02/24/19)(nls static-libs -fuse ELIBC="-FreeBSD")
     Homepage:            http://e2fsprogs.sourceforge.net/
     Description:         Standard EXT2/EXT3/EXT4 filesystem utilities

[I] sys-libs/e2fsprogs-libs
     Available versions:  1.43.6 1.43.9 ~1.44.4 1.44.5 {nls static-libs ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  1.44.5(05:33:10 02/24/19)(static-libs ABI_MIPS="-n32 -n64 -o32" ABI_PPC="32 -64" ABI_S390="-32 -64" ABI_X86="-32 -64 -x32")
     Homepage:            http://e2fsprogs.sourceforge.net/
     Description:         e2fsprogs libraries (common error and subsystem)

Found 2 matches
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-24 20:42:37 UTC
(In reply to xela from comment #11)
> Created attachment 566376 [details]
> 24.02.2019 ppc: link failed
> ...
> * ERROR: sys-boot/yaboot-1.3.17-r2::gentoo failed (compile phase):

#comment6 says fix was committed only to sys-boot/yaboot/yaboot-1.3.17-r3. Please test that one.
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-24 21:11:22 UTC
(In reply to xela from comment #12)
> I can install yaboot-static though, but it doesn't
> work – it cannot find kernel image. I've seen multiple reports that it
> cannot boot from ext4 and I suspect I'm hitting this too – I have single
> partition in ext4.

Yeah, you will need ext2 for yaboot. Or you could try grub2 (sorry, I don't have a ppc-specific howto link at hand)
Comment 15 xela 2019-02-24 21:13:29 UTC
Just tried, it looks like it can link now, though error is different:

powerpc-unknown-linux-gnu-ld -L/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/temp/bundled-deps/usr/lib -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 -std=gnu90 -m32 -print-libgcc-file-name` -o second/yaboot
chmod -x second/yaboot
cp second/yaboot second/yaboot.chrp
util/addnote second/yaboot.chrp
sorry, I can't find space in second/yaboot.chrp to put the note
make: *** [Makefile:115: yaboot] Error 1
 * ERROR: sys-boot/yaboot-1.3.17-r3::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/yaboot-1.3.17-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/yaboot-1.3.17-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/work/yaboot-1.3.17'
 * S: '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/work/yaboot-1.3.17'
Comment 16 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-24 21:31:56 UTC
(In reply to xela from comment #15)
> Just tried, it looks like it can link now, though error is different:
> 
> powerpc-unknown-linux-gnu-ld
> -L/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/temp/bundled-deps/usr/lib
> -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 -std=gnu90 -m32
> -print-libgcc-file-name` -o second/yaboot
> chmod -x second/yaboot
> cp second/yaboot second/yaboot.chrp
> util/addnote second/yaboot.chrp
> sorry, I can't find space in second/yaboot.chrp to put the note
> make: *** [Makefile:115: yaboot] Error 1
>  * ERROR: sys-boot/yaboot-1.3.17-r3::gentoo failed (compile phase):
>  *   emake failed
>  * 
>  * If you need support, post the output of `emerge --info
> '=sys-boot/yaboot-1.3.17-r3::gentoo'`,
>  * the complete build log and the output of `emerge -pqv
> '=sys-boot/yaboot-1.3.17-r3::gentoo'`.
>  * The complete build log is located at
> '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/temp/build.log'.
>  * The ebuild environment file is located at
> '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/temp/environment'.
>  * Working directory:
> '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/work/yaboot-1.3.17'
>  * S: '/var/tmp/portage/sys-boot/yaboot-1.3.17-r3/work/yaboot-1.3.17'

Please file a new bug with full build.log attached. We'll try to sort it there.
Comment 17 xela 2019-02-24 21:45:07 UTC
Solved compilation issue by switching back to default linker (I was using gold). Is gold considered stable? (I mean, if it's experimental not sure if it worth the bug)
Comment 18 xela 2019-02-24 22:18:48 UTC
Created a bug: https://bugs.gentoo.org/678710
Comment 19 xela 2019-02-24 23:55:06 UTC
Also, while it compiles now, it doesn't work – gives error about corrupted filesystem, though I've made separate /boot with ext2. I was able to boot successfully with yaboot-static only
Comment 20 John Ogness 2019-04-18 06:33:54 UTC
Since several people have mentioned grub2, I'd just like to mention that there is good information about installing grub2 on the PPC bootloader discussion page:

https://wiki.gentoo.org/wiki/Handbook_Talk:PPC/Installation/Bootloader

In particular, the guide from Dusxmt is excellent. Hopefully that can be added to the manual at some point.