Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 728278

Summary: dev-qt/qtdiag-5.15.0: Project ERROR: Could not find feature dom
Product: Gentoo Linux Reporter: William Throwe <wtt6>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal CC: abbotta4, mgorny
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=795237
https://bugs.gentoo.org/show_bug.cgi?id=802492
https://bugs.gentoo.org/show_bug.cgi?id=811147
https://github.com/gentoo/qt/pull/246
https://github.com/gentoo/gentoo/pull/22138
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description William Throwe 2020-06-14 19:56:59 UTC
Created attachment 644750 [details]
build.log

Fails to build with

Project ERROR: Could not find feature dom.


$ emerge --info
Portage 2.3.100 (python 3.7.7-final-0, default/linux/amd64/17.1, gcc-10.1.0, glibc-2.31-r5, 4.11.3-gentoo x86_64)
=================================================================
System uname: Linux-4.11.3-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_T5500_@_1.66GHz-with-gentoo-2.7
KiB Mem:     2048568 total,    417020 free
KiB Swap:    2048252 total,   2046708 free
Timestamp of repository gentoo: Sun, 14 Jun 2020 18:45:01 +0000
Head commit of repository gentoo: 5bd3540ecd75a502161a5b7faed02f4cbf6fb5ad
sh bash 5.0_p17
ld GNU ld (Gentoo 2.34 p4) 2.34.0
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.3-r1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.7.7-r2::gentoo, 3.8.3::gentoo, 3.9.0_beta3::gentoo
dev-util/cmake:           3.17.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34-r1::gentoo
sys-devel/gcc:            10.1.0::gentoo
sys-devel/gcc-config:     2.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.namerica.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: 

crossdev
    location: /usr/local/crossdev
    masters: gentoo
    priority: 0

g-cpan
    location: /var/lib/g-cpan
    masters: gentoo
    priority: 1

barnowl
    location: /var/lib/layman/barnowl
    masters: gentoo
    priority: 50

