[gmx-users] cmake fails with custom gcc version

Mahmood Naderan nt_mahmood at yahoo.com
Sat Nov 2 14:26:01 CET 2019


Hi,
Although I have specified a custom CC and CXX path, the cmake command fails with an error.

$ cmake .. -DGMX_GPU=on -DCMAKE_INSTALL_PREFIX=../single61 -DGMX_BUILD_OWN_FFTW=ON -DGMX_CUDA_TARGET_SM=61 -DCMAKE_C_COMPILER=/home/mahmood/tools/gcc-6.1.0/bin/gcc -DCMAKE_CXX_COMPILER=/home/mahmood/tools/gcc-6.1.0/bin/g++-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /home/mahmood/tools/gcc-6.1.0/bin/gcc-- Check for working C compiler: /home/mahmood/tools/gcc-6.1.0/bin/gcc -- brokenCMake Error at /home/mahmood/tools/cmake-3.15.4/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):  The C compiler

    "/home/mahmood/tools/gcc-6.1.0/bin/gcc"
  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/mahmood/cactus/gromacs/gromacs-2019.4/build/CMakeFiles/CMakeTmp
    Run Build Command(s):/usr/bin/gmake cmTC_68dcc/fast && /usr/bin/gmake -f CMakeFiles/cmTC_68dcc.dir/build.make CMakeFiles/cmTC_68dcc.dir/build
    gmake[1]: Entering directory `/home/mahmood/cactus/gromacs/gromacs-2019.4/build/CMakeFiles/CMakeTmp'    Building C object CMakeFiles/cmTC_68dcc.dir/testCCompiler.c.o
    /home/mahmood/tools/gcc-6.1.0/bin/gcc    -o CMakeFiles/cmTC_68dcc.dir/testCCompiler.c.o   -c /home/mahmood/cactus/gromacs/gromacs-2019.4/build/CMakeFiles/CMakeTmp/testCCompiler.c    /home/mahmood/tools/gcc-6.1.0/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory    gmake[1]: *** [CMakeFiles/cmTC_68dcc.dir/testCCompiler.c.o] Error 1
    gmake[1]: Leaving directory `/home/mahmood/cactus/gromacs/gromacs-2019.4/build/CMakeFiles/CMakeTmp'    gmake: *** [cmTC_68dcc/fast] Error 2



  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:41 (project)


-- Configuring incomplete, errors occurred!
See also "/home/mahmood/cactus/gromacs/gromacs-2019.4/build/CMakeFiles/CMakeOutput.log".See also "/home/mahmood/cactus/gromacs/gromacs-2019.4/build/CMakeFiles/CMakeError.log".
However, the path is correct


$ /home/mahmood/tools/gcc-6.1.0/bin/gcc -vUsing built-in specs.
COLLECT_GCC=/home/mahmood/tools/gcc-6.1.0/bin/gccCOLLECT_LTO_WRAPPER=/home/mahmood/tools/gcc-6.1.0/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapperTarget: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/home/mahmood/tools/gcc-6.1.0 --disable-multilib --enable-languages=c,c++Thread model: posix
gcc version 6.1.0 (GCC)



Any idea about that?

Regards,
Mahmood


More information about the gromacs.org_gmx-users mailing list