Installation error GLOG?

GROMACS version: 2025.2

Hi, I’ve been trying to install gromacs for the first time in linux, I have a manjaro/KDE distro/setup. I’m following the ‘Quick and Dirty’ installation guide (Installation guide - GROMACS 2025.2 documentation) but i get stuck on the ‘make’ step.

I get a bunch of error logs that begin with

[ 6%] Building CXX object src/gromacs/CMakeFiles/colvars_objlib.dir/__/external/colvars/colvar.cpp.o
In file included from /usr/include/c10/util/logging_is_google_glog.h:50,
from /usr/include/c10/util/Logging.h:27,
from /usr/include/ATen/core/ivalue_inl.h:27,
from /usr/include/ATen/core/ivalue.h:1589,
from /usr/include/ATen/core/List_inl.h:4,
from /usr/include/ATen/core/List.h:491,
from /usr/include/ATen/core/IListRef_inl.h:3,
from /usr/include/ATen/core/IListRef.h:631,
from /usr/include/ATen/WrapDimUtils.h:3,
from /usr/include/ATen/TensorNames.h:3,
from /usr/include/ATen/NamedTensorUtils.h:3,
from /usr/include/torch/csrc/autograd/variable.h:11,
from /usr/include/torch/csrc/autograd/autograd.h:3,
from /usr/include/torch/csrc/api/include/torch/autograd.h:3,
from /usr/include/torch/csrc/api/include/torch/all.h:7,
from /usr/include/torch/csrc/api/include/torch/torch.h:3,
from /home/nanojasso/Downloads/gromacs-2025.2/src/external/colvars/colvarcomp_torchann.h:23,
from /home/nanojasso/Downloads/gromacs-2025.2/src/external/colvars/colvar.cpp:24:
/usr/include/glog/logging.h:60:4: error: #error <glog/logging.h> was not included correctly. See the documentation for how to consume the library.
60 | # error <glog/logging.h> was not included correctly. See the documentation for how to consume the library.
| ^~~~~
In file included from /usr/include/glog/logging.h:63:
/usr/include/glog/flags.h:45:4: error: #error <glog/flags.h> was not included correctly. See the documentation for how to consume the library.
45 | # error <glog/flags.h> was not included correctly. See the documentation for how to consume the library.
| ^~~~~
In file included from /usr/include/glog/logging.h:77:
/usr/include/glog/log_severity.h:38:4: error: #error <glog/log_severity.h> was not included correctly. See the documentation for how to consume the library.
38 | # error <glog/log_severity.h> was not included correctly. See the documentation for how to consume the library.
| ^~~~~
In file included from /usr/include/glog/logging.h:78:
/usr/include/glog/vlog_is_on.h:71:4: error: #error <glog/vlog_is_on.h> was not included correctly. See the documentation for how to consume the library.
71 | # error <glog/vlog_is_on.h> was not included correctly. See the documentation for how to consume the library.

and end with

make[2]: *** [src/gromacs/CMakeFiles/colvars_objlib.dir/build.make:79: src/gromacs/CMakeFiles/colvars_objlib.dir/__/external/colvars/colvar.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5741: src/gromacs/CMakeFiles/colvars_objlib.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

All the error logs say they happen in glog/logging.h or glog/flags.h and i kinda understand that this is a library-related error, but i do not know how to unbug this.

I’ve tried changing some of the options in the ‘cmake’ step, as i’ve seen commented in other installation error posts in this forum but none seem to help me so far. Any advice would help me. Thanks.

Hi!
It looks like this error is coming from the torchANN feature in the Colvars library, which is trying to include Libtorch. If you don’t need that feature, you can try explicitly disabling the Colvars module with the -DCMAKE_USE_COLVARS=none option. If you do need that feature, reinstalling Libtorch and explicitly setting the CMAKE_PREFIX_PATH to the Libtorch installation directory might help.

Thanks for the hint. I just ran into this issue as well and was able to compile GROMACS after disabling colvars. The correct cmake option to disable colvars is -DGMX_USE_COLVARS=none, though, not -DCMAKE_USE_COLVARS=none.