Installation issue - gcc version

GROMACS version:2020-5
GROMACS modification: No

Hi there,

Trying to install Gromacs, at the: “cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON”
stage, I get the error message:
" GCC version 5 or later required. Earlier versions don’t have full C++14 support."
Yet, in my computer I have installed gcc version 10.1.0 and g++ version 10.1.0.

Does anyone have a suggestion how to proceed?

Many thanks.

Can you please share the exact output as well as the output of gcc --version?

Thank you.
Here is the error:


CMake Error at cmake/gmxTestCompilerProblems.cmake:72 (message):
GCC version 5 or later required. Earlier versions don’t have full C++14
support.
Call Stack (most recent call first):
CMakeLists.txt:345 (gmx_test_compiler_problems)

– Configuring incomplete, errors occurred!
See also “/opt/gromacs-2020.5/CMakeFiles/CMakeOutput.log”.
See also “/opt/gromacs-2020.5/CMakeFiles/CMakeError.log”.
CMake Error: Unable to open check cache file for write. /opt/gromacs-2020.5/CMakeFiles/cmake.check_cache


and the gcc version:


gcc (GCC) 10.1.0
Copyright (C) 2020 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.

g++ (GCC) 10.1.0
Copyright (C) 2020 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.


Thank you for this.

Hi,

try adding -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ to your cmake command. It might be that some older binaries are being selected automatically, in which case setting them manually should fix it.

Regards,
Petter

1 Like