[CMake] Build Error cmake 2.8.2 and above on RedHat 5U3

Eric Noulard eric.noulard at gmail.com
Wed Jul 6 13:44:09 EDT 2011


2011/7/6  <Matt.Garrett at shell.com>:
> Folks
>
>
>
> As part of some other open source S/W OpenFOAM-2.0.0
>
> I need to build cmake-2.8.3 (preferred)

Why would need to build CMake?
Can't you take it from
http://www.cmake.org/files/v2.8/cmake-2.8.4-Linux-i386.tar.gz ?

> However on all the versions 2.8.2 , 2.8.3 , 2.8.4 I get a build error
>
> libCMakeLib.a(cmMakefile.o): In function `std::list<cmDefinitions,
> std::allocator<cmDefinitions>
>>::_M_insert(std::_List_iterator<cmDefinitions>, cmDefinitions const&)':

[...]

>
> OS is RedHat 5U3
>
>
>
> gcc -v
>
> Using built-in specs.
>
> COLLECT_GCC=gcc
>
> COLLECT_LTO_WRAPPER=/glb/apps/3rdparty/OpenFoam/OpenFOAM-2.0.0/ThirdParty-2.0.0/platforms/linux64/gcc-4.5.1/libexec/gcc/x86_64-unknown-linux-gnu/4.5.1/lto-wrapper
>
> Target: x86_64-unknown-linux-gnu
>
> Configured with:
> /glb/apps/3rdparty/OpenFoam/OpenFOAM-2.0.0/ThirdParty-2.0.0/gcc-4.5.1/configure
> --prefix=/glb/apps/3rdparty/OpenFoam/OpenFOAM-2.0.0/ThirdParty-2.0.0/platforms/linux64/gcc-4.5.1
> --with-gmp=/glb/apps/3rdparty/OpenFoam/OpenFOAM-2.0.0/ThirdParty-2.0.0/platforms/linux64/gmp-5.0.1
> --with-mpfr=/glb/apps/3rdparty/OpenFoam/OpenFOAM-2.0.0/ThirdParty-2.0.0/platforms/linux64/mpfr-2.4.2
> --with-mpc=/glb/apps/3rdparty/OpenFoam/OpenFOAM-2.0.0/ThirdParty-2.0.0/platforms/linux64/mpc-0.8.1
> --with-pkgversion=OpenFOAM --enable-languages=c,c++ --enable-__cxa_atexit
> --enable-libstdcxx-allocator=new --with-system-zlib
>
> Thread model: posix
>
> gcc version 4.5.1 (OpenFOAM)
>
> Can any kind sole point us in the right direction.

Are you building CMake with a previously installed CMake version
or
Are you bootstrapping from source?

Coud do:

make VERBOSE=1 and see whether if linker and compiler command are coherent,
it looks like OpenFOAM is coming with its own gcc version.
May be CMAKE_C_COMPILER and CMAKE_LINKER do not match?


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list