Bug 408118 - Krita 4.2.0 doens't compile with Qt 5.9.6 >= required version 5.6)
Summary: Krita 4.2.0 doens't compile with Qt 5.9.6 >= required version 5.6)
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-30 14:29 UTC by Moun
Modified: 2019-05-30 23:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
QtTest tree (3.71 KB, text/plain)
2019-05-30 19:13 UTC, Moun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moun 2019-05-30 14:29:42 UTC
Following the compilation tutorial of David Revoy :
https://www.davidrevoy.com/article193/compil-krita-from-source-code-on-linux-for-cats.

All required and optional components (except HEIF) have been installed. Qt minimal version required is 5.6 as shown in CMake output.

At make -jX step, I get a compile error involving QTest towards "17%" progression:

> [ 17%] Linking CXX executable KisDialogStateSaverTest
> CMakeFiles/KisDialogStateSaverTest.dir/KisDialogStateSaverTest.cpp.o: In function `KisDialogStateSaverTest::testSave()':
> /home/moun/krita/krita-4.2.0/libs/widgetutils/tests/KisDialogStateSaverTest.cpp:40: undefined reference to `bool QTest::qCompare<QString, char [5]>(QString const&, char const (&) [5], char const*, char const*, char const*, int)'
> CMakeFiles/KisDialogStateSaverTest.dir/KisDialogStateSaverTest.cpp.o: In function `KisDialogStateSaverTest::testRestore()':
> /home/moun/krita/krita-4.2.0/libs/widgetutils/tests/KisDialogStateSaverTest.cpp:58: undefined reference to `bool QTest::qCompare<QString, char [5]>(QString const&, char const (&) [5], char const*, char const*, char const*, int)'
> collect2: error: ld returned 1 exit status
> libs/widgetutils/tests/CMakeFiles/KisDialogStateSaverTest.dir/build.make:124: recipe for target 'libs/widgetutils/tests/KisDialogStateSaverTest' failed
> make[2]: *** [libs/widgetutils/tests/KisDialogStateSaverTest] Error 1
> CMakeFiles/Makefile2:2055: recipe for target 'libs/widgetutils/tests/CMakeFiles/KisDialogStateSaverTest.dir/all' failed
> make[1]: *** [libs/widgetutils/tests/CMakeFiles/KisDialogStateSaverTest.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....


Below the environnement:

OS : Slackware 64 14.2
KDE Plasma Version: 5.11.3
KDE Frameworks Version: 5.40.0
Qt Version: 5.9.6
Comment 1 Moun 2019-05-30 15:37:12 UTC
The compilation is successful* if in libs/widgetutils/tests/KisDialogStateSaverTest.cpp, "QCOMPARE" call lines are commented out.

*After compiling without optional components, but this it out of the scope. Indeed, I had to disable python3 SIP, but curiously cmake showed me PyQt missing as well as SIP, though I only uninstalled SIP.
Comment 2 Moun 2019-05-30 15:40:22 UTC
(I disabled SIP because SIP_MODULE_NAME wasn't defined in plugins/extensions/pykrita/sip/krita/sipkritapart0.cpp.)
Comment 3 Moun 2019-05-30 15:52:29 UTC
As requested on the IRC Krita channel, the QT installation is provided by AlienBob (https://alien.slackbook.org/blog), a famous contributor for Slackware.
Comment 4 vanyossi 2019-05-30 16:28:02 UTC
You are going to have to investigar this a little further, I went to the blog and at a glance could not find the Qt package you are using. Make sure Qt is compiled with all the necessary components. It looks as if Qt test is not installed. Please first check qt is compiled with the necessary parts. The recommended version of Qt for 4.2 is Qt 5.12.2.

About SIP: Latest Sip and PyQt are tricky to configure and work correctly on a python installation. Please make sure those are configured and working correctly.

you can run our scripts to know if sip or pyqt are installed properly krita. go krita/cmake/modules

FindPyQt5.py
FindSIP.py

A wrongly configuration of PyQt5 will import just fine in python3 console but with no symbols or methods.

In any case this probably is not a bug in krita but a bug in configuration as no one else has reported any of this failures. If you feel this is indeed a bug, you can reopen this report, but please provide more information on that Qt installation, what components were compiled in. Qt is very big package and is modular, and to trim compilation times: Tests, webkit and other components can be trimmed.
Comment 5 Moun 2019-05-30 19:08:19 UTC
Interesting output for FindPyQt5.py and FindSIP.py (if I check them properly):

> moun@somehost:~/path/to/krita-4.2.0/cmake/modules$ python3 FindPyQt5.py 
> Traceback (most recent call last):
>   File "FindPyQt5.py", line 9, in <module>
>     print("pyqt_version:%06.0x" % PyQt5.Qt.PYQT_VERSION)
> AttributeError: module 'PyQt5.Qt' has no attribute 'PYQT_VERSION'

> moun@somehost:~/path/to/krita-4.2.0/cmake/modules$ python3 FindSIP.py
> Traceback (most recent call last):
>   File "FindSIP.py", line 8, in <module>
>     import sipconfig
> ModuleNotFoundError: No module named 'sipconfig'

QTest is installed within Qt5 package (qt5-5.9.6-x86_64-1alien):

> /usr/include/qt5/QtTest/5.9.6/QtTest/
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/callgrind_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/cycle_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/linux_perf_event_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qabstracttestlogger_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qbenchmark_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qbenchmarkevent_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qbenchmarkmeasurement_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qbenchmarkmetric_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qbenchmarkperfevents_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qbenchmarktimemeasurers_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qbenchmarkvalgrind_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qcsvbenchmarklogger_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qplaintestlogger_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qsignaldumper_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qteamcitylogger_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestblacklist_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestcoreelement_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestcorelist_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestelement_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestelementattribute_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtesthelpers_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestlog_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestresult_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtesttable_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestutil_macos_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qtestxunitstreamer_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qxctestlogger_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qxmltestlogger_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/qxunittestlogger_p.h
> /usr/include/qt5/QtTest/5.9.6/QtTest/private/valgrind_p.h
> /usr/lib64/qt5/qml/QtTest/
> /usr/lib64/qt5/qml/QtTest/SignalSpy.qml
> /usr/lib64/qt5/qml/QtTest/TestCase.qml
> /usr/lib64/qt5/qml/QtTest/libqmltestplugin.so
> /usr/lib64/qt5/qml/QtTest/plugins.qmltypes
> /usr/lib64/qt5/qml/QtTest/qmldir
> /usr/lib64/qt5/qml/QtTest/testlogger.js

I can't tell if the error outputs is related to the version (too early) or the environment.
Comment 6 Moun 2019-05-30 19:13:06 UTC
Created attachment 120417 [details]
QtTest tree

Wrong output for QtTest tree. :-/

You'll find attached the accurate one.
Comment 7 vanyossi 2019-05-30 20:34:41 UTC
Yes, your Sip and pyqt installation are not properly installed. so Python cannot find the modules.

About your qt, i have no idea. maybe someone with more experience.
Comment 8 vanyossi 2019-05-30 20:35:40 UTC
I suggest you open a forum thread to work this issues as this is obviously a configuration problem and not a krita bug.
Comment 9 Moun 2019-05-30 23:23:50 UTC
Indeed, for Python-related issues, I may have encountered conflicts between package sources. The Qt 5.6 point seems to be more relevant here.