Hi, when trying to build Gromacs on my machine I get the following Cmake warning and error:
CMake Warning at cmake/gmxTestCompilerProblems.cmake:45 (message):
The versions of the C and C++ compilers do not match (9.4.0 and 7.5.0,
respectively). Mixing different C/C++ compilers can cause problems.
Call Stack (most recent call first):
CMakeLists.txt:340 (gmx_test_compiler_problems)
CMake Error at cmake/gmxTestCompilerProblems.cmake:69 (message):
GCC version 9 or later required. Earlier versions don't have full C++17
support.
Call Stack (most recent call first):
CMakeLists.txt:340 (gmx_test_compiler_problems)
However:
michele@michele-System-Product-Name:~/gromacs/build$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
michele@michele-System-Product-Name:~/gromacs/build$ g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
What am I doing wrong? I build with the following options: cmake .. -DGMX_GIT_VERSION_INFO=OFF -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA
Thanks, now it works. It is not a Gromacs problem though: I though “The versions of the C and C++ compilers do not match (9.4.0 and 7.5.0, respectively)” meant I needed gcc at least 9.4.0 and g++ at lest 7.5.0, not both at least 9.4.0. I updated g++ and now I can build.
Hi guys, I’m trying to install Gromacs as well, but I’m having this,
make … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=SYCL -DGMX_SYCL_HIPSYCL=on
CMake Error at cmake/FindLibStdCpp.cmake:182 (message):
The C++ compiler cannot find a working standard library. The compiler was
not trying to use libstdc++. The GROMACS build system cannot handle this
case. Please use a working C++17 compiler and standard library.
Call Stack (most recent call first):
CMakeLists.txt:90 (find_package)
– Configuring incomplete, errors occurred!
See also “/home/bryan/Descargas/gromacs-2023.2/build/CMakeFiles/CMakeOutput.log”.
See also “/home/bryan/Descargas/gromacs-2023.2/build/CMakeFiles/CMakeError.log”.
Looking for the cmakeerror file,
The output was:
1
/usr/bin/ld: no se puede encontrar -lstdc++: No existe el archivo o el directorio
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Checking whether the ASM compiler is GNU using “–version” did not match “(GNU assembler)|(GCC)|(Free Software Foundation)”:
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Detecting CXX compiler ABI info failed to compile with the following output:
Change Dir: /root/git/llvm-vanilla/build/CMakeFiles/CMakeTmp