Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Solved: dev-qt/qtcore-5.11.3 (and friends) not emerging
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
awesomebytes
n00b
n00b


Joined: 22 Nov 2018
Posts: 16

PostPosted: Tue Dec 11, 2018 8:08 am    Post subject: Solved: dev-qt/qtcore-5.11.3 (and friends) not emerging Reply with quote

Hello everyone.

I've reported in bug #672602 that qtcore is not emerging on Gentoo Prefix (amd64 and x86, over a Ubuntu 16.04).

As you may see in the buildlog: https://bugs.gentoo.org/attachment.cgi?id=557138

The error comes after bootstrapping qmake, it is called, and qmake just says:

Code:
Could not find qmake spec ''.


Note that dev-qt/qtcore-5.9.6 did emerge before (it was just removed from the repo, so now it's more cumbersome to try it).

I've been playing around trying to make the configure script do anything, added a bunch of prints to see what is actually being called... I tried to source the environment file and call standalone functions from the qt5 ebuild class (with no success as they fail saying there is no method called 'default').

Link to the eclass: https://gitweb.gentoo.org/repo/gentoo.git/plain/eclass/qt5-build.eclass

I suspect the bootstrapped qmake may have something wrong regarding paths that's not following EPREFIX?

Anyways, any help would be greatly appreciated. (I'm currently blocked by this on the actual work I'm doing).

I can offer either a Docker image:

Code:

# Pull the image, 5.5GB~
docker pull awesomebytes/roogp_ros_kinetic_ros_base:205
# Run it
docker run -it awesomebytes/roogp_ros_kinetic_ros_base:205
# You'll be dropped in a bash shell, now enter the prefix environment
gentoo/startprefix
# The actual prefix is in /tmp/gentoo (which is a softlink to ~/gentoo)


Or extract the already bootstrapped Gentoo Prefix (part of my continuous integration pipeline):

Code:

# Download the parts (977MB, 977MB, 62MB) (aria2c makes it faster, but you can use wget/curl)
aria2c -x10 https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix/releases/download/release%2F2018-12-10T13at16plus00at00/gentoo_on_tmp_with_ros-kinetic_ros_base-amd64_2018-12-10T13at16plus00at00.tar.gz.part-00
aria2c -x10 https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix/releases/download/release%2F2018-12-10T13at16plus00at00/gentoo_on_tmp_with_ros-kinetic_ros_base-amd64_2018-12-10T13at16plus00at00.tar.gz.part-01
wget https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix/releases/download/release%2F2018-12-10T13at16plus00at00/gentoo_on_tmp_with_ros-kinetic_ros_base-amd64_2018-12-10T13at16plus00at00.tar.gz.part-02
# Unite the splitted parts
cat gentoo_on_tmp_with_ros-kinetic_ros_base-amd64_2018-12-10T13at16plus00at00.tar.gz.part-* > gentoo_on_tmp_with_ros-kinetic_ros_base-amd64_2018-12-10T13at16plus00at00.tar.gz
# Extract (4GB)
tar xvf gentoo_on_tmp*.tar.gz
# Cleanup
rm gentoo_on_tmp*
# Start prefix
./gentoo/startprefix
# The actual prefix is in /tmp/gentoo (which is a softlink to ~/gentoo)


Once in the prefixed shell, to reproduce the problem you'll need to do:

Code:

echo ">=dev-libs/libpcre2-10.32 pcre16" >> /tmp/gentoo/etc/portage/package.use
emerge dev-qt/qtcore
# This will emerge a couple of dependencies and finally dev-qt/qtcore-5.11.2-r1
# the same problem applies on any qt thing version 5.11+, sorry the tree is from last week


Last edited by awesomebytes on Wed Dec 12, 2018 2:57 am; edited 1 time in total
Back to top
View user's profile Send private message
awesomebytes
n00b
n00b


Joined: 22 Nov 2018
Posts: 16

PostPosted: Tue Dec 11, 2018 11:12 am    Post subject: Reply with quote

As I updated the bug report:

Build log for qtcore-5.9.6 which successfully builds: https://gist.github.com/awesomebytes/63002700f5a62975fa0f9c4efb7badab

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.
Back to top
View user's profile Send private message
awesomebytes
n00b
n00b


Joined: 22 Nov 2018
Posts: 16

PostPosted: Tue Dec 11, 2018 3:34 pm    Post subject: Reply with quote

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().The prints looks like:

Code:

   const auto paths = m_option->getPathListEnv(QLatin1String("QMAKEPATH"));
    for (const QString &it : paths){
        ret << it + concat;
fprintf(stderr, "DEBUG QMakeEvaluator::updateMkspecPaths QMAKEPATH paths path '%s'\n",
it.toUtf8().constData());
}

    for (const QString &it : qAsConst(m_qmakepath)){
        ret << it + concat;
fprintf(stderr, "DEBUG QMakeEvaluator::updateMkspecPaths m_qmakepath path '%s'\n",
it.toUtf8().constData());
}

    if (!m_buildRoot.isEmpty()){
        ret << m_buildRoot + concat;
fprintf(stderr, "DEBUG QMakeEvaluator::updateMkspecPaths m_buildRoot path '%s'\n",
m_buildRoot.toUtf8().constData());
}
    if (!m_sourceRoot.isEmpty()){
        ret << m_sourceRoot + concat;
fprintf(stderr, "DEBUG QMakeEvaluator::updateMkspecPaths m_sourceRoot path '%s'\n",
m_sourceRoot.toUtf8().constData());
}

    ret << m_option->propertyValue(ProKey("QT_HOST_DATA/get")) + concat;
fprintf(stderr, "DEBUG QMakeEvaluator::updateMkspecPaths QT_HOST_DATA/get path '%s'\n",
m_option->propertyValue(ProKey("QT_HOST_DATA/get")).toQString().toUtf8().constData());
    ret << m_option->propertyValue(ProKey("QT_HOST_DATA/src")) + concat;
fprintf(stderr, "DEBUG QMakeEvaluator::updateMkspecPaths QT_HOST_DATA/src path '%s'\n",
m_option->propertyValue(ProKey("QT_HOST_DATA/src")).toQString().toUtf8().constData());


I've printed both for 5.9.6 and for 5.11.2:

5.9.6:
Code:

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:
Code:

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.

Does anyone know some Qt developer/maintainer that could take a look please?
Back to top
View user's profile Send private message
awesomebytes
n00b
n00b


Joined: 22 Nov 2018
Posts: 16

PostPosted: Wed Dec 12, 2018 2:57 am    Post subject: Reply with quote

I updated the bug report with the 'fix': https://bugs.gentoo.org/672602

It was not a bug in QT itself but in the libseccomp package interacting with Docker. The trick is to run Docker with '--security-opt seccomp:unconfined' while building QT.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum