Question: Problem Compiling Bam-Readcount
0
gravatar for Shellfishgene
5.7 years ago by
Germany
Shellfishgene40 wrote:

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?

• 2.1k views
ADD COMMENTlink modified 5.7 years ago by ernfrid380 • written 5.7 years ago by Shellfishgene40

What about the library directory? Presumably you need to add an -Lsome_directory option.

ADD REPLYlink written 5.7 years ago by Devon Ryan91k

can you show us your command line?

ADD REPLYlink written 5.7 years ago by Zev.Kronenberg11k

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.

ADD REPLYlink written 5.7 years ago by Shellfishgene40

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})

ADD REPLYlink modified 5.7 years ago • written 5.7 years ago by Zev.Kronenberg11k
1

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!

ADD REPLYlink written 5.7 years ago by Shellfishgene40

glad you got it figured out.

ADD REPLYlink written 5.6 years ago by Zev.Kronenberg11k

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.

ADD REPLYlink modified 5.7 years ago • written 5.7 years ago by Zev.Kronenberg11k
2
gravatar for ernfrid
5.7 years ago by
ernfrid380
Saint Louis
ernfrid380 wrote:

bam-readcount has been under a fair amount of development over the last week. I have only recently added boost as a dependency and haven't yet updated bam-readcount to include it as part of the package. I would recommend either utilizing the last stable version (which did not require boost) by using git co v0.4.6 and then following the normal directions or attempting to set up cmake to point to your boost directories directly. The libraries should be found by cmake, but it doesn't always work when they are in a non-standard location. If I look at my local compilation I see the following cmake variables set:

Boost_INCLUDE_DIR /usr/include

Boost_LIBRARY_DIRS /usr/lib/boost

Boost_PROGRAM_OPTIONS_LIBRARY /usr/lib/libboost_program_options-mt.so

You may want to try setting those to point somewhere appropriate for your installation and see if things work.

ADD COMMENTlink written 5.7 years ago by ernfrid380

And to be more clear, I think your would want to do something like this:

cmake -DBoost_INCLUDE_DIR=/usr/include -DBoost_LIBRARY_DIRS=/usr/lib/boost -DBoost_PROGRAM_OPTIONS_LIBRARY=/usr/lib/libboost_program_options-mt.so ..

I would try without the program options part first.

ADD REPLYlink written 5.7 years ago by ernfrid380

Thanks, version 0.4.6 compiled as described in the readme. The Boost library location was always set for cmake with env variables, so it seems the current version does something different.

ADD REPLYlink written 5.7 years ago by Shellfishgene40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1722 users visited in the last hour