Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686578 - app-emulation/qemu Installation fails
Summary: app-emulation/qemu Installation fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-22 22:13 UTC by wayne
Modified: 2020-04-18 19:24 UTC (History)
1 user (show)

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


Attachments
qemu-4.0.0.r3 build log (qemu-build.log,2.02 KB, text/plain)
2019-05-22 22:13 UTC, wayne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wayne 2019-05-22 22:13:51 UTC
Created attachment 577612 [details]
qemu-4.0.0.r3 build log

Portage 2.3.66 (python 3.6.8-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-9.1.0, glibc-2.29-r2, 5.0.0+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.0.0+-x86_64-Intel-R-_Core-TM-_i7-8550U_CPU_@_1.80GHz-with-debian-9.9
KiB Mem:    32818424 total,  19282740 free
KiB Swap:   33431548 total,  32519048 free
Timestamp of repository gentoo: Wed, 22 May 2019 15:00:01 +0000
Head commit of repository gentoo: 17a1ffa7f31d8a0b47fa40ab01d2f7e7a1cb2760
sh bash 5.0_p7
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p7::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo
dev-util/cmake:           3.14.4::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.1.0::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: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /home/wayne/gentoo/usr/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-metamanifest: no
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /home/wayne/gentoo/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/sandbox.d /etc/terminfo /home/wayne/gentoo/etc/env.d /home/wayne/gentoo/etc/gentoo-release"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/home/wayne/gentoo/usr/portage/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 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/home/wayne/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/home/wayne/gentoo/"
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="/home/wayne/gentoo/var/tmp"
USE="256-color X acl acpi alsa amd64 berkdb bluetooth bzip2 cli crypt css curl cxx dbus dri fortran gdbm gif gimp git gtk gzip hardened iconv inotify ipv6 libnotify libtirpc libvirt lua luajit mount musicbrainz ncurses nls nptl openmp pcre prefix pulseaudio python python2.7 python3.6 readline seccomp socks5 ssl static staticlibs tcpd truetype unicode usb wayland xinerama xscreensaver zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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_X86="mmx mmxext sse sse2" 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="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" 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="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-emulation/qemu-4.0.0-r3::gentoo was built with the following:
USE="aio alsa bzip2 caps curl fdt filecaps gtk jpeg ncurses nls pin-upstream-blobs png (prefix) pulseaudio python seccomp usb vhost-net vnc -accessibility -capstone -debug -doc -glusterfs -gnutls -infiniband -iscsi -lzo -nfs -numa -opengl -rbd -sasl -sdl (-selinux) -smartcard -snappy -spice -ssh (-static) -static-user -systemtap -tci -test -usbredir -vde -virgl -virtfs -vte -xattr -xen -xfs" PYTHON_TARGETS="python2_7 python3_6 -python3_5 -python3_7" QEMU_SOFTMMU_TARGETS="x86_64 -aarch64 -alpha -arm -cris -hppa -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="-aarch64 -aarch64_be -alpha -arm -armeb -cris -hppa -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -nios2 -or1k -ppc -ppc64 -ppc64abi32 -ppc64le -riscv32 -riscv64 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -tilegx -x86_64 -xtensa -xtensaeb"

>>> Attempting to run pkg_info() for 'app-emulation/qemu-4.0.0-r3'
Using:
  
  sys-firmware/edk2-ovmf-2017_p20180211
    USE=binary
  sys-firmware/ipxe-1.0.0_p20180211
  sys-firmware/seabios-1.11.0-r1
    USE=binary
  sys-firmware/sgabios-0.1_pre8-r1
Comment 1 wayne 2019-05-22 22:18:50 UTC
It looks like the postinst script is attempting to use the full path to `qemu-bridge-helper` assuming that it is installed in `/usr/libexec` rather than `$EPREFIX/usr/libexec`
Comment 2 wayne 2019-05-23 00:37:42 UTC
Okay I did a little poking around in the ebuilds repository and found this:

https://gitweb.gentoo.org/repo/gentoo.git/tree/app-emulation/qemu/qemu-4.0.0-r3.ebuild#n770

It looks like there is a variable called `EROOT` that is not being set correctly. I'm not sure what part of the toolchain is responsible for setting it though.

I found the reference for it here:
https://devmanual.gentoo.org/ebuild-writing/variables/index.html

It look like it is "Shorthand for ${ROOT%/}${EPREFIX}/."

This seems to imply that `EPREFIX` is not being set appropriately somewhere along the way...
Comment 3 wayne 2019-05-23 00:39:09 UTC
> This seems to imply that `EPREFIX` is not being set appropriately somewhere along the way...

Actually, it could be either `EPREFIX` or `ROOT` that isn't set appropriately. I'd be happy to submit a change request if anyone cares to give me a little guidance.
Comment 4 Matthias Maier gentoo-dev 2019-07-02 21:14:31 UTC
This is strange, ${EROOT} must be populated...

You can habe a look at [1] for further info.

[1] https://wiki.gentoo.org/wiki/Project:Prefix/Technical_Documentation#Using_EPREFIX_and_EROOT
Comment 5 Alexander Tsoy 2019-08-23 16:20:41 UTC
At the time this bug was filed, the problematic code was:

   [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \
       fcaps cap_net_admin /usr/libexec/qemu-bridge-helper

And it was obviously wrong because fcaps() doesn't append ${EROOT} to an absolute path. Should be fixed by the following commit I guess:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77e591b421d548ba29b40ec32b536cab761a1449