Generating git version information error

GROMACS version: 2021
GROMACS modification: Yes

Hi,

Upon trying to re-build a modified GROMACS 2021 version on my workstation I get the following error; after running sudo make install:

[  1%] Built target fftwBuild
[  1%] Built target muparser
[  1%] Generating git version information
CMake Error at cmake/gmxGenerateVersionInfo.cmake:125 (list):
  list GET given empty list

CMakeFiles/git-version-info.dir/build.make:70: recipe for target 'CMakeFiles/git-version-info' failed
make[2]: *** [CMakeFiles/git-version-info] Error 1
CMakeFiles/Makefile2:2357: recipe for target 'CMakeFiles/git-version-info.dir/all' failed
make[1]: *** [CMakeFiles/git-version-info.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2

This is quite puzzling, since I have built this version many times and never incurred in this error. Is there a way to solve or ‘bypass’ this problem?

Thanks,

Michele

Hello,

this might be an issue with newer versions of git? Can you tell me which version you are using?

Cheers

Paul

Hi, it’s 2.17.1

Weird, I’m using 2.35.2 and not having issues here trying to rebuild v2021.

What kind of modifications are there?

It’s basically a code that performs on-the-fly density binning, nothing more.

All the modifications are in src/gromacs, the build is not affected.

So, a workaround seems to be just to pass -DGMX_GIT_VERSION_INFO=OFF when running cmake

What happens when run the command that causes the issue manually in the location?

git rev-list -n1 "--pretty=format:%ci" HEAD

commit 4fc2b017fd10b9a71c43134330dc6dfb7a6f37bd
2021-04-06 11:23:25 +0200