wthrowe
    location: /var/lib/layman/wthrowe
    masters: gentoo
    priority: 50

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE fairuse"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask --quiet-build=n --autounmask-write=n"
ENV_UNSET="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 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs compress-build-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-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo ftp://cosmos.illinois.edu/pub/gentoo/ rsync://mirror.leaseweb.com/gentoo/ http://mirror.leaseweb.com/gentoo/ http://mirror.netcologne.de/gentoo/"
LANG="POSIX"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j2"
PKGDIR="/var/cache/binpkgs"
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="X acl acpi alsa amd64 bzip2 cairo caps cdr cli crypt dbus dri dvd dvdr emacs fortran gd gif gimp gtk iconv ipv6 jpeg latex libtirpc multilib ncurses nls nptl opengl openmp pam pcre png readline seccomp smp split-usr ssl ssse3 tcpd tiff truetype unicode xattr xscreensaver zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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 sse3 ssse3" 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 synaptics" 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="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25" SANE_BACKENDS="epson2" USERLAND="GNU" VIDEO_CARDS="radeon" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 wolfwood 2020-07-01 20:35:52 UTC
emerging qtxml fixed this for me
Comment 2 tt_1 2020-08-02 07:50:20 UTC
that's correct, qtxml is missing in dependencies
Comment 3 Andreas Sturmlechner gentoo-dev 2020-08-07 16:34:08 UTC
...which is bad, because it means the "-no-feature-$PN" switches do not properly disable these modules.
Comment 4 Andreas Sturmlechner gentoo-dev 2020-09-21 12:22:04 UTC
Should we just add that DEPEND even though we know it is bogus, and be done with it?
Comment 5 Davide Pesavento gentoo-dev 2020-09-21 20:00:30 UTC
(In reply to Andreas Sturmlechner from comment #4)
> Should we just add that DEPEND even though we know it is bogus, and be done
> with it?
Sounds acceptable to me, although I'm not following your previous comment about -no-feature-$PN not producing the expected effect.
Comment 6 Andreas Sturmlechner gentoo-dev 2020-09-29 13:38:28 UTC
(In reply to Davide Pesavento from comment #5)
> Sounds acceptable to me, although I'm not following your previous comment
> about -no-feature-$PN not producing the expected effect.
Well, dependency checks being executed for disabled modules causing this bug.
Comment 7 Larry the Git Cow gentoo-dev 2020-09-29 20:31:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=440b12fb459a0efc35c2192e5bc1ec66c4f810f2

commit 440b12fb459a0efc35c2192e5bc1ec66c4f810f2
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-09-29 20:23:52 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-09-29 20:29:41 +0000

    dev-qt/qtdiag: Add dev-qt/qtxml to DEPEND
    
    Bug: https://bugs.gentoo.org/728278
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtdiag/qtdiag-5.15.1.ebuild | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2020-09-29 20:39:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/qt.git/commit/?id=6098eb4751ce773126722792a5fa955ac1d7c83f

commit 6098eb4751ce773126722792a5fa955ac1d7c83f
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-09-29 20:23:52 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-09-29 20:33:15 +0000

    dev-qt/qtdiag: Add dev-qt/qtxml to DEPEND
    
    Bug: https://bugs.gentoo.org/728278
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtdiag/qtdiag-5.15.9999.ebuild | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 10 Davide Pesavento gentoo-dev 2021-09-04 04:46:31 UTC
(In reply to Andreas Sturmlechner from comment #6)
> (In reply to Davide Pesavento from comment #5)
> > Sounds acceptable to me, although I'm not following your previous comment
> > about -no-feature-$PN not producing the expected effect.
> Well, dependency checks being executed for disabled modules causing this bug.
Some investigation revealed that the "skip this module" check in each subdir of qttools, e.g.:

    requires(qtConfig(qdbus))

does NOT cause the evaluation of the current .pro file to stop and return early. All following checks are still executed. This is annoying because some later checks such as

    qtConfig(dom)

complain loudly and error out if the feature being tested ("dom" in this example) is neither in enabled_features nor in disabled_features of any of the installed Qt5 modules.

One workaround is to add "|return()" after each "requires(...)" invocation in src/${foo}/${foo}.pro

Though, I need to ask, why can't we just run qmake&&make in the QT5_TARGET_SUBDIRS like we used to? QT5_TARGET_SUBDIRS was dropped [1] from some but not all qttools ebuilds, but I'm not sure why. This would be in addition to running qmake from the root dir, which seems to be required now [2] and there's not much we can do about it.

[1] https://github.com/gentoo/qt/pull/218
[2] https://bugs.gentoo.org/716514
Comment 11 Andreas Sturmlechner gentoo-dev 2021-09-04 13:46:38 UTC
(In reply to Davide Pesavento from comment #10)
> One workaround is to add "|return()" after each "requires(...)" invocation
> in src/${foo}/${foo}.pro
We shall look into that, thanks.

(In reply to Davide Pesavento from comment #10)
> Though, I need to ask, why can't we just run qmake&&make in the
> QT5_TARGET_SUBDIRS like we used to? QT5_TARGET_SUBDIRS was dropped [1] from
> some but not all qttools ebuilds, but I'm not sure why. This would be in
> addition to running qmake from the root dir, which seems to be required now
> [2] and there's not much we can do about it.
> 
> [1] https://github.com/gentoo/qt/pull/218
> [2] https://bugs.gentoo.org/716514

The current solution enabled us to drop (see commit d6765662) the following hackery after several back and forths [1] from bugs about different behaviour between release and live build mode:

> src_configure() {
>       # Most of qttools require files that are only generated when qmake is
>       # run in the root directory.
>       # Related bugs: 633776, 676948, and 716514.
>       mkdir -p "${QT5_BUILD_DIR}" || die
>       qt5_qmake "${QT5_BUILD_DIR}"
>       cp "${S}"/qttools-config.pri "${QT5_BUILD_DIR}" || die
>       qt5-build_src_configure
> }

Those were required for dev-qt/designer, dev-qt/pixeltool, dev-qt/qdoc (the fix did look slightly different there), dev-qt/qtdiag, dev-qt/qtpaths, dev-qt/qtplugininfo. I guess using the same method for the remaining qttools derived packages would be possible, but was not looked into because they seem to work without the previous hack. Interesting though that dev-qt/linguist-tools was not converted and still uses the old method.

[1] https://bugs.gentoo.org/676948
Comment 12 Davide Pesavento gentoo-dev 2021-09-04 18:35:17 UTC
(In reply to Andreas Sturmlechner from comment #11)
> The current solution enabled us to drop (see commit d6765662) the following
> hackery [...]
Yeah I understand the part where we run qmake in the (shadow) root dir to create qttools-config.pri, it's a good solution and we should keep it.

The part I don't understand is why this logic (qt5_tools_configure function) is run only when QT5_TARGET_SUBDIRS is empty.

IOW, we can keep the existing qt5_tools_configure logic AND still set QT5_TARGET_SUBDIRS appropriately so that make is run only inside those subdirs, thus avoiding irrelevant dependency checks. I tested this with qtdiag-5.15.2 and it seems to work, but I haven't tried any live ebuilds yet (and I'll be offline for the next several days).

> Interesting though that
> dev-qt/linguist-tools was not converted and still uses the old method.
linguist-tools has QT5_TARGET_SUBDIRS=(src/linguist). That prevents the qt5_tools_configure logic from running which means qttools-config.pri is not created. However, the .pro file in src/linguist does require that file to exist, so the aforementioned hackery had to be kept in the ebuild.

Again, as I said above, I don't know why qt5_tools_configure and QT5_TARGET_SUBDIRS are mutually exclusive.
Comment 13 Andreas Sturmlechner gentoo-dev 2021-09-05 11:07:20 UTC
(In reply to Davide Pesavento from comment #12)
> (In reply to Andreas Sturmlechner from comment #11)
> > The current solution enabled us to drop (see commit d6765662) the following
> > hackery [...]
> Yeah I understand the part where we run qmake in the (shadow) root dir to
> create qttools-config.pri, it's a good solution and we should keep it.
> 
> The part I don't understand is why this logic (qt5_tools_configure function)
> is run only when QT5_TARGET_SUBDIRS is empty.
I think that was simply done to keep both methods entirely separate so as to not break existing stable ebuilds using QT5_TARGET_SUBDIRS.

(In reply to Davide Pesavento from comment #12)
> IOW, we can keep the existing qt5_tools_configure logic AND still set
> QT5_TARGET_SUBDIRS appropriately so that make is run only inside those
> subdirs, thus avoiding irrelevant dependency checks. I tested this with
> qtdiag-5.15.2 and it seems to work, but I haven't tried any live ebuilds yet
> (and I'll be offline for the next several days).
Since all stable qttools submodules in tree are currently still EAPI-7, I'm thinking of replacing that with an EAPI==8 check and try out your suggestion.
Comment 14 Larry the Git Cow gentoo-dev 2021-09-05 20:15:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/qt.git/commit/?id=18416c5d4797ba363d217e574e967c15aaf39eaa

commit 18416c5d4797ba363d217e574e967c15aaf39eaa
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-05 11:17:11 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-05 18:23:24 +0000

    qt5-build.eclass: Always run qt5_tools_configure for QT5_MODULE=qttools
    
    Run qt5_qmake directly inside qt5_tools_configure(), copy the resulting
    qttools-config.pri into QT5_BUILD_DIR again.
    
    Add linguist-tools handling.
    
    Bug: https://bugs.gentoo.org/728278
    Bug: https://bugs.gentoo.org/811147
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/qt5-build.eclass | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
Comment 15 Larry the Git Cow gentoo-dev 2021-09-08 16:55:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aad1931f8a03c77c16f6664d51afdc190efe8aa

commit 2aad1931f8a03c77c16f6664d51afdc190efe8aa
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-05 11:17:11 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-08 16:54:32 +0000

    qt5-build.eclass: Always run qt5_tools_configure for QT5_MODULE=qttools
    
    Run qt5_qmake directly inside qt5_tools_configure(), copy the resulting
    qttools-config.pri into QT5_BUILD_DIR again.
    
    Add linguist-tools handling.
    
    Closes: https://bugs.gentoo.org/728278
    Closes: https://bugs.gentoo.org/811147
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/qt5-build.eclass | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)