media-gfx/povray fails to cross-emerge for arm-musl on x86_64-gnu. The configure says Boost is not found, which is of course installed by dependency. Not sure if static-libs USE flag is relevant. (Haven't tried with -static-libs.) build.log and config.log will be attached soon. Reproducible: Always Steps to Reproduce: 1. USE="static-libs" armv7a-softfloat-linux-musleabi-emerge --ask =media-gfx/povray-3.7.0.0-r1 Actual Results: configure dies saying: checking whether the Boost::System library is available... no checking whether the Boost::Thread library is available... no configure: error: cannot find a suitable boost thread library Expected Results: configure passes armv7a-softfloat-linux-musleabi-emerge --info: Portage 3.0.22 (python 3.9.6-final-0, embedded, gcc-11.2.0, unavailable, 5.4.134-gentoo x86_64) ================================================================= System uname: Linux-5.4.134-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_U7500_@_1.06GHz-with-glibc2.33 KiB Mem: 1516768 total, 339608 free KiB Swap: 49351676 total, 49114148 free Timestamp of repository gentoo: Tue, 24 Aug 2021 16:21:32 +0000 sh bash 5.1_p8 ld GNU ld (Gentoo 2.37_p1 p0) 2.37 Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: ACCEPT_KEYWORDS="arm ~arm" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="armv7a-softfloat-linux-musleabi" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /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="-O2 -pipe -fomit-frame-pointer" DISTDIR="/var/cache/distfiles" FCFLAGS="-Os -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo noman 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="-Os -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="" LINGUAS="en" PKGDIR="/usr/armv7a-softfloat-linux-musleabi/packages/" PORTAGE_CONFIGROOT="/usr/armv7a-softfloat-linux-musleabi/" 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="/usr/armv7a-softfloat-linux-musleabi/tmp/" USE="arm kdrive minimal multicall zlib" ELIBC="musl" INPUT_DEVICES="evdev" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="fbdev" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, ENV_UNSET, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Created attachment 735817 [details] build.log
Created attachment 735819 [details] config.log
Wondering if it's as simple as this being wrong: > --with-boost-libdir=/usr/lib
(In reply to Sam James from comment #3) > Wondering if it's as simple as this being wrong: > > --with-boost-libdir=/usr/lib Could you try modifying the ebuild? Change these lines: -e 's:"/usr/include":"'${EPREFIX}'/usr/include":' \ -e 's:"/usr/lib":"'${EPREFIX}'/usr/'$(get_libdir)'":' \ to: -e 's:"/usr/include":"'${ESYSROOT}'/usr/include":' \ -e 's:"/usr/lib":"'${ESYSROOT}'/usr/'$(get_libdir)'":' \ and --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \ to --with-boost-libdir="${ESYSROOT}/usr/$(get_libdir)" \
(In reply to Sam James from comment #4) > Could you try modifying the ebuild? > > Change these lines: > -e 's:"/usr/include":"'${EPREFIX}'/usr/include":' \ > -e 's:"/usr/lib":"'${EPREFIX}'/usr/'$(get_libdir)'":' \ > to: > -e 's:"/usr/include":"'${ESYSROOT}'/usr/include":' \ > -e 's:"/usr/lib":"'${ESYSROOT}'/usr/'$(get_libdir)'":' \ > > and > --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \ > to > --with-boost-libdir="${ESYSROOT}/usr/$(get_libdir)" \ This does not seem to change the config result. Possibly both EPREFIX and ESYSROOT are expanded as empty strings?
Created attachment 735955 [details, diff] Add --with-boost config option Now I'm trying to build manually because I don't know an appropriate alternative to EPREFIX that expands to /usr/armv7a-softfloat-linux-musleabi. And I have found that without specifying --with-boost option the configure script uses -I/usr/include as CPPFLAGS when checking for Boost library.
Created attachment 735957 [details, diff] Make configure script cross-build friendly Aside from the above issue, the configure script has problems for cross-build. These are mainly because it tries to execute built binaries even when cross-compiling. A patch is attached to fix this.
Created attachment 735959 [details, diff] Use unsigned int instead of uint The make step stops by errors saying that type name 'uint' is unknown. It might suffice to include <sys/types.h>, but the attached patch substitutes unsigned int for uint.
These look OK but have you sent them upstream?
Ah, ESYSROOT is empty because of EAPI=6?
(In reply to Sam James from comment #9) > These look OK but have you sent them upstream? No, not yet.
As for musl, there is also an issue of the default thread stack size being too small for povray to run. This can be worked around by including -Wl,-z,stack-size=2097152 (can be smaller) in LDFLAGS. (Another problem is that now I am not much interested in cross-emerging povray.)
I can reproduce without static-libs on musl amd64