Gromacs 2020.2 install error

GROMACS version:2020.2
GROMACS modification: No
Here post your question: What has to be done based on "…undefined reference to srot_' and ...strsm_’ " ?


[ 98%] Linking CXX executable …/…/bin/template
/usr/bin/ld: …/…/lib/libgromacs.so.5.0.0: undefined reference to srot_' /usr/bin/ld: ../../lib/libgromacs.so.5.0.0: undefined reference to strsm_’
collect2: error: ld returned 1 exit status
make[2]: *** [share/template/CMakeFiles/template.dir/build.make:87: bin/template] Error 1
make[1]: *** [CMakeFiles/Makefile2:2225: share/template/CMakeFiles/template.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Can you share your CMake command and the following output of CMake? This problem arises, as linker can not find the shared object in your path.

Hi Masrul,

Thank you for trying to help.

My OS Ubuntu 19.10 64x

–>cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DBUILD_SHARED_LIBS=ON -DGMX_PREFER_STATIC_LIBS=OFF -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc


– Configuring done
– Generating done
– Build files have been written to: /usr/local/gromacs-2020.2/build

All went ok!

–>make

/usr/bin/ld: …/…/lib/libgromacs.so.5.0.0: undefined reference to srot_' collect2: error: ld returned 1 exit status make[2]: *** [share/template/CMakeFiles/template.dir/build.make:87: bin/template] Error 1 make[1]: *** [CMakeFiles/Makefile2:2447: share/template/CMakeFiles/template.dir/all] Error 2 make: *** [Makefile:163: all] Error 2 /usr/bin/ld: ../../lib/libgromacs.so.5.0.0: undefined reference to srot_’
collect2: error: ld returned 1 exit status
make[2]: *** [share/template/CMakeFiles/template.dir/build.make:87: bin/template] Error 1
make[1]: *** [CMakeFiles/Makefile2:2447: share/template/CMakeFiles/template.dir/all] Error 2

make: *** [Makefile:163: all] Error 2

Regards
Bruno

The configuration seems okay. By the way, what is ‘…’ three dots after cmake. Is it an alias or a typo. Typically, You would do the following

  • tar xvf gromacs-2020.2.tar.gz
  • cd gromacs-2020.2
  • mkdir build
  • cd build
  • Then execute command to configure
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DBUILD_SHARED_LIBS=ON -DGMX_PREFER_STATIC_LIBS=OFF -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc

There are two dots unless ‘…’ is aliased to something else.

Regards,
Masrul

Hi Masrul,
Related to your question " what is ‘…’ three dots after cmake. Is it an alias or a typo.": It is not a typo; means “the directory immediately above the current one“. It is where the cmake script file (as released by gromacs ) is placed.

If I follow the Gromacs install recommendation (similar to your post)

Hello Bruno,
Is issue solved? Okay, My mistake, If you use zsh then ‘…’ makes sense, which is aliased to two directory above current one. I am using bash, btw

– Masrul