MantisBT - CMake
View Issue Details
0015349CMakeCMakepublic2015-01-14 09:142015-07-08 08:57
Rodney Dowdall 
Brad King 
normalminoralways
closedfixed 
LinuxArch Linux x64
CMake 3.1 
CMake 3.1.1CMake 3.1.1 
0015349: The regular expression in CMakeDetermineCompilerID.cmake strips out qnxnto
The regular expression that is used to determine compiler info on line 425 of CMakeDetermineCompilerID.cmake fails to match qnxnto. This means that you cannot use cmake to generate Makefiles for qcc anymore. What happens is that it fails to set the COMPILER_QNXNTO variable and then further on down the process it adds compiler flags for a GNU compiler that are not supported by the qcc compiler. If this regular expression is removed, then cmake correctly identifies qcc and sets the COMPILER_QNXNTO variable.
Set the CMAKE_C_COMPILER to "qcc" and the DCMAKE_CXX_COMPILER="qcc" and try and build something like webkit. It will pass in the -isystem flag to the qcc compiler. This flag is not supported. You will also see a message about failing to determine compiler settings while cmake is generating the cmake files. If you remove the regular expression from the CMakeDetermineCompilerID.cmake file, then that message disappears.
No tags attached.
patch 0001-QNX-Fix-detection-of-QCC-compiler-id-15349.patch (2,283) 2015-01-14 10:31
https://public.kitware.com/Bug/file/5344/0001-QNX-Fix-detection-of-QCC-compiler-id-15349.patch
Issue History
2015-01-14 09:14Rodney DowdallNew Issue
2015-01-14 10:12Brad KingNote Added: 0037686
2015-01-14 10:13Brad KingTarget Version => CMake 3.2
2015-01-14 10:18Rodney DowdallNote Added: 0037687
2015-01-14 10:26Brad KingNote Added: 0037688
2015-01-14 10:31Brad KingFile Added: 0001-QNX-Fix-detection-of-QCC-compiler-id-15349.patch
2015-01-14 10:31Brad KingNote Added: 0037689
2015-01-14 10:32Brad KingAssigned To => Brad King
2015-01-14 10:32Brad KingStatusnew => assigned
2015-01-14 10:32Brad KingTarget VersionCMake 3.2 => CMake 3.1.1
2015-01-15 09:58Brad KingNote Added: 0037697
2015-01-15 10:07Rodney DowdallNote Added: 0037698
2015-01-15 10:27Brad KingNote Added: 0037699
2015-01-15 10:27Brad KingNote Edited: 0037699bug_revision_view_page.php?bugnote_id=37699#r1674
2015-01-15 11:47Brad KingNote Added: 0037701
2015-01-16 09:43Brad KingNote Added: 0037712
2015-01-16 09:44Brad KingNote Added: 0037713
2015-01-16 09:44Brad KingStatusassigned => resolved
2015-01-16 09:44Brad KingResolutionopen => fixed
2015-01-16 09:44Brad KingFixed in Version => CMake 3.1.1
2015-07-08 08:57Robert MaynardNote Added: 0039034
2015-07-08 08:57Robert MaynardStatusresolved => closed

Notes
(0037686)
Brad King   
2015-01-14 10:12   
This commit:

 QNX: Introduce QCC compiler id for that QNX platform compiler.
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e00db59d [^]

was in 3.0 and 3.1 and may be related to this issue. What was the last version of CMake in which this worked?

Also, the main problem with QNX and QCC support is that we do not have anyone submitting nightly testing anymore. If you are able to do so, instructions are here:

 http://www.cmake.org/Wiki/CMake/Git/Dashboard [^]
(0037687)
Rodney Dowdall   
2015-01-14 10:18   
It worked in 3.0. That was how I was able to determine that it was the regular expression that had changed. The regular expression was added in the 3.1 version of the CMakeDetermineCompilerID.cmake file, whereas in the 3.0 version of the file, that regular expression is not there.

I may be able to submit nightly tests. Let me check out that link and see what I can do.
(0037688)
Brad King   
2015-01-14 10:26   
Re 0015349:0037687: It was likely this commit:

 Use a more reliable regex for extracting binary INFO strings
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e84e78c [^]
(0037689)
Brad King   
2015-01-14 10:31   
Please test "0001-QNX-Fix-detection-of-QCC-compiler-id-15349.patch".
(0037697)
Brad King   
2015-01-15 09:58   
Re 0015349:0037689: I've applied the patch:

 QNX: Fix detection of QCC compiler id
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c9bc712 [^]

but I'm not able to confirm that it works because I do not have the proper environment.
(0037698)
Rodney Dowdall   
2015-01-15 10:07   
I can test the fix if you point me at how I check out the branch with the applied patch.

Thanks
(0037699)
Brad King   
2015-01-15 10:27   
Re 0015349:0037698: Thanks:

 $ git clone http://cmake.org/cmake.git [^] CMake
 $ cd CMake
 $ git checkout -b qcc-fix 9c9bc712


This will give you 3.1.0 plus this specific fix.

(0037701)
Brad King   
2015-01-15 11:47   
Re 0015349:0037699: You can also apply the changes in "0001-QNX-Fix-detection-of-QCC-compiler-id-15349.patch" directly to your local 3.1.0 install. If you're not comfortable with patch tools the change is pretty small and could be applied by hand.
(0037712)
Brad King   
2015-01-16 09:43   
Re 0015349:0037697: I hacked the code locally with:

-#ifdef __QNXNTO__
+#if 1
 char const* qnxnto = "INFO" ":" "qnxnto[]";
 #endif


and built with a GNU compiler to confirm that the regex now matches.
(0037713)
Brad King   
2015-01-16 09:44   
I've queued this for 3.1.1.
(0039034)
Robert Maynard   
2015-07-08 08:57   
Closing resolved issues that have not been updated in more than 4 months.