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:17:19 UTC 2013
> On Oct. 27, 2013, 3:06 p.m., David Faure wrote:
> > Looks good to me. I'm surprised by the fact that FindQt4 would accept Qt5, I thought there was a check in there to make it refuse Qt5. Maybe your cmake is from before that additional check?
> >
> > From cmake git:
> >
> > commit 153242601e22d6f06e1f14dc55d70c2a42b2ec5f
> > Merge: 28490ec 2112341
> > Author: Brad King <brad.king at kitware.com>
> > Date: Tue Mar 12 13:47:08 2013 -0400
> >
> > Merge topic 'findqt4-withqt5'
> >
> > 2112341 FindQt4: Do not use qmake from Qt5
> >
> > This is only in cmake >= 2.8.11, though.
Yes, I think my cmake was older at that time when I was trying to build the master branch. After finding the correct frameworks branch cmake needed an update. Didn't realise it can influence this.
- Casian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112969/#review42448
-----------------------------------------------------------
On Sept. 28, 2013, 8:16 a.m., Casian Andrei wrote:
>
> -----------------------------------------------------------
> 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.
>
>
> 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/2427201c/attachment.html>
More information about the Kde-buildsystem
mailing list