View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011619 | CMake | Modules | public | 2010-12-17 11:04 | 2011-06-06 18:25 | ||||
Reporter | Sam Hartsfield | ||||||||
Assigned To | Clinton Stimpson | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux | OS | RHEL | OS Version | 5 | ||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | Fixed in Version | CMake 2.8.4 | |||||||
Summary | 0011619: qmake-qt4 not found in 2.8.3 if qmake is from Qt 3 | ||||||||
Description | On my RHEL4/5 systems, the qmake in the path (and QTDIR) is version 3, so when using Qt 4, qmake-qt4 has to be used. FindQt4.cmake supports this, and it worked in CMake 2.8.2, but it's broken in CMake 2.8.3: CMake Error at /opt/cmake-2.8.3-Linux-i386/share/cmake-2.8/Modules/FindQt4.cmake:1148 (MESSAGE): Qt qmake not found! The problem appears to be line 482: "_qt4_query_qmake(QT_VERSION QTVERSION)". QTVERSION doesn't get set. Compare that to line 385 in 2.8.2, where EXEC_PROGRAM is called on the qmake executable to test the version. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0024237) Clinton Stimpson (developer) 2010-12-17 12:02 |
Can you give me the output from cmake when processing this: find_package(Qt4) message(STATUS "qmake=${QT_QMAKE_EXECUTABLE}") |
(0024248) Sam Hartsfield (reporter) 2010-12-17 16:22 |
qmake=/usr/local/qt-3.3.4/bin/qmake-NOTFOUND |
(0024252) Clinton Stimpson (developer) 2010-12-17 17:06 |
Is qmake-qt4 in your path? |
(0024256) Sam Hartsfield (reporter) 2010-12-17 17:44 |
Yes, qmake-qt4 is in my path. |
(0024258) Clinton Stimpson (developer) 2010-12-17 21:46 |
You'll have to help me reproduce this problem, because its working for me. I have /usr/bin/qmake (qt3) and /usr/bin/qmake-qt4 (qt4) I inserted messages in FindQt4.cmake as follows: @ -447,7 +447,9 @@ MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename) ENDMACRO (_QT4_ADJUST_LIB_VARS) function(_QT4_QUERY_QMAKE VAR RESULT) + message(STATUS "trying ${QT_QMAKE_EXECUTABLE} -query ${VAR}") exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output ) + message(STATUS "output is ${output}") if(NOT return_code) file(TO_CMAKE_PATH "${output}" output) set(${RESULT} ${output} PARENT_SCOPE) @@ -483,6 +485,7 @@ IF (QT_QMAKE_EXECUTABLE) # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path IF(NOT QTVERSION) + message("search for qmake4 or qmake-qt4") SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE) FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" and the output I get from a run is: ... -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- trying /usr/bin/qmake -query QT_VERSION -- output is **Unknown** search for qmake4 or qmake-qt4 -- trying /usr/bin/qmake-qt4 -query QT_VERSION -- output is 4.6.2 ... |
(0024269) Sam Hartsfield (reporter) 2010-12-20 00:22 |
It looks like that diff is against version 2.8.2, which is the working version; the problem first appears in 2.8.3. I'll look at it further tomorrow if you still don't experience the issue, but it looks like the problem is with the _qt4_query_qmake function; I'm guessing it's not setting the result variable for Qt3 qmake. |
(0025301) Hordur Johannsson (reporter) 2011-02-05 11:06 |
I have the same problem, I'm running cmake 2.8.3 on Ubuntu 10.10. qmake-qt4 is in path. qmake is Qt3 The call _qt4_query_qmake(QT_VERSION QTVERSION) doesn't set QTVERSION if I replace IF("${QTVERSION}" MATCHES "Unknown") with IF(NOT $QTVERSION) then it works for me. Though I haven't tested on a system that doesn't have qt4 installed. |
(0025304) Clinton Stimpson (developer) 2011-02-05 15:58 |
Oh I see what it is.. this was already fixed last october. http://cmake.org/gitweb?p=cmake.git;a=commit;h=cfba5ef111bf86e8820a4dff556b3a9edc1484cd [^] Can you double check with a 2.8.4 rc? |
(0026704) David Cole (manager) 2011-06-06 18:25 |
Closing resolved issues that have not been updated in more than 3 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-12-17 11:04 | Sam Hartsfield | New Issue | |
2010-12-17 11:18 | Brad King | Assigned To | => Clinton Stimpson |
2010-12-17 11:18 | Brad King | Status | new => assigned |
2010-12-17 12:02 | Clinton Stimpson | Note Added: 0024237 | |
2010-12-17 16:22 | Sam Hartsfield | Note Added: 0024248 | |
2010-12-17 17:06 | Clinton Stimpson | Note Added: 0024252 | |
2010-12-17 17:44 | Sam Hartsfield | Note Added: 0024256 | |
2010-12-17 21:46 | Clinton Stimpson | Note Added: 0024258 | |
2010-12-20 00:22 | Sam Hartsfield | Note Added: 0024269 | |
2011-02-05 11:06 | Hordur Johannsson | Note Added: 0025301 | |
2011-02-05 15:58 | Clinton Stimpson | Note Added: 0025304 | |
2011-02-05 15:58 | Clinton Stimpson | Status | assigned => resolved |
2011-02-05 15:58 | Clinton Stimpson | Fixed in Version | => CMake 2.8.4 |
2011-02-05 15:58 | Clinton Stimpson | Resolution | open => fixed |
2011-06-06 18:25 | David Cole | Status | resolved => closed |
2011-06-06 18:25 | David Cole | Note Added: 0026704 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |