HITS-MBM/gromacs-fda

boost graph module is not found using external boost installation

BerndDoser opened this issue · 6 comments

Error during compilation:

In file included from /home/doserbd/git/gromacs-fda/src/gromacs/gmxana/gmx_fda_shortest_path.cpp:9:0:
/home/doserbd/git/gromacs-fda/src/gromacs/gmxana/fda/BoostGraph.h:11:42: fatal error: boost/graph/adjacency_list.hpp: No such file or directory
 #include <boost/graph/adjacency_list.hpp>

The error is from gromacs v2016.

GROMACS has removed the boost dependency in v2016. As FDA graph analysis depends on boost graph boost graph was reintegrated for the FDA version (see commit e9e0c23).

Hello Bernd,
I tried to install v2019.3-fda2.9.1 following the manual but got the following error in building process:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Boost (missing: graph) (found version "1.69.0")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindBoost.cmake:2165 (find_package_handle_standard_args)
CMakeLists.txt:488 (find_package)

I think it's related to this issue but I really don't know how to solve this. Could you help me with it?

Best,
Wen

Please install boost-graph, e.g. for ubuntu with

apt install libboost-graph-dev

Please install boost-graph, e.g. for ubuntu with

apt install libboost-graph-dev

I'm testing on fedora with
yum install boost-devel
I've checked my boost-graph:
Package boost-graph-1.69.0-9.fc31.x86_64 is already installed.
but still has the same error.

I can reproduce the issue within a fedora docker container:

FROM fedora:31

LABEL maintainer="Bernd Doser <bernd.doser@h-its.org>"

RUN yum install -y cmake boost-devel wget make gcc-c++
RUN wget https://github.com/HITS-MBM/gromacs-fda/archive/v2019.3-fda2.9.1.tar.gz
RUN tar xvf v2019.3-fda2.9.1.tar.gz
RUN mkdir gromacs-fda-2019.3-fda2.9.1/build
WORKDIR gromacs-fda-2019.3-fda2.9.1/build
RUN cmake -DGMX_BUILD_MDRUN_ONLY=OFF -DGMX_BUILD_FDA=ON -DGMX_DEFAULT_SUFFIX=OFF -DGMX_BINARY_SUFFIX=_fda -DGMX_SIMD=NONE -DGMX_BUILD_UNITTESTS=ON -DGMX_BUILD_OWN_FFTW=ON -DBoost_DEBUG=1 ..

It looks like the FindBoost module of CMake is not working with the fedora boost installation. Library (/usr/lib64/libboost_graph.so) and header files (/usr/include/boost/graph) are available but not found by FindBoost.cmake.

The usage of static libraries is forced in CMakeLists.txt, which are not available in fedora:

set(Boost_USE_STATIC_LIBS ON)

I will remove the special boost settings to fix it.