Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 850895 - dev-libs/gobject-introspection: cannot cross-compile An exe_wrapper is needed but was not found
Summary: dev-libs/gobject-introspection: cannot cross-compile An exe_wrapper is needed...
Status: RESOLVED DUPLICATE of bug 751325
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-09 20:54 UTC by Andrew Udvare
Modified: 2024-02-23 17:17 UTC (History)
4 users (show)

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


Attachments
build log (build.log,13.61 KB, text/x-log)
2022-06-09 20:54 UTC, Andrew Udvare
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2022-06-09 20:54:39 UTC
Created attachment 783782 [details]
build log

Please see attached log.

$ powerpc64-unknown-linux-gnu-emerge --info
Portage 3.0.30 (python 3.9.13-final-0, default/linux/ppc64/17.0/systemd, gcc-11.3.0, unavailable, 5.17.12-gentoo-limelight x86_64)
=================================================================
System uname: Linux-5.17.12-gentoo-limelight-x86_64-11th_Gen_Intel-R-_Core-TM-_i9-11900K_@_3.50GHz-with-glibc2.35
KiB Mem:    65713880 total,   6479260 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 08 Jun 2022 00:33:12 +0000
Head commit of repository tatsh-overlay: 4cace0685f120050d6aabbe8e067181682f78879

sh bash 5.1_p16
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.4::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           3.9.13::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          251.2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-kernel/linux-headers:  5.18-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r7::gentoo
Repositories:

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

tatsh-overlay
    location: /var/db/repos/tatsh
    sync-type: git
    sync-uri: https://github.com/Tatsh/tatsh-overlay.git
    masters: gentoo
    sync-git-verify-commit-signature: no

ACCEPT_KEYWORDS="ppc64 ~ppc64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-funswitch-loops -ggdb -mcpu=970 -mtune=970 -msecure-plt -O2 -pipe"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /opt/clonehero/Custom /opt/clonehero/Screenshots /opt/clonehero/Songs /opt/clonehero/settings.ini /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf"
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="-funswitch-loops -ggdb -mcpu=970 -mtune=970 -msecure-plt -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--buildpkg-exclude 'virtual/* sys-kernel/*-sources */*-bin sys-kernel/linux-firmware media-fonts/*' --jobs 15 --load-average 15 --quiet-build=y --usepkg --verbose-conflicts"
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="-funswitch-loops -ggdb -mcpu=970 -mtune=970 -msecure-plt -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live compressdebug 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 splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-funswitch-loops -ggdb -mcpu=970 -mtune=970 -msecure-plt -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/powerpc64-unknown-linux-gnu/packages/"
PORTAGE_CONFIGROOT="/usr/powerpc64-unknown-linux-gnu/"
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/powerpc64-unknown-linux-gnu/tmp/"
SHELL="/bin/bash"
USE="X a52 aac acl alsa avahi bash-completion big-endian bluetooth branding bzip2 cdda cddb cdio cjk clang cli crypt curl dav1d dbus dri dvd faudio ffmpeg flac fortran gamepad gdbm gif gles2 gpm gsm gstreamer gtk gtk3 hardened hwaccel ibm ibus iconv icu idn ipv6 jemalloc joystick jpeg jpeg2k lame libass libcaca libglvnd libnotify libretro lm-sensors lz4 lzma man matroska mod modplug mp3 mpeg ncurses networkmanager nls nptl ogg opengl openmp opus pam pcre pdf png policykit ppc64 pulseaudio readline samba screencast sdl seccomp snappy speex split-usr ssl startup-notification syslog systemd taglib theora threads tiff truetype twolame udev unicode upower usb v4l vcd vim-syntax vlc vorbis vpx wavpack webp wmf x264 x265 xattr xpm xvid xxhash zeroconf zlib zstd" 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" CPU_FLAGS_PPC="altivec" 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="evdev libinput joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-4" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev nouveau nv 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, 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 Andrew Udvare 2022-06-09 21:01:10 UTC
Also this blocks polkit and I do not know why gobject-introspection can somehow get skipped by Portage, but I was using --keep-going.

