# The 'make install' step does not install libgromacs\_mpi.a

**URL:** <https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [January 14, 2025, 1:03pm UTC](https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033 "2025-01-14T13:03:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmcann](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/bmcann/32/4237_2.png) [@bmcann](https://gromacs.bioexcel.eu/u/bmcann)\
**Post date:** [January 14, 2025, 1:03pm UTC](https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033/1 "2025-01-14T13:03:49Z")

</div>

GROMACS version: 2024.4  
OpenMPI version: 4.1.7  
GCC version: 14.2.1  
OS: Rocky Linux 8.10  
CPU: AMD EPYC 9354 Genoa  
GROMACS modification: No

After successfully building and testing GROMACS 2024.4, the final “make install” step does not install the static library, `libgromacs_mpi.a`, in `lib64` under the path given in `DCMAKE_INSTALL_PREFIX` (in fact, the `lib64` directory is not even created). However, if I set `DBUILD_SHARED_LIBS=ON` during the build process, the shared object will be installed. Could someone please help me figure out how to get the static library installed during the “make install” step? Here is my build process:

```auto
cd gromacs-2024.4
rm -rf build_2024.4
mkdir build_2024.4 && cd 2024.4

cmake \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DGMX_MPI=ON \
-DGMX_SIMD=AVX_512 \
-DGMX_DOUBLE=OFF \
-DCMAKE_INSTALL_PREFIX=${install_dir} \
-DBUILD_SHARED_LIBS=OFF \
-DGMX_FFT_LIBRARY=fftw3 \
-DCMAKE_BUILD_TYPE=Release \
-DGMX_OPENMP=ON \
-DGMX_PREFER_STATIC_LIBS=ON \
-DGMX_BUILD_SHARED_EXE=ON \
-DGMX_BUILD_OWN_FFTW=ON \
-DGMX_EXTERNAL_BLAS=OFF \
-DGMX_EXTERNAL_LAPACK=OFF \
-DREGRESSIONTEST_DOWNLOAD=OFF \
-DREGRESSIONTEST_PATH=${home_dir}/Development/builds/gromacs/regressiontests-2024.4 \
-DGMX_THREAD_MPI=OFF \
-DGMX_BUILD_MANUAL=OFF ..

make -j 8
make -j 8 check
sudo make install

```

Thanks in advance, Bruno

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [January 14, 2025, 10:38pm UTC](https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033/2 "2025-01-14T22:38:05Z")

</div>

Hi!

> [@bmcann](#):
>
> Could someone please help me figure out how to get the static library installed during the “make install” step?

I’ll double-check, but looks like this was accidentally broken during a refactoring a while ago.

Try changing [this line](https://gitlab.com/gromacs/gromacs/-/blob/release-2024/src/gromacs/CMakeLists.txt?ref_type=heads#L477) in `src/gromacs/CMakeLists.txt` to `if (TRUE)`.

---

<div class="post-metadata">

**Author:** ![mabraham](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mabraham/32/33_2.png) [@mabraham](https://gromacs.bioexcel.eu/u/mabraham)\
**Post date:** [January 15, 2025, 8:29am UTC](https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033/3 "2025-01-15T08:29:31Z")

</div>

Why do you need the static library? I’d guess it was only useful if you also set GMX\_INSTALL\_LEGACY\_API=ON to install the headers as well.

---

<div class="post-metadata">

**Author:** ![bmcann](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/bmcann/32/4237_2.png) [@bmcann](https://gromacs.bioexcel.eu/u/bmcann)\
**Post date:** [January 23, 2025, 11:35pm UTC](https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033/4 "2025-01-23T23:35:32Z")

</div>

Thanks for this, I tried it and both the compilation and installation completed. All tests passed, but cmake emitted this before compilation began:  
– Configuring done (19.9s)  
CMake Error: install(EXPORT “libgromacs” …) includes target “libgromacs” which requires target “colvars” that is not in any export set.  
– Generating done (1.6s)  
CMake Generate step failed. Build files cannot be regenerated correctly.

---

<div class="post-metadata">

**Author:** ![bmcann](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/bmcann/32/4237_2.png) [@bmcann](https://gromacs.bioexcel.eu/u/bmcann)\
**Post date:** [January 23, 2025, 11:39pm UTC](https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033/5 "2025-01-23T23:39:20Z")

</div>

Thanks for your comment, I only queried this as it is a change in behaviour from what I have seen before. I’m a HPC system administrator, so if I spot differences in behaviour, my assumption is that this may impact on the users’ work as I can’t be sure they don’t need this.

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [January 25, 2025, 4:20pm UTC](https://gromacs.bioexcel.eu/t/the-make-install-step-does-not-install-libgromacs-mpi-a/11033/6 "2025-01-25T16:20:30Z")

</div>

Thanks for trying; I added your observation to our issue tracker. A bit weird that CMake failed yet it generated the build files.

One workaround could be setting `-DGMX_USE_COLVARS=NONE`. This will disable the Colvars library bundled since GROMACS 2024, so this would only work if your users don’t use it (if you’re upgrading from GROMACS 2023 or earlier, this is the case).

Building a shared library will also avoid all these problems (it’s the default and is better tested, both in CI and in real use). Like disabling Colvars, perhaps this is not possible in your situation, but if it is, this is the path of least resistance.
