Hi!
I'm trying to compile bam-readcount on SUSE Linux (without root rights, this is our cluster). I seem to have a problem with Boost, I get a bunch of errors similar to this:
bamreadcount.cpp:(.text+0x32f4): undefined reference to `boost::program_options::options_description::m_default_line_length'
I assume the linking to Boost is not working. I have compiled Boost and setup environment variables for cmake for boost_root and the include dir. What am I missing?
What about the library directory? Presumably you need to add an
-Lsome_directory
option.can you show us your command line?
The command line is "make" ;). I think -L does not apply here as it's cmake? I gave cmake the location of Boost with environment variables, as per the instructions. If I don't do that it doesn't even start to compile things, so that's somewhat working at least.
Perhaps you should have mentioned you were working with CMAKE.
try editing your CMAKE and add:
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
Thanks, I did mention cmake in the question. The problem seems to have been the version of bam-readcount, see below. Worked with local install of cmake and Boost even!
glad you got it figured out.
The fastest solution will most likely be to ask the admin to install the boost-devel libraries system wide using yum ... or something equivalent. Linking to local installs in CMAKE is going to cause you ALOT of pain. I speak from experience, I tried to do the exact same thing.