* Package: sys-block/megactl-0.4.1-r2 * Repository: gentoo * Maintainer: sysadmin@gentoo.org * USE: abi_ppc_32 big-endian elibc_glibc kernel_linux ppc userland_GNU * FEATURES: preserve-libs sandbox test userpriv usersandbox >>> Unpacking source... >>> Unpacking megactl-0.4.1.tar.gz to /dev/shm/portage/sys-block/megactl-0.4.1-r2/work >>> Source unpacked in /dev/shm/portage/sys-block/megactl-0.4.1-r2/work >>> Preparing source in /dev/shm/portage/sys-block/megactl-0.4.1-r2/work/megactl-0.4.1 ... * Applying megactl-0.4.1.patch ... [ ok ] * Applying megactl-0.4.1-Makefile.patch ... [ ok ] * Applying megactl-0.4.1-gcc-fixes.patch ... [ ok ] * Applying megactl-0.4.1-tracefix.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /dev/shm/portage/sys-block/megactl-0.4.1-r2/work/megactl-0.4.1 ... >>> Source configured. >>> Compiling source in /dev/shm/portage/sys-block/megactl-0.4.1-r2/work/megactl-0.4.1 ... make -j13 -l12 cc -O2 -mcpu=powerpc -mtune=powerpc -pipe -fdiagnostics-show-option -frecord-gcc-switches -I./schily -Iincludes-hack ppc -c -o megactl.o megactl.c cc -O2 -mcpu=powerpc -mtune=powerpc -pipe -fdiagnostics-show-option -frecord-gcc-switches -I./schily -Iincludes-hack ppc -c -o adapter.o adapter.c cc -O2 -mcpu=powerpc -mtune=powerpc -pipe -fdiagnostics-show-option -frecord-gcc-switches -I./schily -Iincludes-hack ppc -c -o dumpbytes.o dumpbytes.c cc: error: ppc: No such file or directory cc: error: ppc: No such file or directory make: *** [<builtin>: megactl.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [<builtin>: adapter.o] Error 1 cc: error: ppc: No such file or directory make: *** [<builtin>: dumpbytes.o] Error 1 emake failed * ERROR: sys-block/megactl-0.4.1-r2::gentoo failed (compile phase): * make failed * * Call stack: * ebuild.sh, line 124: Called src_compile * environment, line 1837: Called die * The specific snippet of code: * emake ${MY_MAKEOPTS} || die "make failed" * * If you need support, post the output of `emerge --info '=sys-block/megactl-0.4.1-r2::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-block/megactl-0.4.1-r2::gentoo'`. * The complete build log is located at '/dev/shm/portage/sys-block/megactl-0.4.1-r2/temp/build.log'. * The ebuild environment file is located at '/dev/shm/portage/sys-block/megactl-0.4.1-r2/temp/environment'. * Working directory: '/dev/shm/portage/sys-block/megactl-0.4.1-r2/work/megactl-0.4.1/src' * S: '/dev/shm/portage/sys-block/megactl-0.4.1-r2/work/megactl-0.4.1'
timberdoodle / # emerge --info Portage 2.3.51 (python 3.6.6-final-0, default/linux/powerpc/ppc32/13.0/desktop/gnome/systemd, gcc-7.3.0, glibc-2.27-r6, 4.9.16-gentoo ppc) ================================================================= System uname: Linux-4.9.16-gentoo-ppc-POWER8_-architected-,_altivec_supported-with-gentoo-2.6 KiB Mem: 24805420 total, 6867008 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Tue, 06 Nov 2018 11:00:01 +0000 Head commit of repository gentoo: 7f55ecb634282f31e4ad2a9bd14087286ca11c17 sh bash 4.4_p23 ld GNU ld (Gentoo 2.30 p3) 2.30.0 app-shells/bash: 4.4_p23::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.6.6::gentoo dev-util/cmake: 3.12.3::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.15.1-r1::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.30-r3::gentoo, 2.31.1-r1::gentoo sys-devel/gcc: 7.3.0-r3::gentoo, 8.2.0-r3::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r5::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.18::gentoo (virtual/os-headers) sys-libs/glibc: 2.27-r6::gentoo Repositories: gentoo location: /bound/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes crossdev location: /co masters: gentoo priority: 0 ACCEPT_KEYWORDS="ppc ~ppc" ACCEPT_LICENSE="* -@EULA" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe -fdiagnostics-show-option -frecord-gcc-switches" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe" DISTDIR="/bound/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict stricter test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ru_RU.UTF-8" LC_ALL="" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j13 -l12" 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 --exclude=/.git" PORTAGE_TMPDIR="/dev/shm" USE="X a52 aac acl alsa berkdb big-endian bluetooth branding bzip2 cairo cdda cdr cli client colord corefonts crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk http2 iconv icu introspection ipv6 jpeg lcms ldap libnotify libsecret mad minizip mng mp3 mp4 mpeg nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pcre16 pdf png policykit ppc ppds pulseaudio python qml qt5 readline sdl seccomp sound spell ssl startup-notification svg systemd tcpd test threads tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvfb xvid zlib" ABI_PPC="32" 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="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="x11" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="fbdev glint mga nv r128 radeon dummy v4l" 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: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
ppc64 fails the same: cc -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -I./schily -Iincludes-hack ppc64 -c -o megactl.o megactl.c cc -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -I./schily -Iincludes-hack ppc64 -c -o adapter.o adapter.c cc: error: ppc64: No such file or directory make: *** [<builtin>: megactl.o] Error 1 make: *** Waiting for unfinished jobs.... cc: error: ppc64: No such file or directory make: *** [<builtin>: adapter.o] Error 1
I think it's caused by a leak of ARCH global variable: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-block/megactl/files/megactl-0.4.1-Makefile.patch -ARCH= -m32 +ARCH?= -m32
Ah, it's a limitation of the src_compile() itself: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-block/megactl/megactl-0.4.1-r2.ebuild#n23 src_compile() { cd src use x86 && MY_MAKEOPTS="ARCH=-m32" use amd64 && MY_MAKEOPTS="ARCH=-m64" emake ${MY_MAKEOPTS} || die "make failed" } ppc* is not handled here.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28611b6a2ff2650bbd029dec2df24677b03c145f commit 28611b6a2ff2650bbd029dec2df24677b03c145f Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-03-16 19:25:52 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-03-16 19:28:27 +0000 package.use.mask: allow phpsysinfo[megactl] only on x86 and amd64 Initially sys-block/megactl supports only x86. Gentoo's patches add amd64 support via ifdef __x86_64__. That is not compatible to other 64-bit arches. Endianness story is not clear either. Let's mask it outside x86 & amd64. Bug: https://bugs.gentoo.org/669772 Bug: https://bugs.gentoo.org/670564 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> profiles/arch/amd64/package.use.mask | 4 ++++ profiles/arch/base/package.use.mask | 4 ++++ profiles/arch/x86/package.use.mask | 4 ++++ 3 files changed, 12 insertions(+)
Unfortunately (and surprisingly) the code is x86-specific: spells out register names in code and similar.