Colvars/colvars

Error while compiling GROMACS after patching

qzchen2022 opened this issue · 3 comments

Hi,

I tried compiling different versions of GROMACS (2020.3/2020.6/2022.6) but all failed for following error:

CMake Error at src/gromacs/CMakeLists.txt:204 (gmx_include_colvars_headers):
  Unknown CMake command "gmx_include_colvars_headers".

I did the instruction in the main page and my shell window show the patching is succeed. Could you tell me what I should check?

Hi @qzchen2022, apologies that this is unclear from the output. Those versions of GROMACS are no longer supported by the patching procedure since this change. I'll add a warning message to the patching script.

If you absolutely need those older versions, please use an earlier version of Colvars e.g. from February.

Note that the current master branch of Colvars still supports GROMACS 2023.*, but we highly recommend if you are building your own GROMACS to use the 2024 release, where Colvars is included.

I wanted to add to the script a helpful message saying: "You can find working legacy versions of GROMACS with Colvars at https://github.com/Colvars/gromacs".
Then I tested them and saw those branches also got the incompatible update, so they are broken.

@jhenin @qzchen2022 I have restored the 2022 patched version here to what it was before the March update. Meaning, patching is already done in that branch and I tested that it builds. The doc for it is also up to date.

I have also removed the branches containing older patched versions, so that there is no longer a risk of downloading versions that won't compile. Lastly, I added the message suggested by @jhenin to the patching script.