# Generating git version information error

**URL:** <https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275>\
**Category:** User discussions\
**Tags:** cmake-error\
**Created:** [June 7, 2022, 12:49pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275 "2022-06-07T12:49:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichelePellegrino](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/michelepellegrino/32/628_2.png) [@MichelePellegrino](https://gromacs.bioexcel.eu/u/MichelePellegrino)\
**Post date:** [June 7, 2022, 12:49pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/1 "2022-06-07T12:49:11Z")

</div>

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`:

```auto
[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

---

<div class="post-metadata">

**Author:** ![pbauer](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pbauer/32/13_2.png) [@pbauer](https://gromacs.bioexcel.eu/u/pbauer)\
**Post date:** [June 7, 2022, 1:03pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/2 "2022-06-07T13:03:13Z")

</div>

Hello,

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

Cheers

Paul

---

<div class="post-metadata">

**Author:** ![MichelePellegrino](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/michelepellegrino/32/628_2.png) [@MichelePellegrino](https://gromacs.bioexcel.eu/u/MichelePellegrino)\
**Post date:** [June 7, 2022, 1:10pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/3 "2022-06-07T13:10:44Z")

</div>

Hi, it’s 2.17.1

---

<div class="post-metadata">

**Author:** ![pbauer](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pbauer/32/13_2.png) [@pbauer](https://gromacs.bioexcel.eu/u/pbauer)\
**Post date:** [June 7, 2022, 1:24pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/4 "2022-06-07T13:24:02Z")

</div>

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

What kind of modifications are there?

---

<div class="post-metadata">

**Author:** ![MichelePellegrino](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/michelepellegrino/32/628_2.png) [@MichelePellegrino](https://gromacs.bioexcel.eu/u/MichelePellegrino)\
**Post date:** [June 7, 2022, 1:28pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/5 "2022-06-07T13:28:51Z")

</div>

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

> **[GitHub - MicPellegrino/gromacs-flow-field: Flow field collection and output...](https://github.com/MicPellegrino/gromacs-flow-field)**
>
> Flow field collection and output for GROMACS. Contribute to MicPellegrino/gromacs-flow-field development by creating an account on GitHub.

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

---

<div class="post-metadata">

**Author:** ![MichelePellegrino](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/michelepellegrino/32/628_2.png) [@MichelePellegrino](https://gromacs.bioexcel.eu/u/MichelePellegrino)\
**Post date:** [June 7, 2022, 2:02pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/6 "2022-06-07T14:02:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pbauer](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pbauer/32/13_2.png) [@pbauer](https://gromacs.bioexcel.eu/u/pbauer)\
**Post date:** [June 7, 2022, 2:02pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/7 "2022-06-07T14:02:58Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![MichelePellegrino](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/michelepellegrino/32/628_2.png) [@MichelePellegrino](https://gromacs.bioexcel.eu/u/MichelePellegrino)\
**Post date:** [June 7, 2022, 2:03pm UTC](https://gromacs.bioexcel.eu/t/generating-git-version-information-error/4275/8 "2022-06-07T14:03:38Z")

</div>

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