Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672602 - dev-qt/qtcore-5.11.3 configure failed on Gentoo Prefix
Summary: dev-qt/qtcore-5.11.3 configure failed on Gentoo Prefix
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
Depends on:
Reported: 2018-12-06 06:35 UTC by Sammy Pfeiffer
Modified: 2018-12-13 07:37 UTC (History)
2 users (show)

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

build.log (build.log,148.77 KB, text/plain)
2018-12-06 06:35 UTC, Sammy Pfeiffer
qtcore-5.9.6 successful build log (qtcore-5.9.6_build.log,939.32 KB, text/plain)
2018-12-11 11:06 UTC, Sammy Pfeiffer

Note You need to log in before you can comment on or make changes to this bug.
Description Sammy Pfeiffer 2018-12-06 06:35:17 UTC
Created attachment 557138 [details]

I'm building dev-qt/qtcore as part of the dependecy tree of another package.

I found out that dev-qt/qtcore-5.11.2-r1 and dev-qt/qtcore-5.11.1-r1 don't build on Gentoo Prefix (amd64). dev-qt/qtcore-5.9.6-r1 does build & install correctly.

Find emerge info here:
emerge --info '=dev-qt/qtcore-5.11.2-r1::gentoo'
Portage 2.3.52 (python 2.7.15-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-8.2.0, glibc-2.28-r2, 4.15.0-39-generic x86_64)
                         System Settings
System uname: Linux-4.15.0-39-generic-x86_64-Intel-R-_Xeon-R-_CPU_E5-1660_0_@_3.30GHz-with-debian-stretch-sid
KiB Mem:    16351280 total,   2219912 free
KiB Swap:   62499832 total,  62499832 free
Timestamp of repository gentoo: Tue, 04 Dec 2018 17:00:01 +0000
Head commit of repository gentoo: a894896c394e7dd74f33df984e0ccf8512a623d0
Head commit of repository ros-overlay: 9696239114807eb8c867ddd99fa9abfb237e014b

sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p3) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.13.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.14::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r1::gentoo
sys-devel/gcc:            8.2.0-r5::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: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r2::gentoo

    location: /home/user/gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

    location: /home/user/gentoo/usr/local/portage
    sync-type: git
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/sandbox.d /etc/terminfo /tmp/gentoo/etc/gentoo-release"
CXXFLAGS="-O2 -pipe -O2 -pipe"
EMERGE_DEFAULT_OPTS="--jobs 3 --load-average 10.0"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 libtirpc ncurses nls nptl openmp pcre prefix readline seccomp ssl tcpd unicode zlib" 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 plan sheets stage 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" 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="ruby23 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"

emerge -pqv '=dev-qt/qtcore-5.11.2-r1::gentoo'
[ebuild     U ] dev-qt/qtcore-5.11.2-r1 [5.9.6-r1] USE="-debug -icu -systemd -test" 

(Note I just succesfully build 5.9.6-r1).

I can provide a Docker image with the exact environment reproducible if you'd like.
Comment 1 Sammy Pfeiffer 2018-12-10 15:06:27 UTC
Same error now updated to version 5.11.3.

The main issue is the error line:

Could not find qmake spec ''.

Which I can't figure out from where it comes.

This is blocking me... an anyone give me a hint?
Comment 2 Sammy Pfeiffer 2018-12-11 11:06:27 UTC
Created attachment 557566 [details]
qtcore-5.9.6 successful build log

Build log for qtcore-5.9.6 which successfully builds.

The only differences (before reaching the point where qmake is called, where it fails for qtcore 5.11+) are:

* The name of the package: qtbase-everywhere-src (5.11+) vs qtbase-opensource-src (5.9.6)
* The configuration arguments, 5.11+ adds '-platform linux-g++'
* The order in which the objects are compiled:

x86_64-pc-linux-gnu-g++ -o "../bin/qmake" main.o meta.o option.o project.o property.o ioutils.o proitems.o qmakebuiltins.o qmakeevaluator.o qmakeglobals.o qmakeparser.o qmakevfs.o pbuilder_pbx.o makefile.o makefiledeps.o metamakefile.o projectgenerator.o unixmake2.o unixmake.o mingw_make.o msbuild_objectmodel.o msvc_nmake.o msvc_objectmodel.o msvc_vcproj.o msvc_vcxproj.o winmakefile.o xmloutput.o qtextcodec.o qutfcodec.o qglobal.o qlogging.o qmalloc.o qnumeric.o qoperatingsystemversion.o qrandom.o qabstractfileengine.o qbuffer.o qdatastream.o qdebug.o qdir.o qdiriterator.o qfile.o qfiledevice.o qfileinfo.o qfilesystemengine.o qfilesystementry.o qfsfileengine.o qfsfileengine_iterator.o qiodevice.o qsettings.o qtemporaryfile.o qtextstream.o qjsonarray.o qjson.o qjsondocument.o qjsonobject.o qjsonparser.o qjsonvalue.o qmetatype.o qsystemerror.o qvariant.o quuid.o qarraydata.o qbitarray.o qbytearray.o qbytearraymatcher.o qcryptographichash.o qdatetime.o qhash.o qlinkedlist.o qlist.o qlocale.o qlocale_tools.o qmap.o qregexp.o qringbuffer.o qstringbuilder.o qstring_compat.o qstring.o qstringlist.o qversionnumber.o qvsnprintf.o qxmlstream.o qxmlutils.o qcore_unix.o qfilesystemengine_unix.o qfilesystemiterator_unix.o qfsfileengine_unix.o qlocale_unix.o  qlibraryinfo.o  -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections

