Error in installing gromac-5.1.4

GROMACS version:5.1.4
GROMACS modification: Yes/No
Here post your question
Dear all,
I am trying to install gromacs-5.1.4 on cygwin platform by following the steps given on the gromacs website. During the make command following error occurs:

[ 51%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/gmxlib/gmx_dete
[ 51%] Building C object src/gromacs/CMakeFiles/libgromacs.dir/gmxlib/gmx_omp_nt
[ 51%] Building C object src/gromacs/CMakeFiles/libgromacs.dir/gmxlib/gmx_thread
/cygdrive/c/Users/hp/Downloads/gromacs-5.1.4/src/gromacs/gmxlib/gmx_thread_affinity.c:48:12: fatal error: sys/syscall.h: No such file or directory
48 | # include <sys/syscall.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/gromacs/CMakeFiles/libgromacs.dir/build.make:7825: src/gromacs/CMakeFiles/libgromacs.dir/gmxlib/gmx_thread_affinity.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3015: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
make: *** [Makefile:183: all] Error 2

Kindly help in installing the gromacs.

Hi jishrat,

If it is it possible for you in any way, I strongly recommend to use GROMACS2020.4 which you will find for download at

This should play much better with modern Platforms, be easier to install and runs much faster.

I am trying to install it on cygwin and I have done run the simulations with gromacs-5.1.4. Can i do the analysis with other version?

Hi jishrat,

Yes, for the most part, GROMACS is backwards compatible. It’s troublesome, however, to analyse newer gromacs data with an older version, so you will be bound to the version you installed.

Usually we advice to stick to one GROMACS version within a project. If it’s pure trajectory processing, using the newer GROMACS version should be okay.

Still not able to install the gromacs-2020.4. Followin error occurs during the make command:

/cygdrive/c/Users/hp/Downloads/gromacs-2020.4/src/external/thread_mpi/src/tmpi_init.cpp: In function ‘int tMPI_Start_threads(tmpi_bool, int, tMPI_Affinity_strategy, int*, char***, void ()(const void), const void*, int (*)(int, char**))’:
/cygdrive/c/Users/hp/Downloads/gromacs-2020.4/src/external/thread_mpi/src/tmpi_init.cpp:476:42: error: ‘strdup’ was not declared in this scope; did you mean ‘strcmp’?
476 | threads[i].argv[j] = strdup( (*argv)[j] );
| ^~~~~~
| strcmp
make[2]: *** [src/gromacs/CMakeFiles/thread_mpi.dir/build.make:356: src/gromacs/CMakeFiles/thread_mpi.dir/__/external/thread_mpi/src/tmpi_init.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4331: src/gromacs/CMakeFiles/thread_mpi.dir/all] Error 2
make: *** [Makefile:183: all] Error 2

Hi jishrat,

I’m sorry, I missed to make one connection - with GROMACS2020 we had some trouble installing on cygwin, see the forum post here:

If that as an option for you, I would recommend to try using the windows subsystem for linux. I know it’s another thing to install and keep track of, but in my experience, it perfroms superior to cygwin and will pay of quickly.

Hello. I am encountering this error in my Gromacs-5.1.3 installation. May I ask what did you do to solve this error? Thank you.

Hi rcsuplito,

If you can avoid it at any cost do not use GROMACS-5.1.3, but GROMACS-2020 instead.