# Build Error: Gromacs 2021.6 patched with Colvars

**URL:** <https://gromacs.bioexcel.eu/t/build-error-gromacs-2021-6-patched-with-colvars/6038>\
**Category:** User discussions\
**Tags:** installation-error, colvars\
**Created:** [March 24, 2023, 12:35pm UTC](https://gromacs.bioexcel.eu/t/build-error-gromacs-2021-6-patched-with-colvars/6038 "2023-03-24T12:35:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstantina](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@konstantina](https://gromacs.bioexcel.eu/u/konstantina)\
**Post date:** [March 24, 2023, 12:35pm UTC](https://gromacs.bioexcel.eu/t/build-error-gromacs-2021-6-patched-with-colvars/6038/1 "2023-03-24T12:35:37Z")

</div>

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](https://github.com/Colvars/gromacs/releases/tag/v2021.6-colvars)) on Ubuntu 20.04 LTS. However, when executing the make command, I receive the following errors:

```auto
[69%] Linking CXX executable ../../../../../bin/workflow-details-test
/usr/bin/ld: ../../../../../lib/libgromacs.so.6.0.0: undefined reference to `srot_'
/usr/bin/ld: ../../../../../lib/libgromacs.so.6.0.0: 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.

---

<div class="post-metadata">

**Author:** ![giacomo.fiorin](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/giacomo.fiorin/32/2862_2.png) [@giacomo.fiorin](https://gromacs.bioexcel.eu/u/giacomo.fiorin)\
**Post date:** [March 24, 2023, 12:53pm UTC](https://gromacs.bioexcel.eu/t/build-error-gromacs-2021-6-patched-with-colvars/6038/2 "2023-03-24T12:53:26Z")

</div>

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.

[https://manual.gromacs.org/documentation/2021/install-guide/index.html#linear-algebra-libraries](https://manual.gromacs.org/documentation/2021/install-guide/index.html#linear-algebra-libraries)

Giacomo

---

<div class="post-metadata">

**Author:** ![konstantina](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@konstantina](https://gromacs.bioexcel.eu/u/konstantina)\
**Post date:** [March 26, 2023, 6:36pm UTC](https://gromacs.bioexcel.eu/t/build-error-gromacs-2021-6-patched-with-colvars/6038/3 "2023-03-26T18:36:54Z")

</div>

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.
