Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835640 - sys-boot/yaboot-1.3.17-r4: fails to compile under GCC 10
Summary: sys-boot/yaboot-1.3.17-r4: fails to compile under GCC 10
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal major with 2 votes (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: -fno-common
  Show dependency tree
 
Reported: 2022-03-19 23:13 UTC by Guy Lowe
Modified: 2023-01-24 11:01 UTC (History)
3 users (show)

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


Attachments
Patch to fix compilation of sys-boot/yaboot-1.3.17-r4 under GCC 11 (yaboot-1.3.17-gcc10-extern.patch,2.54 KB, patch)
2022-03-19 23:14 UTC, Guy Lowe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Lowe 2022-03-19 23:13:35 UTC
Fails to compile under GCC 11 due to definitions of fserrorno and errornum in multiple files - see bug 705764  and https://wiki.gentoo.org/wiki/Project:Toolchain/Gcc_10_porting_notes/fno_common . The ebuild strips CFLAGS, so -fcommon doesn't help either.

Patch attached.



Reproducible: Always

Steps to Reproduce:
emerge sys-boot/yaboot
Actual Results:  

powerpc-unknown-linux-gnu-ld -L/var/tmp/portage/sys-boot/yaboot-1.3.17-r4/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
powerpc-unknown-linux-gnu-ld: second/file.o:(.sbss+0x0): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
powerpc-unknown-linux-gnu-ld: second/fs.o:(.sbss+0x0): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
powerpc-unknown-linux-gnu-ld: second/fs_of.o:(.sbss+0x0): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
powerpc-unknown-linux-gnu-ld: second/fs_ext2.o:(.sbss+0x0): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
powerpc-unknown-linux-gnu-ld: second/fs_iso.o:(.sbss+0x0): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
powerpc-unknown-linux-gnu-ld: second/fs_swap.o:(.sbss+0x0): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
powerpc-unknown-linux-gnu-ld: second/fs_xfs.o:(.sbss+0x14): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
powerpc-unknown-linux-gnu-ld: second/fs_reiserfs.o:(.sbss+0x0): multiple definition of `errnum'; second/fs_xfs.o:(.sbss+0x0): first defined here
powerpc-unknown-linux-gnu-ld: second/fs_reiserfs.o:(.sbss+0x4): multiple definition of `fserrorno'; second/yaboot.o:(.sbss+0x18): first defined here
make: *** [Makefile:112: yaboot] Error 1
 * ERROR: sys-boot/yaboot-1.3.17-r4::gentoo failed (compile phase):
 *   emake failed

Expected Results:  
Compile successfully

Portage 3.0.28 (python 3.9.9-final-0, default/linux/ppc/17.0/desktop, gcc-11.2.0, glibc-2.33-r7, 5.15.16-gentoo-ppc32-ppc ppc)
=================================================================
System uname: Linux-5.15.16-gentoo-ppc32-ppc-ppc-7455,_altivec_supported-with-glibc2.33
KiB Mem:      630844 total,     75048 free
KiB Swap:    1048572 total,   1042892 free
Timestamp of repository gentoo: Sat, 19 Mar 2022 04:45:01 +0000
Head commit of repository gentoo: e9a5aa114a86f922264d686b4ca900ae277288c3
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p8::gentoo
dev-lang/perl:             5.34.0-r6::gentoo
dev-lang/python:           3.9.9-r1::gentoo, 3.10.0_p1-r1::gentoo
dev-util/meson:            0.60.3::gentoo
sys-apps/baselayout:       2.7-r3::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.25::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.4::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/gcc:             11.2.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.au.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

x-local
    location: /usr/local/portage/local
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="@FREE linux-fw-redistributable @FREE"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
GENTOO_MIRRORS="https://mirror.aarnet.edu.au/pub/gentoo/ https://mirror.rackspace.com/gentoo/ http://ftp.swin.edu.au/gentoo"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl alsa big-endian bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gtk gui iconv icu ipv6 jpeg kde lcms libglvnd libnotify mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppc ppds qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev mga nv r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Guy Lowe 2022-03-19 23:14:31 UTC
Created attachment 767411 [details, diff]
Patch to fix compilation of sys-boot/yaboot-1.3.17-r4 under GCC 11
Comment 2 Guy Lowe 2022-03-20 01:34:00 UTC
Upstream PR opened at https://github.com/yaboot/yaboot/pull/2
Comment 3 Thomas Zimmermann 2022-06-17 19:05:14 UTC
Hi,

this problem prevents me from finishing a Gentoo instalation on a PPC Powerbook G4. Can you please merge the attached patch?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-17 19:07:23 UTC
(In reply to Thomas Zimmermann from comment #3)
> Hi,
> 
> this problem prevents me from finishing a Gentoo instalation on a PPC
> Powerbook G4. Can you please merge the attached patch?

FWIW, you can put the patch in /etc/portage/patches/sys-boot/yaboot.
Comment 5 Thomas Zimmermann 2022-06-17 19:14:55 UTC
Thanks for the tip. I'll try this.
Comment 6 Guy Lowe 2022-06-21 15:00:51 UTC
Did it work for you?
Comment 7 Thomas Zimmermann 2022-06-25 19:03:58 UTC
Hi

(In reply to Guy Lowe from comment #6)
> Did it work for you?

Yes, I can confirm that the patch fixes the problem. I copied the patch to the location given in comment 4 and executed 'emerge --ask sys-boot/yaboot'. The package got built and installed.
Comment 8 Thomas Zimmermann 2022-06-25 19:04:45 UTC
Again, thanks a lot.