Run-time dependency gobject-introspection-1.0 found: NO (tried pkgconfig)

meson.build:329:2: ERROR: Dependency "gobject-introspection-1.0" not found, tried pkgconfig
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-10 05:44:25 UTC
On IRC we discussed this and they got past various bits by using -introspection but we're going to have to figure out a cross-introspection thing soon, as not all upstreams are willing to allow disabling it.
Comment 3 jonys 2024-01-22 09:52:46 UTC
This was also encountered in NixOS:
https://github.com/NixOS/nixpkgs/issues/72868
https://github.com/NixOS/nixpkgs/pull/176464

They resolved it, apparently through hooking an emulator support into the build system (but I just skimmed the diffs).
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-22 10:13:42 UTC
(In reply to jonys from comment #3)
> This was also encountered in NixOS:
> https://github.com/NixOS/nixpkgs/issues/72868
> https://github.com/NixOS/nixpkgs/pull/176464
> 
> They resolved it, apparently through hooking an emulator support into the
> build system (but I just skimmed the diffs).

Yeah, we need to tell crossdev to setup a Meson machine file to run QEMU. Meson can transparently handle it in a cross-friendly way.
Comment 5 vadorovsky 2024-02-23 10:59:27 UTC
For me, installing app-emulation/qemu was the ultimate solution for all "exe_wrapper is needed but was not found" thrown by meson.

I was able to build dev-libs/gobject-introspection without any troubles afterwards. Which means that Meson is probably smart enough to use qemu as exe_wrapper when it's available on the host.

Below is the result of my `ROOT=/usr/aarch64-gentoo-linux-musl emerge -av dev-libs/gobject-introspection`. Before installing qemu on host I used to hit the same error with exe_wrapper (for many Meson-based projects).

>>> Completed (19 of 19) dev-libs/gobject-introspection-1.78.1::gentoo to /usr/aarch64-gentoo-linux-musl/

 * Messages for package sys-apps/util-linux-2.38.1-r3 merged to /usr/aarch64-gentoo-linux-musl/:

 * The mesg/wall/write tools have been disabled due to USE=-tty-helpers.

 * Messages for package dev-libs/glib-2.78.3 merged to /usr/aarch64-gentoo-linux-musl/:

 * Unable to find kernel sources at /usr/aarch64-gentoo-linux-musl/usr/src/linux
 * Unable to calculate Linux Kernel version for build, attempting to use running version

 * GNU info directory index is up-to-date.

 * IMPORTANT: 15 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.
Comment 6 vadorovsky 2024-02-23 16:40:12 UTC
OK, nevermind. I noticed that it's non-deterministic in my case. I tried multiple times setting up fresh stage3 container and redo the following from the scratch:

1. Setting up crossdev.
2. Installing app-emulation/qemu with QEMU_USER_TARGETS="*" QEMU_SOFTMMU_TARGETS="*" USE="static-user"
3. cross-emerging any Meson-based package - either dev-libs/gobject-introspection or my patched zstd from my overlay (https://gitlab.com/vadorovsky/overlay/-/tree/main/app-arch/zstd?ref_type=heads)

And what I noticed that sometimes it works, sometimes it doesn't. One time I see the emerge finishing with success. Other time I see the "exe_wrapper is needed but was not found" error. I don't understand why it's non-deterministic, it doesn't make sense.

What I'm going to try right now is adding `exe_wrapper = qemu-${cpu_family}` to meson.eclass. I hope it makes it more reliable and deterministic.

Maybe I will also have to write a wrapper script - I've seen people complaining that just pointing to qemu doesn't work and that they need this wrapper which fixes up the arguments:

https://github.com/hwengineer/STM32-L0-qemu-example/blob/master/meson_exe_wrapper.sh

Also, probably a duplicate of https://bugs.gentoo.org/751325
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-23 17:17:13 UTC
Yeah, I think it is.

*** This bug has been marked as a duplicate of bug 751325 ***