x86_64-pc-linux-gnu-g++ -o "../bin/qmake" project.o option.o property.o main.o ioutils.o proitems.o qmakevfs.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qringbuffer.o qdebug.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qoperatingsystemversion.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_unix.o qfilesystemiterator_unix.o qfsfileengine_unix.o qlocale_unix.o  qlibraryinfo.o  -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections

I can't see more differences.
Comment 3 Sammy Pfeiffer 2018-12-11 15:38:05 UTC
I added some prints in qmake/library/qmakeevaluator.cpp: 

Mainly in the function void QMakeEvaluator::updateMkspecPaths()

I've printed both for 5.9.6 and for 5.11.2: 

DEBUG QMakeEvaluator::updateMkspecPaths m_buildRoot path '/home/user/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.6/work/qtbase-opensource-src-5.9.6' 
DEBUG QMakeEvaluator::updateMkspecPaths QT_HOST_DATA/get path '/home/user/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.6/work/qtbase-opensource-src-5.9.6' 
DEBUG QMakeEvaluator::updateMkspecPaths QT_HOST_DATA/src path '/home/user/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.6/work/qtbase-opensource-src-5.9.6' 

DEBUG QMakeEvaluator::updateMkspecPaths QT_HOST_DATA/get path '/home/user/gentoo/var/tmp/portage/dev-qt/qtcore-5.11.2-r1/work/qtbase-everywhere-src-5.11.2/bin' 
DEBUG QMakeEvaluator::updateMkspecPaths QT_HOST_DATA/src path '/home/user/gentoo/var/tmp/portage/dev-qt/qtcore-5.11.2-r1/work/qtbase-everywhere-src-5.11.2/bin' 

Here I observe that in 5.11.2 the only paths that contain something is QT_HOST_DATA/get QT_HOST_DATA/src. But they point to ${WORKDIR}/bin instead of just ${WORKDIR}. 

And also I printed the value (on the moment it's evaluted) of QMAKESPEC (the internal variable that holds the final value). On 5.9.6 it contains 'dummy' and on 5.11.2 it's empty ''. ('dummy' is a valid value). 

I've been doing grep's all around to try to find where is QMAKESPEC, QT_HOST_DATA, and in general any of these variables set... but I haven't found anything.
Comment 4 Sammy Pfeiffer 2018-12-12 02:55:03 UTC
Found what it is... it's related to Docker.

I found out if I used the Gentoo Prefix deployed in a host directly the compilation went thru. Which was very suspicious, extra googling ended up in:


Which, mainly, it's a problem of libseccomp being outdated. Or Docker being outdated. Or both. Anyways, for me it works to use the workaround:

Run docker (when building QT) with:

--security-opt seccomp:unconfined

Ideally libseccomp will be updated sometime in Ubuntu 16.04 and this won't happen again.
Comment 5 Sammy Pfeiffer 2018-12-13 07:37:08 UTC
(In reply to Sammy Pfeiffer from comment #4)
> Found what it is... it's related to Docker.
> I found out if I used the Gentoo Prefix deployed in a host directly the
> compilation went thru. Which was very suspicious, extra googling ended up in:
> an-error-could-not-find-qmake-spec/52120885
> And 
> Which, mainly, it's a problem of libseccomp being outdated. Or Docker being
> outdated. Or both. Anyways, for me it works to use the workaround:
> Run docker (when building QT) with:
> --security-opt seccomp:unconfined
> Ideally libseccomp will be updated sometime in Ubuntu 16.04 and this won't
> happen again.

I found a way to patch it in case anyone else encounters it and needs a workaround.

Add to your /etc/portage/patches/dev-qt/qtcore

This patch :

From a8a73f59afa5da1f7b2669d7562e3871f0b24985 Mon Sep 17 00:00:00 2001
From: Sammy Pfeiffer <>
Date: Thu, 13 Dec 2018 18:29:54 +1100
Subject: [PATCH] Overcome statx libseccomp issue with running inside of a
 container by disabling statx

 src/corelib/io/qfilesystemengine_unix.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 5a5a3a8..b413828 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -102,6 +102,11 @@ extern "C" NSString *NSTemporaryDirectory();
+// If running inside of a container with the host having libseccomp < v2.3.3
+// and a kernel > v4.13 and docker < 18.04 Qtcore fails to compile
+// As seen in
 #ifndef STATX_ALL
 struct statx { mode_t stx_mode; };      // dummy

The ideal way would be... detect if we are inside of a Docker container (I found an interesting link on how to do that here: ) and if we are, apply the patch to be able to compile Qt.

That said, the configure script should obey -disable-feature-statx (which should disable statx directly) but it doesn't.