Review Request 112969: Try to compile a basic Qt application before checking for -fvisibility=hidden

Casian Andrei skeletk13 at gmail.com
Fri Sep 27 17:19:59 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112969/
-----------------------------------------------------------

Review request for Build System.


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.


Btw, if you know a fix for the error, tell me, i am still looking into it. I have both Qt4 and Qt5 installed. I had the same error when trying to build Phonon, but after checking a option in CMakeGui about Qt5, it started working. guess i can look there to see how to solve this issue.


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/20130927/940b12bd/attachment.html>


More information about the Kde-buildsystem mailing list