Build Error: Gromacs 2021.6 patched with Colvars

GROMACS version: 2021.6
GROMACS modification: Yes
I am currently trying to install the Gromacs version 2021.6 patched with Gromacs (found on the github page Release v2021.6-colvars · Colvars/gromacs · GitHub) on Ubuntu 20.04 LTS. However, when executing the make command, I receive the following errors:

[ 69%] Linking CXX executable ../../../../../bin/workflow-details-test
/usr/bin/ld: ../../../../../lib/ undefined reference to `srot_'
/usr/bin/ld: ../../../../../lib/ undefined reference to `strsm_'
collect2: error: ld returned 1 exit status
make[3]: *** [src/api/cpp/workflow/tests/CMakeFiles/workflow-details-test.dir/build.make:126: bin/workflow-details-test] Error 1
make[2]: *** [CMakeFiles/Makefile2:6886: src/api/cpp/workflow/tests/CMakeFiles/workflow-details-test.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3179: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:628: check] Error 2

What sort of modifications do I need to make to properly install this version of Gromacs?
The gcc version I am using is 4:9.3.0-1ubuntu2.

Thanks in advance for any kind of response.

Hi @konstantina the error you are getting indicates a failure to link the BLAS library, which is used by GROMACS but not by Colvars currently.

I suspect that the same issue may occur when building standard GROMACS 2021: does it?

A possible solution may be to use the BLAS and LAPACK that come bundled with GROMACS, using -DGMX_EXTERNAL_BLAS=off (and same for LAPACK) to avoid CMake being confused by other libraries that may be installed in your Ubuntu box.


Thank you so much for your helpful input. Indeed, the CMake option -DGMX_EXTERNAL_BLAS=off was the one needed to proceed with a successful installation. Thanks again.