Review Request 112969: Try to compile a basic Qt application before checking for -fvisibility=hidden
Casian Andrei
skeletk13 at gmail.com
Mon Oct 28 14:21:11 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112969/
-----------------------------------------------------------
(Updated Oct. 28, 2013, 2:21 p.m.)
Status
------
This change has been marked as submitted.
Review request for Build System.
Repository: kdelibs
Description
-------
If there is a problem with finding the Qt includes, then
FindKDE4Internal tells the user that Qt is not compiled correctly, and
it is not straight forward to realise that it is a false alarm.
Introduce a simple check for compiling a barebone Qt application before
attempting to check for -fvisibility=hidden. This way, the error message
states that Qt has not been found correctly, preventing confusion.
Update: I should have checked out the frameworks branch, not master... I was under the impression that it was merged into master :( . But perhaps this patch is still useful for KDE/4.11.
The error came from FindQt4 not finding the "Qt" include, which is not present with Qt5. Makes sense.
Diffs
-----
cmake/modules/FindKDE4Internal.cmake 7922b09
Diff: http://git.reviewboard.kde.org/r/112969/diff/
Testing
-------
When trying without these changes:
-------------
-- Found Qt-Version 5.1.1 (using /usr/bin/qmake)
-- Building kdelibs...
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /usr/local/src/kdesrc/build/kdelibs/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at cmake/modules/FindKDE4Internal.cmake:1294 (message):
Qt compiled without support for -fvisibility=hidden. This will break
plugins and linking of some applications. Please fix your Qt installation
(try passing --reduce-exports to configure).
Call Stack (most recent call first):
CMakeLists.txt:56 (find_package)
--------------
Scary!
--------------
When trying after these changes:
-- Found Qt-Version 5.1.1 (using /usr/bin/qmake)
-- Building kdelibs...
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /usr/local/src/kdesrc/build/kdelibs/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at cmake/modules/FindKDE4Internal.cmake:1308 (message):
Unable to compile a basic Qt application. Qt has not been found correctly.
Call Stack (most recent call first):
CMakeLists.txt:56 (find_package)
--------------
Less scary :-)
Thanks,
Casian Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20131028/95b6e691/attachment-0001.html>
More information about the Kde-buildsystem
mailing list