MantisBT - CMake
View Issue Details
0015026CMakeCMakepublic2014-07-16 10:092015-01-05 08:39
Chuck Atkins 
 
normalminoralways
closedfixed 
Cray XE6 and Cray XE7LinuxCNL
CMake 3.0 
CMake 3.1CMake 3.1 
0015026: Build fails with Cray compiler on Linux
When building with the Cray compiler on Linux (on an XE6 or XE7 such as Titan or Garnet, for example), the CMake curl library fails to build.
1. Checkout current master on a Cray XE6 or XE7
2. Configure the programming environment to use the cray compilers:
  # module purge
  # module load PrgEnv-cray
  # module load cce
3. Configure and build.

The result will fail with:

CC-20 craycc: ERROR File = /dev/shm/atkins3/cmake/master/Utilities/cmcurl/hostip.c, Line = 616
  The identifier "SIZEOF_in_addr" is undefined.

    memcpy(addrentry, &num, SIZEOF_in_addr);
                            ^

Total errors detected in /dev/shm/atkins3/cmake/master/Utilities/cmcurl/hostip.c: 1

The error is caused by a workaround for UNICOS. The workaround incorrectly uses the _CRAYC macro to determine if building for UNICOS. This macro will always be defined for the Cray C and C++ compiler regardless of the target platform, even when building for Linux. The correct macro should be _CRAY, which as per Cray documentation is only defined for UNICOS targeted builds. Attached is a patch with a fix.
No tags attached.
patch 0001-Fix-a-build-failure-with-the-Cray-compiler-on-Linux.patch (1,244) 2014-07-16 10:09
https://public.kitware.com/Bug/file/5193/0001-Fix-a-build-failure-with-the-Cray-compiler-on-Linux.patch
Issue History
2014-07-16 10:09Chuck AtkinsNew Issue
2014-07-16 10:09Chuck AtkinsFile Added: 0001-Fix-a-build-failure-with-the-Cray-compiler-on-Linux.patch
2014-07-16 12:50Brad KingNote Added: 0036403
2014-07-16 12:50Brad KingStatusnew => resolved
2014-07-16 12:50Brad KingResolutionopen => fixed
2014-07-16 12:50Brad KingFixed in Version => CMake 3.1
2014-07-16 12:50Brad KingTarget Version => CMake 3.1
2014-07-17 09:47Brad KingNote Edited: 0036403bug_revision_view_page.php?bugnote_id=36403#r1523
2015-01-05 08:39Robert MaynardNote Added: 0037588
2015-01-05 08:39Robert MaynardStatusresolved => closed

Notes
(0036403)
Brad King   
2014-07-16 12:50   
(edited on: 2014-07-17 09:47)
Applied, thanks:

cmcurl: Fix a build failure with the Cray compiler on Linux
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd63722d [^]

(0037588)
Robert Maynard   
2015-01-05 08:39   
Closing resolved issues that have not been updated in more than 4 months