ciaranm / glasgow-subgraph-solver

A solver for subgraph isomorphism problems, based upon a series of papers by subsets of McCreesh, Prosser, and Trimble.
MIT License
69 stars 23 forks source link

Install errors coming from missing boost libraries #3

Open jdmoorman opened 4 years ago

jdmoorman commented 4 years ago

Installing glasgow with make CXX=g++-7, I was getting some errors like

g++-7 -o glasgow_subgraph_solver -pthread -lstdc++fs intermediate/glasgow_subgraph_solver/src/glasgow_subgraph_solver.o libcommon.a -lboost_thread -lboost_system -lboost_program_options -lboost_iostreams -lstdc++fs
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_system
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_program_options
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_iostreams

because I installed boost with only the threads library, since that was the only library mentioned in the install instructions.

ciaranm commented 4 years ago

The documentation is perhaps not as clear as it could be here. When we say "with threads enabled", this is a global option for all of the Boost libraries which has to be selected at compile time. In the olden days, some distributions shipped two versions of Boost, one which had threads enabled (and typically had -mt at the end of the .so filenames) and one which didn't. This doesn't refer to the Boost threads library, which we don't use.

Possibly the best approach here is to document which Boost packages should be installed on common distributions. On recent Ubuntu, it's libboost-all-dev. On older versions of Ubuntu, I seem to recall there were separate -mt Boost packages instead.

jdmoorman commented 4 years ago

I understand now! I was confused because I was installing from source according to the boost getting started instructions, so I thought that "threads" was referring to a "separately-compiled Boost library" (see 5 and 5.1). I would have installed libboost-all-dev with apt-get, but I don't have sudo permissions on the machine I am using and I hadn't come across this SU answer at the time. Suggesting libboost-all-dev (et al) sounds okay to me.