[CMake] FW: Cmake on Sun?

Bill Hoffman bill.hoffman at kitware.com
Thu Apr 16 14:03:53 EDT 2009


indigojo at blogistan.co.uk wrote:
> Quoting "Bartlett, Roscoe A" <rabartl at sandia.gov>:
> 
>> Hello,
>>
>> An associate of mine tried to build CMake 2.6.2 on a Sun machine and 
>>  got lots of errors (see the attached).
>>
>> Does CMake work in the Sun?  What platforms is CMake supposed to  
>> support?  We also have a nasty IBM AIX machine that we have to  
>> support.  It is critical that CMake port to nearly every platform  
>> that we support and it is a pretty hard list of platforms.
> 
> Which compiler is he using?  The code quoted is C++, and GCC is less 
> strict in its implementation of C++ standards than other compilers, 
> particularly Sun Studio (e.g. allowing the dimensioning of arrays using 
> variables, as in "int d=6; int v[d]; " - that is not valid C++ but would 
> compile in GCC).  . The Qt people found this out when trying to port Qt 
> to Sun, and have been revising Qt to make sure the proprietary compilers 
> can compile it.
> 

The problem seems to be in the boostrap script.

Undefined                       first referenced
  symbol                             in file
bool cmELF::ReadBytes(unsigned long,unsigned long,char*)const 
cmSystemTools.o


That should only happen if CMAKE_USE_ELF_PARSER is defined:

#if defined(CMAKE_USE_ELF_PARSER)
# include "cmELF.h"
#endif

In 2.6.2 that is not defined during bootstrap.

BTW, int d=6; int v[d] is invalid C++ and gcc is wrong...  But, this is 
not a compiler issue, it is some odd issue with the boostrap script. 
Another option would be to get the binary cmake from www.cmake.org for 
the sun, and use that to bootstrap cmake and avoid the boostrap script.


-Bill


More information about the CMake mailing list