[CMake] Can't build cmake 2.8.1 out of source

Brad King brad.king at kitware.com
Thu Jun 24 17:30:13 EDT 2010


j s wrote:
> Brad King wrote:
>> From the CMakeOutput.log you sent it looks like the compiler
>> 
>>  /opt/local/bin/gcc
>> 
>> is used while checking for the macros.  Please run the build
>> with "make VERBOSE=1" to see the full compiler command line
>> that fails at build time.  Post it.
> Files attached
[snip]
> [  1%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/SystemInformation.o
> cd /redacted/cmake/cmake_debug/Source/kwsys &&
> /usr/bin/c++ ... -c /redacted/cmake/cmake-2.8.1/Source/kwsys/SystemInformation.cxx
> In file included from /redacted/cmake/cmake-2.8.1/Source/kwsys/SystemInformation.cxx:29:
> /redacted/cmake/cmake_debug/Source/cmsys/FundamentalType.h:75:3: error: #error "No native data type can represent a 16-bit integer."
> /redacted/cmake/cmake_debug/Source/cmsys/FundamentalType.h:86:3: error: #error "No native data type can represent a 32-bit integer."
> /redacted/cmake/cmake_debug/Source/cmsys/FundamentalType.h:106:3: error: #error "No native data type can represent a 64-bit integer."

It looks like '/opt/local/bin/gcc' is used for C and '/usr/bin/c++'
is used for C++.  The former defines __SIZEOF_INT__ and the latter
does not.  Are these even the same versions of GCC?  From the rest
of this thread I think the answer is now.

Does /opt/local/bin have a C++ compiler?

Set the CC and CXX environment variables to chose a consistent
compiler toolchain for both languages.

-Brad



More information about the CMake mailing list