View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013985 | CMake | CMake | public | 2013-03-05 11:39 | 2013-10-07 10:04 | ||||
Reporter | Janne Rönkkö | ||||||||
Assigned To | Clinton Stimpson | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux | OS | Archlinux | OS Version | |||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | CMake 2.8.11 | Fixed in Version | CMake 2.8.11 | ||||||
Summary | 0013985: FindQt4 fails if Qt5 qmake is called qmake | ||||||||
Description | If Qt4 and Qt5 are installed so that qmake is qmake from Qt5 and qmake4 or qmake-qt4 is from Qt4 the FindQt4 module does not find Qt4 but says it found Qt5. On Archlinux the qmake is currently from Qt5 and qmake-qt4 is the qmake from Qt4. The attached patch fixes the issue. I left out some strange find_program code that should not be needed in reasonably configured system. | ||||||||
Steps To Reproduce | $ cat ../CMakeLists.txt cmake_minimum_required( VERSION 2.8 ) project( test ) find_package( Qt4 REQUIRED ) $ cmake .. -- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.7.2 -- Check for working C compiler: /usr/lib/colorgcc/bin/cc -- Check for working C compiler: /usr/lib/colorgcc/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/lib/colorgcc/bin/c++ -- Check for working CXX compiler: /usr/lib/colorgcc/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - not found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found CMake Error at /usr/share/cmake-2.8/Modules/FindQt4.cmake:1216 (message): Found unsuitable Qt version "5.0.1" from /usr/bin/qmake, this code requires Qt 4.x Call Stack (most recent call first): CMakeLists.txt:5 (find_package) -- Configuring incomplete, errors occurred! | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | 0001-Fix-FindQt4-module.patch [^] (5,265 bytes) 2013-03-05 11:39 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0032526) Stephen Kelly (developer) 2013-03-07 02:01 |
See http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5098 [^] and http://doc-snapshot.qt-project.org/5.0/qtdoc/cmake-manual.html [^] and maybe http://thread.gmane.org/gmane.comp.lib.qt.releasing/744 [^] Why is arch not using qtchooser? |
(0032529) Janne Rönkkö (reporter) 2013-03-07 08:29 |
I'm not Archlinux developer, just a user. I have my own Qt4 application that uses CMake. My CMake files has 'find_package( Qt4 REQUIRED )' which currently fails and thus the bug (and the patch). I did not figure out how using qtchooser would help in this case. Does it change the qmake binary somehow? Or shouldn't I use find_package( Qt4 )? |
(0032532) Marcus D. Hanwell (developer) 2013-03-07 14:02 |
Why not have FindQt4 find executables with the -qt4 extension first? If they are there, they are pretty much guaranteed to be Qt4, and I would ideally like to avoid asking developers if they have qtchooser and/or if the defaults they are using are for Qt4. |
(0032558) Janne Rönkkö (reporter) 2013-03-09 07:56 |
I agree with Marcus. In fact, I first thought that I would submit patch that would put qmake to the last in the array. Then I thought that it might be reasonable to refactor the search logic a bit to get more robust implementation. |
(0032578) Andrea Scarpino (reporter) 2013-03-11 12:09 |
Thank you dude. This patch is the right way to fix this issue on every distro and installation. |
(0032610) Brad King (manager) 2013-03-13 13:39 |
Patch applied with minor tweaks by Clinton: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21123416 [^] plus a typo fix reported one day after this was merged to master: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=161a7937 [^] |
(0034003) Robert Maynard (manager) 2013-10-07 10:04 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-03-05 11:39 | Janne Rönkkö | New Issue | |
2013-03-05 11:39 | Janne Rönkkö | File Added: 0001-Fix-FindQt4-module.patch | |
2013-03-07 02:01 | Stephen Kelly | Note Added: 0032526 | |
2013-03-07 08:29 | Janne Rönkkö | Note Added: 0032529 | |
2013-03-07 14:02 | Marcus D. Hanwell | Note Added: 0032532 | |
2013-03-09 07:56 | Janne Rönkkö | Note Added: 0032558 | |
2013-03-11 12:09 | Andrea Scarpino | Note Added: 0032578 | |
2013-03-13 13:39 | Brad King | Note Added: 0032610 | |
2013-03-13 13:39 | Brad King | Assigned To | => Clinton Stimpson |
2013-03-13 13:39 | Brad King | Status | new => resolved |
2013-03-13 13:39 | Brad King | Resolution | open => fixed |
2013-03-13 13:39 | Brad King | Fixed in Version | => CMake 2.8.11 |
2013-03-13 13:39 | Brad King | Target Version | => CMake 2.8.11 |
2013-10-07 10:04 | Robert Maynard | Note Added: 0034003 | |
2013-10-07 10:04 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |