I am having trouble installing bam-readcount on centos 5 using Cmake 3.0.2 due to a boost library linking error. Since boost 1.55 is installed system wide so I followed the suggestions in this previous thread with similar problem (Problem Compiling Bam-Readcount) by adding the following lines in CMakeList.txt
set(BOOST_INCLUDE "/risapps/rhel5/boost/1.55.0/include")
find_package(Boost REQUIRED)
include_directories(${BOOST_INCLUDE})
However it failed again with the error include could not find load file: /usr/lib64/boost/Boost.cmake
. Even tried the trick by explicitly linking Boost libraries in the cmake line DBoost_LIBRARY_DIRS
and DBoost_INCLUDE_DIR
and still the same.
Any advice?
Please post your operating system and version.
already did. centos 5
oops yeah. So you can try exporting the paths outside of the CMakeList: http://www.cmake.org/pipermail/cmake/2010-May/036794.html . I've had this problem before and fiddling around with the exports worked. It is a pain!
This is what I did:
Deleted the 3 lines related to boost in
CMakeList.txt
and added this linefind_package(Boost REQUIRED)
. Then tried the UBoost trick in that link and it did not work.Then I explicitly set
-DBOOST_ROOT
in cmake command which points to the boost installed system wide. The error persisted.Also tried to add the boost path to
LD_LIBRARY_PATH
andCMAKE_LIBRARY_PATH
andCMAKE_INCLUDE_PATH
and still cmake could not find boost.