Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581874 - =dev-util/qbs-1.4.5 stabilization
Summary: =dev-util/qbs-1.4.5 stabilization
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Keywording and Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: STABLEREQ
Depends on: qt-5.5.1-stable 585398
Blocks: 581878
  Show dependency tree
 
Reported: 2016-05-02 19:50 UTC by Davide Pesavento
Modified: 2016-06-16 13:58 UTC (History)
0 users

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


Attachments
build.log (build.log,342.26 KB, text/plain)
2016-06-15 11:43 UTC, Michael Palimaka (kensington)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Pesavento gentoo-dev 2016-05-02 19:50:43 UTC
Needed for the stabilization of a newer dev-qt/qt-creator.
Comment 1 Michael Palimaka (kensington) gentoo-dev 2016-06-12 15:59:15 UTC
When built with FEATURES="test", I'm getting a libqbscore.so installed that links to libQt5Test.so.5.
Comment 2 Davide Pesavento gentoo-dev 2016-06-12 22:35:48 UTC
(In reply to Michael Palimaka (kensington) from comment #1)
> When built with FEATURES="test", I'm getting a libqbscore.so installed that
> links to libQt5Test.so.5.

Cannot reproduce:

/tmp/portage/dev-util/qbs-1.4.5/image $ scanelf -nqy usr/lib64/libqbs*
libQt5Script.so.5,libQt5Gui.so.5,libQt5Xml.so.5,libQt5Core.so.5,libpthread.so.0,libstdc++.so.6,libgcc_s.so.1,libc.so.6  usr/lib64/libqbscore.so.1.4.5
libqbscore.so.1,libQt5Core.so.5,libstdc++.so.6,libgcc_s.so.1,libc.so.6  usr/lib64/libqbsqtprofilesetup.so.1.4.5

I suspect libQt5Test.so is somehow being leaked by one or more qt libraries. Try something like `grep Qt5Test /usr/lib/pkgconfig/Qt5*.pc` and/or `scanelf -nqy /usr/lib/libQt5*`.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2016-06-15 11:19:10 UTC
$ scanelf -nqy /usr/lib/libQt5* | grep -i test
libQt5Test.so.5,libQt5Widgets.so.5,libQt5Gui.so.5,libQt5Core.so.5,libQt5Quick.so.5,libQt5Qml.so.5,libstdc++.so.6,libc.so.6  /usr/lib/libQt5QuickTest.so.5.6.1
libQt5Core.so.5,libpthread.so.0,libstdc++.so.6,libgcc_s.so.1,libc.so.6  /usr/lib/libQt5Test.so.5.6.1

$ grep Qt5Test /usr/lib/pkgconfig/Qt5*.pc
/usr/lib/pkgconfig/Qt5QuickTest.pc:Libs.private: -lQt5Test -lQt5Widgets -lQt5Gui -lQt5Core -lpthread  -lQt5Quick -lQt5Qml -lQt5Gui -lQt5Network -lQt5Core -lpthread -lGL  
/usr/lib/pkgconfig/Qt5QuickTest.pc:Requires: Qt5Core Qt5Test Qt5Widgets
/usr/lib/pkgconfig/Qt5Test.pc:Libs: -lQt5Test

$ scanelf -nqy /usr/lib64/libqbs*
libQt5Script.so.5,libQt5Test.so.5,libQt5Gui.so.5,libQt5Xml.so.5,libQt5Core.so.5,libpthread.so.0,libstdc++.so.6,libgcc_s.so.1,libc.so.6  /usr/lib64/libqbscore.so.1.4.5
libqbscore.so.1,libQt5Core.so.5,libstdc++.so.6,libgcc_s.so.1,libc.so.6  /usr/lib64/libqbsqtprofilesetup.so.1.4.5
Comment 4 Davide Pesavento gentoo-dev 2016-06-15 11:34:47 UTC
Thanks. Can you also attach a build.log of dev-util/qbs-1.4.5 please?
Comment 5 Michael Palimaka (kensington) gentoo-dev 2016-06-15 11:43:04 UTC
Created attachment 437640 [details]
build.log
Comment 6 Davide Pesavento gentoo-dev 2016-06-16 01:00:22 UTC
I'm really puzzled by this. I tried reproducing on an almost identical system (same compiler, same linker, same CXXFLAGS and LDFLAGS; the only differences are that I'm using a non-hardened profile, and that I have Qt 5.6.0 instead of 5.6.1), but I still can't reproduce. I compared our build logs line-by-line and they're practically identical, including the presence of -DQT_TESTLIB_LIB and -lQt5Test in both. Nevertheless, my libqbscore.so ends up *not* being linked to libQt5Test.so. So, unless --as-needed is behaving randomly, I'm inclined to think the difference is due to hardened vs non-hardened compiler.

In any case, there are a couple of files in src/lib/corelib/ that do include either <QtTest> or <QTest>. These files are included in the build only when qbs is configured with qbs_enable_unit_tests, which we do when USE=test is enabled.

So, although I don't understand why the dependency doesn't end up in DT_NEEDED on my system, I think it's clear that it's indeed required for USE=test because QtTest *is* used in library code. Therefore I've moved dev-qt/qttest from DEPEND to both {,R}DEPEND in commit 1ffe27368ea16216067b7a4f92c82e57d6baff10.
Comment 7 Michael Palimaka (kensington) gentoo-dev 2016-06-16 13:58:48 UTC
amd64/x86 stable