Review Request 112969: Try to compile a basic Qt application before checking for -fvisibility=hidden
Casian Andrei
skeletk13 at gmail.com
Sat Sep 28 08:16:38 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112969/
-----------------------------------------------------------
(Updated Sept. 28, 2013, 8:16 a.m.)
Review request for Build System.
Changes
-------
Change branch to KDE/4.11, where it might still be useful in some rare corner case for a strange system...
Description (updated)
-------
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/20130928/4cd05193/attachment.html>
More information about the Kde-buildsystem
mailing list