Compilation issues with GCC 14+

Hi! Thank you for making this collective variable implementation available. I'm trying to build this Gromacs fork on my cluster, but have been running into problems with compilation related to this issue. In short, #include <cstdlib> needs to be added to the tops of the files src/gromacs/utility/flags.h and src/gromacs/modularsimulator/modularsimulator.h or to re-implement the chain coordinate in a newer version of Gromacs, but I know the former is much simpler than the latter.

The code compiles and runs successfully if those two lines are added. (Edit: spoke too soon, GPU stuff isn't working)

This fixes the errors:

 error: use of undeclared identifier 'getenv'
  131 |            && getenv("GMX_DISABLE_MODULAR_SIMULATOR") == nullptr;

and

flags.h:126:5: error: ‘uint64_t’ does not name a type
126 | uint64_t flags_;

Current build system, if this is useful to future users:

gcc/g++ 14.1.0
cuda 12.8
openmpi 4.1
fftw 3.3.10

Cmake invocation:

cmake .. \
-DCMAKE_C_COMPILER=/mpcdf/soft/SLE_15/packages/skylake/openmpi/gcc_14-14.1.0/4.1.8/bin/mpicc \
-DCMAKE_CXX_COMPILER=/mpcdf/soft/SLE_15/packages/skylake/openmpi/gcc_14-14.1.0/4.1.8/bin/mpicxx \
-DGMX_BUILD_OWN_FFTW=ON \
-DGMX_MPI=ON \
-DGMX_GPU=CUDA \
-DGMX_FFT_LIBRARY=fftw3 \
-DGMX_USE_CUFFTMP=ON \
-DGMX_CUDA_TARGET_COMPUTE=80 \
-DGMX_CUDA_TARGET_SM=80 \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=${HOME}/.local/

Obviously compiler paths and CUDA_TARGET_COMPUTE are going to be different on different clusters.

Edited by Erik Poppleton