cdrtools has a really awkward build system where there is supposed to be a symlink from every_possible_arch-linux-gcc.rul to i586-linux-gcc.rul. The script RULES/MKLINKS creates symlinks for aarch64, but not for aarch64_be. Because of this single oversight, the build fails completely on big endian aarch64. Reproducible: Always Steps to Reproduce: 1.Try to emerge app-cdr/cdrtools/cdrtools-3.02_alpha09-r3 on big endian arm64 2. 3. Actual Results: The build fails like this: --8<-- ==> MAKING DEPENDENCIES "OBJ/arm64-linux-cc/align_test.d" + sed -e 's;^\(.*\)\.o[ ]*:;OBJ/arm64-linux-cc/\1.o OBJ/arm64-linux-cc/\1.d:;' + makedepend -f - align_test.c makedepend: warning: align_test.c (reading /usr/include/schily/err_arch.h), line 22: #error unconfigured architecture makedepend: warning: align_test.c (reading /usr/include/gnu/stubs.h, line 8): cannot find include file "gnu/stubs-lp64.h" not in /usr/include/gnu/stubs-lp64.h makedepend: warning: align_test.c (reading /usr/include/stdio.h, line 33): cannot find include file "stddef.h" not in /usr/include/stddef.h makedepend: warning: align_test.c (reading /usr/include/stdio.h, line 36): cannot find include file "stdarg.h" not in /usr/include/stdarg.h makedepend: warning: align_test.c (reading /usr/include/stdlib.h, line 31): cannot find include file "stddef.h" not in /usr/include/stddef.h makedepend: warning: align_test.c (reading /usr/include/sys/types.h, line 144): cannot find include file "stddef.h" not in /usr/include/stddef.h makedepend: warning: align_test.c (reading /usr/include/alloca.h, line 24): cannot find include file "stddef.h" not in /usr/include/stddef.h makedepend: warning: align_test.c (reading /usr/include/schily/err_char.h), line 22: #error Sizeof char is not equal 1 makedepend: warning: align_test.c (reading /usr/include/schily/err_type.h), line 24: #error Type is missing O2 -pipe -fomit-frame-pointer -finput-charset=ISO-8859-1 -fexec-charset=UTF-8 -c -o OBJ/arm64-linux-cc/align_test.o align_test.c /bin/sh: O2: command not found make[2]: [../RULES/r-gmake.obj:51: OBJ/arm64-linux-cc/align_test.o] Error 127 (ignored) o OBJ/arm64-linux-cc/align_test OBJ/arm64-linux-cc/align_test.o -Wl,-O1 -Wl,--as-needed /bin/sh: o: command not found make[2]: [../RULES/rules.inc:44: OBJ/arm64-linux-cc/align_test] Error 127 (ignored) ==> GENERATING include file "../incs/arm64-linux-cc/align.h" + OBJ/arm64-linux-cc/align_test /bin/sh: line 1: OBJ/arm64-linux-cc/align_test: No such file or directory + OBJ/arm64-linux-cc/align_test /bin/sh: line 2: OBJ/arm64-linux-cc/align_test: No such file or directory make[2]: *** [../RULES/rules.inc:50: ../incs/arm64-linux-cc/align.h] Error 127 make[2]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r3/work/cdrtools-3.02/inc' make[1]: *** [../RULES/rules.mks:23: all] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r3/work/cdrtools-3.02/inc' make: *** [RULES/rules1.dir:25: all] Error 2 * ERROR: app-cdr/cdrtools-3.02_alpha09-r3::gentoo failed (compile phase): * emake failed * --8<-- Expected Results: cdrtools is built Portage 3.0.18 (python 3.8.8-final-0, default/linux/arm64/17.0/big-endian, gcc-10.2.0, glibc-2.32-r7, 5.4.101 aarch64_be) ================================================================= System uname: Linux-5.4.101-aarch64_be-with-glibc2.17 KiB Mem: 6084312 total, 4912920 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Fri, 30 Apr 2021 16:00:01 +0000 Head commit of repository gentoo: d29894f7ba51ffef0d9f95c5564970d64a5afd61 sh bash 5.0_p18 ld GNU ld (Gentoo 2.35.2 p1) 2.35.2 app-shells/bash: 5.0_p18::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 3.8.8_p1::gentoo, 3.9.2_p1::gentoo dev-util/cmake: 3.18.5::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1-r1::gentoo sys-apps/sandbox: 2.21::gentoo sys-devel/autoconf: 2.69-r5::gentoo sys-devel/automake: 1.16.2-r1::gentoo sys-devel/binutils: 2.35.2::gentoo sys-devel/gcc: 10.2.0-r5::gentoo sys-devel/gcc-config: 2.3.2-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 crossdev location: /usr/local/portage-crossdev masters: gentoo priority: 10 ACCEPT_KEYWORDS="arm64" ACCEPT_LICENSE="@FREE" CBUILD="aarch64_be-unknown-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="aarch64_be-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/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -fomit-frame-pointer" DISTDIR="/tmp/distfiles" EMERGE_DEFAULT_OPTS="--autounmask" 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="-O2" 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="-O2" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="sv_SE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" 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="/var/tmp" USE="acl arm64 berkdb big-endian bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ADA_TARGET="gnat_2018" 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" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" 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-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="fbdev 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: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Created attachment 704763 [details, diff] Patch to fix build failure
Created attachment 748884 [details, diff] Fix build on big endian arm64 Sorry I somehow missed this. Can you try creating the symlinks in the ebuild inside of src_prepare. This should also work and I prefer doing it like this instead of creating a patch. Would be great if you could test this. Then I will gladly add a new revision including the fix.
Sure. Your variant also works.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8092252b37c801abc0fff6497add483f716d2b8c commit 8092252b37c801abc0fff6497add483f716d2b8c Author: Daniel Pielmeier <billie@gentoo.org> AuthorDate: 2021-11-06 19:18:14 +0000 Commit: Daniel Pielmeier <billie@gentoo.org> CommitDate: 2021-11-06 19:18:14 +0000 app-cdr/cdrtools: Revision bump. Closes: https://bugs.gentoo.org/787239 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Daniel Pielmeier <billie@gentoo.org> app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild | 295 +++++++++++++++++++++++ 1 file changed, 295 insertions(+)