I am trying to compile graph-tool from source on Ubuntu 16.04
but have the problem that it fails to pick up the correct boost libraries. I am trying to compile it against anaconda python so have to provide additional flags to ./configure
. I try to run the following:
./configure CXX="g++-5" CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs" CPPFLAGS="-I/home/pmj27/anaconda2/lib" PYTHON="/home/pmj27/anaconda2/bin/python2.7" CAIROMM_LIBS="-L/home/pmj27/anaconda2/include/cairomm-1.0/cairomm" --enable-openmp
This however fails with the following error message being displayed in the terminal window
checking for boostlib >= 1.54.0... configure: We could not detect the boost libraries (version 1.54 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::Python library is available... no
configure: error: No usable boost::python found
despite the fact that libboost_python.so
resides in /home/pmj27/anaconda2/lib
.
Looking at config.log
the error message seems to be:
configure:19187: g++-5 -c -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -ftemplate-depth-250 -DNDEBUG -Wall -Wextra -ftemplate-backtrace-limit=0 -std=gnu++14 -Wno-unused-local-typedefs -I/home/pmj27/anaconda2/lib -I/usr/include conftest.cpp >&5
conftest.cpp:35:33: fatal error: /usr/local/include/boost/version.hpp: Permission denied
compilation terminated.
So what seems to be happening is that it first looks in /usr/local/include/boost
, which is the wrong location, and then fails. How do I stop it from doing that? (I presume this is the reason why graph-tool won't compile.)
I have also tried
./configure CXX="g++-5" CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs -I/home/pmj27/anaconda2/lib" PYTHON="/home/pmj27/anaconda2/bin/python2.7" CAIROMM_LIBS="-L/home/pmj27/anaconda2/include/cairomm-1.0/cairomm" --enable-openmp
But that still fails with the same error message though now /home/pmj27/anaconda2/lib
seems to appear before /usr/local/include/boost
:
configure:19104: checking for boostlib >= 1.54.0
configure:19187: g++-5 -c -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -ftemplate-depth-250 -DNDEBUG -Wall -Wextra -ftemplate-backtrace-limit=0 -std=gnu++14 -Wno-unused-local-typedefs -I/home/pmj27/anaconda2/lib -I/usr/include conftest.cpp >&5
conftest.cpp:35:33: fatal error: /usr/local/include/boost/version.hpp: Permission denied
compilation terminated.