Summary: | dev-qt/qtcore-5.11.3 configure failed on Gentoo Prefix | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Sammy Pfeiffer <sammypfeiffer> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | qt, sammypfeiffer |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
qtcore-5.9.6 successful build log |
Description
Sammy Pfeiffer
2018-12-06 06:35:17 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? 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:
5.11+:
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
5.9.6:
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.
I added some prints in qmake/library/qmakeevaluator.cpp: https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/src/shared/proparser/qmakeevaluator.cpp Mainly in the function void QMakeEvaluator::updateMkspecPaths() I've printed both for 5.9.6 and for 5.11.2: 5.9.6: 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' 5.11.2: 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. 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: https://stackoverflow.com/questions/50785575/configuring-qtbase-fails-with-an-error-could-not-find-qmake-spec/52120885 And https://bugreports.qt.io/browse/QTBUG-66930 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. (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: > > https://stackoverflow.com/questions/50785575/configuring-qtbase-fails-with- > an-error-could-not-find-qmake-spec/52120885 > > And > > https://bugreports.qt.io/browse/QTBUG-66930 > > 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 https://gist.github.com/awesomebytes/856d1d1b0d267f90241451d933a17867 : From a8a73f59afa5da1f7b2669d7562e3871f0b24985 Mon Sep 17 00:00:00 2001 From: Sammy Pfeiffer <Sammy.Pfeiffer@student.uts.edu.au> 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(); # undef STATX_BASIC_STATS #endif +// 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 https://bugs.gentoo.org/672602 +# undef STATX_BASIC_STATS + #ifndef STATX_ALL struct statx { mode_t stx_mode; }; // dummy #endif -- 2.7.4 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: https://tuhrig.de/how-to-know-you-are-inside-a-docker-container/ ) 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. |