View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015664CMakeCMakepublic2015-07-26 13:212016-05-02 08:30
Reporterjcook 
Assigned ToChuck Atkins 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.2.3 
Target VersionCMake 3.4Fixed in VersionCMake 3.4 
Summary0015664: CMake detects the wrong version for the C and C++ Cray Compiler
DescriptionThis is because CMake is using the _RELEASE macro instead of _RELEASE_MAJOR in Modules/Compiler/Cray-DetermineCompiler.cmake.
Steps To Reproducecmake --system-information | grep CMAKE_C_COMPILER_VERSION
Additional InformationNone at this time. Please let me know if you need more info.
TagsNo tags attached.
Attached Filesc file icon version.c [^] (601 bytes) 2015-07-28 12:45
txt file icon CMakeLists.txt [^] (95 bytes) 2015-07-28 12:45 [Show Content]

 Relationships
related to 0015845closedBrad King CMake fails to identify the Cray compilers' version numbers 

  Notes
(0039170)
Chuck Atkins (developer)
2015-07-27 10:44

Hi Justin,
Tanks for the bug report! Do you have more details on what does happen versus what *should happen? Also, if you have a patch, that would be great!
(0039178)
jcook (reporter)
2015-07-28 12:41

I have both a patch and a small test case you can use.
(0039179)
jcook (reporter)
2015-07-28 12:44

This is what CMake reports currently:

-- The C compiler identification is Cray 11.3
-- Check for working C compiler: /opt/cray/craype/2.4.0.4/bin/cc
-- Check for working C compiler: /opt/cray/craype/2.4.0.4/bin/cc -- works

The problem is that the version should actually be 8.3, instead of 11.3. The _RELEASE macro is set to +3 of what the release actually is. It had a historical purpose at one time if I recall.

Instead, you should use _RELEASE_MAJOR for this.
(0039180)
jcook (reporter)
2015-07-28 12:48

I uploaded two files with which you can recreate the problem.

Here is the cmake output:

-- The C compiler identification is Cray 11.3
-- Check for working C compiler: /opt/cray/craype/2.4.0.4/bin/cc
-- Check for working C compiler: /opt/cray/craype/2.4.0.4/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: ...

Here is the program output:

_CRAYC: 1
_RELEASE_MAJOR: 8
_RELEASE_MINOR: 3
_RELEASE_STRING: Cray C++ : Version 8.3.14.102 (u83061c83132)

These macros are described on Cray's documentation website in the C/C++ reference manual here:

http://docs.cray.com/cgi-bin/craydoc.cgi?mode=View;id=S-2179-83;idx=books_search;this_sort=title;q=;type=books;title=Cray%20C%20and%20C%2b%2b%20Reference%20Manual [^]

Let me know if you have trouble getting to the URL.
(0039181)
jcook (reporter)
2015-07-28 12:48

Here is a git diff of what I think the fix should be, but perhaps there's things I'm missing:

diff --git a/Modules/Compiler/Cray-DetermineCompiler.cmake b/Modules/Compiler/Cray-DetermineCompiler.cmake
index 881b82c..6602294 100644
--- a/Modules/Compiler/Cray-DetermineCompiler.cmake
+++ b/Modules/Compiler/Cray-DetermineCompiler.cmake
@@ -2,5 +2,5 @@
 set(_compiler_id_pp_test "defined(_CRAYC)")
 
 set(_compiler_id_version_compute "
-# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(_RELEASE)
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(_RELEASE_MAJOR)
 # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(_RELEASE_MINOR)")
(0039199)
Chuck Atkins (developer)
2015-07-30 11:52

Patch pushed to stage/fix-cray-version and merged to next for testing.
(0039200)
Brad King (manager)
2015-07-30 11:58

For reference, the commit is here:

 Cray: Fix compiler version detection
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22809b16 [^]
(0040959)
Robert Maynard (manager)
2016-05-02 08:30

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-07-26 13:21 jcook New Issue
2015-07-27 10:44 Chuck Atkins Note Added: 0039170
2015-07-27 10:48 Brad King Target Version => CMake 3.4
2015-07-28 12:41 jcook Note Added: 0039178
2015-07-28 12:44 jcook Note Added: 0039179
2015-07-28 12:45 jcook File Added: version.c
2015-07-28 12:45 jcook File Added: CMakeLists.txt
2015-07-28 12:48 jcook Note Added: 0039180
2015-07-28 12:48 jcook Note Added: 0039181
2015-07-30 11:50 Chuck Atkins Assigned To => Chuck Atkins
2015-07-30 11:50 Chuck Atkins Status new => assigned
2015-07-30 11:51 Chuck Atkins Status assigned => confirmed
2015-07-30 11:52 Chuck Atkins Note Added: 0039199
2015-07-30 11:58 Brad King Note Added: 0039200
2015-07-31 09:16 Brad King Status confirmed => resolved
2015-07-31 09:16 Brad King Resolution open => fixed
2015-07-31 09:16 Brad King Fixed in Version => CMake 3.4
2015-11-12 10:30 Brad King Relationship added related to 0015845
2016-05-02 08:30 Robert Maynard Note Added: 0040959
2016-05-02 08:30 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team