ipxe, required for x86 system emulation in qemu, fails to build on PPC. A typical compilation line is powerpc-unknown-linux-gnu-gcc -DARCH=i386 -DPLATFORM=pcbios -march=i386 -fomit-frame-pointer -fstrength-reduce -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mpreferred-stack-boundary=2 -mregparm=3 -mrtd -freg-struct-return -m32 -fshort-wchar -Ui386 -Ulinux -DNVALGRIND -Iinclude -I. -Iarch/x86/include -Iarch/i386/include -Iarch/i386/include/pcbios -Os -g -ffreestanding -Wall -W -Wformat-nonliteral -fno-stack-protector -fno-dwarf2-cfi-asm -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-address -ffunction-sections -fdata-sections -include include/compiler.h -DOBJECT=__moddi3 -c libgcc/__moddi3.c -o bin/__moddi3.o cc1: error: unrecognized command line option ‘-march=i386’ cc1: error: unrecognized command line option ‘-mpreferred-stack-boundary=2’ cc1: error: unrecognized command line option ‘-mregparm=3’ cc1: error: unrecognized command line option ‘-mrtd’ Well, it's hardly surprising that powerpc-unknown-linux-gnu-gcc doesn't recognize -march=i386. Was the intention to use a cross compiler perhaps? Reproducible: Always Steps to Reproduce: 1. emerge ipxe on PPC 2. watch it give x86-specific gcc flags to powerpc-unknown-linux-gnu-gcc 3. roll eyes :-) Actual Results: Build fails. Expected Results: Build succeeds. Portage 2.1.12.2 (default/linux/powerpc/ppc64/13.0/32bit-userland/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.10.9X1000 ppc64) ================================================================= System Settings ================================================================= System uname: Linux-3.10.9X1000-ppc64-PA6T,_altivec_supported-with-gentoo-2.2 KiB Mem: 4024364 total, 1535472 free KiB Swap: 31248380 total, 31248380 free Timestamp of tree: Fri, 09 Aug 2013 10:00:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5, 3.2.5-r1, 3.3.0-r1 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo wagnerflo pike sunrise x11 bleeding-edge godin edwtjo-ebuilds sigrok wtk flow zeldin ACCEPT_KEYWORDS="ppc" ACCEPT_LICENSE="* -@EULA" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=power4 -mtune=power4 -maltivec -mabi=altivec -fno-strict-aliasing -O2 -pipe" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-mcpu=power4 -mtune=power4 -maltivec -mabi=altivec -fno-strict-aliasing -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="sv_SE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/var/lib/layman/wagnerflo /var/lib/layman/pike /var/lib/layman/sunrise /var/lib/layman/x11 /var/lib/layman/bleeding-edge /var/lib/layman/godin /var/lib/layman/edwtjo-ebuilds /var/lib/layman/sigrok /var/lib/layman/wtk /var/lib/layman/flow /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl alsa altivec berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli colord consolekit cracklib crypt css cups curl cxx dbus dri dts dvb dvd dvdr eds emboss encode exif fam ffmpeg firefox flac gcc64 gdbm gif gmp gnome gnome-keyring gnutls gpm gstreamer gtk iconv idn introspection ipv6 jpeg lcms ldap libffi libnotify libsecret lua mad mng modules mp3 mp4 mpeg mudflap mule multilib multitarget nautilus ncurses nis nls nptl offensive ogg opengl openmp pam pango pcre pdf png policykit ppc ppds pulseaudio qt3support qt4 readline sdl seamonkey session smp socialweb spell ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xemacs xft xml xmpp xv xvid zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600 modesetting" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON * Last emerge --sync was Fri Aug 9 11:35:01 2013. [ebuild N ] sys-firmware/ipxe-1.0.0_p20130624 USE="qemu usb -iso -undi -vmware"
ipxe has no ppc keyword, so it is supposed to not work on ppc
We need to prebuild some binary versions and use those on PPC. Definitely can't keyword the ebuild as is for PPC and have it work.
(In reply to Agostino Sarubbo from comment #1) > ipxe has no ppc keyword, so it is supposed to not work on ppc It's a dependency of qemu, which has the ppc keyword. "It's supposed to be broken" isn't particularly helpful. ;-)
(In reply to Doug Goldstein from comment #2) > We need to prebuild some binary versions and use those on PPC. Definitely > can't keyword the ebuild as is for PPC and have it work. Hm, actually it looks like qemu already ships binary versions, but the ebuild deletes them and symlinks /usr/share/ipxe instead. So if going for the "ship binaries" solution, the easiest way is probably to remove the dependency in the qemu ebuild, and just use qemu bundled ipxe.
As a side note, the latest ebuild of sys-firmware/vgabios (also a dependency of qemu) builds fine on ppc using "sys-devel/dev86" as a cross compiler. The same solution could probably be used for ipxe, if the binary shipping solution is deemed inadequate.
seeing if we could get it working like vgabios (including a USE=binary flag) would be good
*** Bug 536998 has been marked as a duplicate of this bug. ***
I agree, this sounds reasonable.
hmm, while vgabios uses the dev86 package which always targets 16bit x86, ipxe uses gcc. so you'd need to install a cross-compiler to build it :(. it's feasible, but nearly as nice. scaling back to just USE=binary wouldn't take much work. not sure if we'll want to really invest in the cross-compile scenario.
Can can confirm this also affects arm installations. I get the same error when installing qemu on my raspberry pi 2.
*** Bug 561086 has been marked as a duplicate of this bug. ***
The same happens on aarch64 (arm64). aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-mpreferred-stack-boundary=2’ aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-mregparm=3’ aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-mrtd’ aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-m32’
I created bug 631094 with a new ebuild for qemu that removes the dependency on sys-firmware/ipxe via a use flag.
*** Bug 631094 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9bc5dfd490682a71cd5fa2790b0379996bba31e commit c9bc5dfd490682a71cd5fa2790b0379996bba31e Author: Matthias Maier <tamiko@gentoo.org> AuthorDate: 2018-02-12 00:00:55 +0000 Commit: Matthias Maier <tamiko@gentoo.org> CommitDate: 2018-02-12 00:01:35 +0000 sys-firmware/ipxe: Add USE=binary Closes: https://bugs.gentoo.org/484886 Package-Manager: Portage-2.3.24, Repoman-2.3.6 sys-firmware/ipxe/Manifest | 1 + sys-firmware/ipxe/ipxe-1.0.0_p20180211.ebuild | 23 +++++++++++++++++------ sys-firmware/ipxe/metadata.xml | 1 + 3 files changed, 19 insertions(+), 6 deletions(-)