MantisBT - CMake
View Issue Details
0010540CMakeCMakepublic2010-04-12 19:362011-04-04 12:00
Daniel Richard G. 
David Cole 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.4 
0010540: Build error on Solaris due to C++ comments in C code
The Solaris C compiler does not allow C++-style comments in C code, thus leading to this error in building CMake 2.8.1:

[ 11%] Building C object Utilities/cmzlib/CMakeFiles/cmzlib.dir/adler32.o
[ 11%] Building C object Utilities/cmzlib/CMakeFiles/cmzlib.dir/compress.o
[ 11%] Building C object Utilities/cmzlib/CMakeFiles/cmzlib.dir/crc32.o
[ 12%] Building C object Utilities/cmzlib/CMakeFiles/cmzlib.dir/deflate.o
"/tmp/cmake-2.8.1/Utilities/cmzlib/deflate.c", line 289: syntax error before or at: /
"/tmp/cmake-2.8.1/Utilities/cmzlib/deflate.c", line 291: invalid source character: '#'
"/tmp/cmake-2.8.1/Utilities/cmzlib/deflate.c", line 319: cannot recover from previous errors
cc: acomp failed for /tmp/cmake-2.8.1/Utilities/cmzlib/deflate.c
gmake[2]: *** [Utilities/cmzlib/CMakeFiles/cmzlib.dir/deflate.o] Error 2
gmake[1]: *** [Utilities/cmzlib/CMakeFiles/cmzlib.dir/all] Error 2
gmake: *** [all] Error 2
Wouldn't it be helpful to do occasional builds with CFLAGS=-ansi (gcc) or the like to ensure that little non-portables like this don't creep into the source code?
No tags attached.
patch cmake-10540-fix.patch (811) 2010-04-22 13:48
https://public.kitware.com/Bug/file/3052/cmake-10540-fix.patch
Issue History
2010-04-12 19:36Daniel Richard G.New Issue
2010-04-22 10:45Mr SharkNote Added: 0020350
2010-04-22 13:48Daniel Richard G.File Added: cmake-10540-fix.patch
2010-04-22 13:48Daniel Richard G.Note Added: 0020354
2010-05-09 04:59Alex NeundorfNote Added: 0020678
2010-12-14 18:28David ColeNote Added: 0023999
2010-12-14 18:28David ColeAssigned To => David Cole
2010-12-14 18:28David ColeStatusnew => assigned
2010-12-14 18:44Daniel Richard G.Note Added: 0024000
2010-12-14 18:47David ColeNote Added: 0024044
2010-12-14 18:48David ColeNote Added: 0024046
2010-12-14 18:48David ColeStatusassigned => resolved
2010-12-14 18:48David ColeFixed in Version => CMake 2.8.4
2010-12-14 18:48David ColeResolutionopen => fixed
2011-04-04 12:00David ColeNote Added: 0026044
2011-04-04 12:00David ColeStatusresolved => closed

Notes
(0020350)
Mr Shark   
2010-04-22 10:45   
This bug also affects building on AIX using IBMs compiler xlc.
(0020354)
Daniel Richard G.   
2010-04-22 13:48   
The attached patch against 2.8.1 fixes this bug.
(0020678)
Alex Neundorf   
2010-05-09 04:59   
Bill, I saw that you committed some patches for that. So can this one be closed ?

Alex
(0023999)
David Cole   
2010-12-14 18:28   
Is this fixed yet or not? Is the present CMake code base from git 'next' or 'master' still demonstrating this problem?
(0024000)
Daniel Richard G.   
2010-12-14 18:44   
The "solaris8.teragram" dashboard build is on the same system where this issue originally cropped up. It's building git master, AFAICT, and the problem is fixed there. The fix just needs to be backported to the stable/release branch.
(0024044)
David Cole   
2010-12-14 18:47   
Well, we won't be back-porting it, but we will be doing the CMake 2.8.4 release based on 'master' in January, 2011. So it will be available in a CMake release soon. I'll mark this issue as resolved and "fixed in 2.8.4"

Thanks for the feedback!
(0024046)
David Cole   
2010-12-14 18:48   
Fixed in git 'master' according to reporter. Fix will appear in CMake 2.8.4 when it is released...
(0026044)
David Cole   
2011-04-04 12:00   
Closing resolved issues that have not been updated in more than 3 months.