Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 611084 - app-emulation/qemu: QEMU_SOFTMMU_TARGETS="", QEMU_USER_TARGETS="": DEPEND is missing packages need for tools-only builds
Summary: app-emulation/qemu: QEMU_SOFTMMU_TARGETS="", QEMU_USER_TARGETS="": DEPEND is ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-27 11:38 UTC by Richard Yao (RETIRED)
Modified: 2017-02-28 05:57 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao (RETIRED) gentoo-dev 2017-02-27 11:38:18 UTC
Trying to build qemu in a fresh stage3 breaks because the dependencies were moved into SOFTMMU_LIB_DEPEND, which isn't included in DEPEND. You will see configure failures such as this:

ERROR: User requested feature linux AIO
       configure was not able to find it.
       Install libaio devel

USE="aio gnutls libcap jpeg ncurses" are among the affected USE flags, although this affects nearly all QEMU USE flags.
Comment 1 Richard Yao (RETIRED) gentoo-dev 2017-02-27 11:44:48 UTC
# emerge --info
Portage 2.3.1 (python 2.7.12-final-0, hardened/linux/musl/amd64, gcc-4.9.4, musl-1.1.15-r2, 4.7.10-hardened x86_64)
=================================================================
System uname: Linux-4.7.10-hardened-x86_64-Intel-R-_Xeon-R-_CPU_E5-1620_0_@_3.60GHz-with-gentoo-2.3
KiB Mem:    65745992 total,  59728524 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 22 Feb 2017 00:45:01 +0000
sh dash 0.5.8.2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::musl
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4-r99::musl
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/musl:            1.1.15-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-gentoo-linux-musl"
CFLAGS="-O2 -mtune=native -ggdb -pipe"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mtune=native -ggdb -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
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="amd64 bindist cli cracklib crypt cxx dri fortran hardened iconv ipv6 mmx modules ncurses nls nptl openmp pam pax_kernel pcre pic readline seccomp session sse sse2 ssl tcpd unicode xattr zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="musl" 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="dummy fbdev 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Richard Yao (RETIRED) gentoo-dev 2017-02-27 12:06:29 UTC
USE=qemu_softmmu_targets_x86_64 works around the problem by making dependencies work.
Comment 3 Matthias Maier gentoo-dev 2017-02-27 12:15:23 UTC
Reproduced on standard default/linux/amd64/13.0 profile.
Comment 4 SpanKY gentoo-dev 2017-02-27 20:53:39 UTC
don't see this as being a major issue or a regression seeing as how we didn't really support tools-only builds in the past

we already have this issue documented in the ebuild but haven't focused on it because it's an uncommon scenario

# TODO: Split out tools deps into another var.  e.g. bzip2 is only used by
# system binaries and tools, not user binaries.
Comment 5 Matthias Maier gentoo-dev 2017-02-27 21:13:12 UTC
Ah, I totally missed the elevated priority this morning.

Yes, I agree. This has at most standard importance.

I will have a look at building a minimal qemu (without any targets) on a minimal stage-3 sometime later.

It is also a good opportunity to check whether the static-* use flags still work as advertised.
Comment 6 Matthias Maier gentoo-dev 2017-02-28 05:29:10 UTC
After having spent roughly 4h with the dependency tree, I have pushed
qemu-2.8.0-r5 to the tree and updated qemu-9999.

I have unified the dependencies, i.e. there is no separate list of tool, user
target and softmmu target dependencies any more. The reason for this change is
the observation that:

  - Almost all dependencies that were exclusively listed in SOFTMMU_LIBS_DEPEND 
    are needed for qemu user targets as well. This is evidenced by trying to 
    compile qemu with
         USE="* -static -static-softmmu -static-user" QEMU_USER_TARGETS="*" 
         QEMU_SOFTMMU_TARGETS=""
    in a minimal stage-3 environment.

  - The same holds true for the qemu tools.

All in all, only 4 dependencies were softmmu-target specific and these were
    alsa? ( >=media-libs/alsa-lib-1.0.13 )
    fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
    pulseaudio? ( media-sound/pulseaudio )
    seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )

So after all it is simply not worth the effort to maintain a separate list of dependencies (and in fact we didn't, e.g. USE"* -static*" QEMU_USER_TARGETS="*", 
QEMU_SOFTMMU_TARGETS="" was simply broken).


Further, I have removed the artificial split of the static keyword into static-
softmmu and static-user. Now, USE="static" controls exclusively whether all user 
and softmmus targets as well as the qemu tools will be compiled as static 
executable.


commit e6788f4442a0daaf2a75cc6302e5f0ef104c3624
commit c9eac4cbe40417c25e455aada13593f7824f42ef
commit 159a538312f81e42a78e1905a34f3ef49f30b93c
Comment 7 Matthias Maier gentoo-dev 2017-02-28 05:57:10 UTC
Short correction to my previous comment:

I have reintroduced the "static-user" use flag.
It is every convenient for a scenario where static user target binaries for chroots are needed but the system targets (and tools) should still be linked dynamically.

So the choice is now:
  USE="-static-user -static"
  USE=" static-user -static" - only qemu user targets are linked statically.
  USE=" static-user  static" - everything is linked statically.


commit 1d79efd4de863153d918cb3dd66ec9a1c595e9b7
commit 6e259a58ba456e822ebb21e60b585eef905f65aa