# Error compiling gromacs-2018.8

**URL:** <https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [November 7, 2022, 7:53pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195 "2022-11-07T19:53:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgaray](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sgaray](https://gromacs.bioexcel.eu/u/sgaray)\
**Post date:** [November 7, 2022, 7:53pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195/1 "2022-11-07T19:53:10Z")

</div>

GROMACS version: 2018.8  
GROMACS modification: No

Hi Gromacs users, I have been trying to compile gromacs-2018.8, but without success. However I have been able to install 2021.2, 2021.3 and 2021.5. The error occurs during the compilation:

/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:9: note: in expansion of macro ‘ **GMX\_RELEASE\_ASSERT** ’  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^ ~~~~~~~~~~~~~~~~~  
make[2]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/build.make:2575: src/gromacs/CMakeFiles/libgromacs.dir/awh/biasparams.cpp.o] Error 1  
make[2]: \*\*\* Waiting for unfinished jobs…  
make[1]: \*\*\* [CMakeFiles/Makefile2:3495: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2  
make: \*\*\* [Makefile:166: all] Error 2

I am using Fedora 35, with a gcc 11.3.1.  
Could someone give me any hint about how to solve this problem?

Thank you very much.  
Sergio

---

<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:** [November 8, 2022, 11:22pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195/2 "2022-11-08T23:22:16Z")

</div>

Hi Sergio,

Just FYI: GROMACS 2018 is not maintained and does not support new compilers, so the preferred solution would be to switch to an older compiler or use a newer GROMACS version.

If that’s not an option for you, you can add `#include <limits>` at the top (among other `include`’s) of `src/gromacs/awh/biasparams.cpp` and `src/gromacs/mdlib/minimize.cpp` files. It should work fine.

---

<div class="post-metadata">

**Author:** ![sgaray](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sgaray](https://gromacs.bioexcel.eu/u/sgaray)\
**Post date:** [November 9, 2022, 6:36pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195/3 "2022-11-09T18:36:26Z")

</div>

Thanks al42and for your time! Unfortunately I have to work with GROMACS 2018 althoug I know it doesn’t have support anymore.  
I added the line that you suggested in biasparams.cpp and minimize.cpp, but I stil get some errors during compilation:

[26%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/gmxana/eigio.cpp.o  
[26%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/gmxana/fitahx.cpp.o  
[26%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/gmxana/gmx\_anadock.cpp.o  
In file included from /home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/arrayref.h:54,  
from /home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:55:  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp: In function ‘gmx\_int64\_t gmx::{anonymous}::calcCheckCoveringInterval(const gmx::AwhParams&, const std::vectorgmx::DimParams&, const std::vectorgmx::GridAxis&)’:  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:62: error: ‘numeric\_limits’ is not a member of ‘std’  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^ ~~~~~~~~~~~~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/gmxassert.h:67:15: note: in definition of macro ‘GMX\_RELEASE\_ASSERT’  
67 | ((void) ((condition) ? (void)0 :   
| ^ ~~~~~~~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:77: error: expected primary-expression before ‘int’  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/gmxassert.h:67:15: note: in definition of macro ‘GMX\_RELEASE\_ASSERT’  
67 | ((void) ((condition) ? (void)0 :   
| ^ ~~~~~~~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:77: error: expected ‘)’ before ‘int’  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/gmxassert.h:67:15: note: in definition of macro ‘GMX\_RELEASE\_ASSERT’  
67 | ((void) ((condition) ? (void)0 :   
| ^ ~~~~~~~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/gmxassert.h:67:14: note: to match this ‘(’  
67 | ((void) ((condition) ? (void)0 :   
| ^  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:9: note: in expansion of macro ‘GMX\_RELEASE\_ASSERT’  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^ ~~~~~~~~~~~~~~~~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:147: error: expected ‘)’ before ‘;’ token  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^  
In file included from /home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/arrayref.h:54,  
from /home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:55:  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/gmxassert.h:67:13: note: to match this ‘(’  
67 | ((void) ((condition) ? (void)0 :   
| ^  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:9: note: in expansion of macro ‘GMX\_RELEASE\_ASSERT’  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^ ~~~~~~~~~~~~~~~~~  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:147: error: expected ‘)’ before ‘;’ token  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^  
In file included from /home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/arrayref.h:54,  
from /home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:55:  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/utility/gmxassert.h:67:5: note: to match this ‘(’  
67 | ((void) ((condition) ? (void)0 :   
| ^  
/home/sgaray/Downloads/gromacs-2018.8/src/gromacs/awh/biasparams.cpp:137:9: note: in expansion of macro ‘GMX\_RELEASE\_ASSERT’  
137 | GMX\_RELEASE\_ASSERT(gridAxis[d].length()/sigma \< std::numeric\_limits::max(), “The axis length in units of sigma should fit in an int”);  
| ^ ~~~~~~~~~~~~~~~~~  
make[2]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/build.make:2575: src/gromacs/CMakeFiles/libgromacs.dir/awh/biasparams.cpp.o] Error 1  
make[2]: \*\*\* Waiting for unfinished jobs…  
make[1]: \*\*\* [CMakeFiles/Makefile2:3495: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2  
make: \*\*\* [Makefile:166: all] Error 2

Thank you in advance for your help!  
Sergio

---

<div class="post-metadata">

**Author:** ![sgaray](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sgaray](https://gromacs.bioexcel.eu/u/sgaray)\
**Post date:** [November 9, 2022, 6:46pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195/4 "2022-11-09T18:46:31Z")

</div>

Hi al42and! my mistake!! Your solution worked perfectly.

I really appreciate your time!!

---

<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:** [November 10, 2022, 10:20am UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195/5 "2022-11-10T10:20:10Z")

</div>

Glad to help :)

---

<div class="post-metadata">

**Author:** ![jmchenchem](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jmchenchem](https://gromacs.bioexcel.eu/u/jmchenchem)\
**Post date:** [December 4, 2025, 7:00pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2018-8/5195/6 "2025-12-04T19:00:15Z")

</div>

This reply also helps me! Thank you very much:)
