views:

799

answers:

2

I am trying to build an application which depends on Boost. So I downloaded Boost 1_41_0 to my Linux box and followed the instructions found on the Boost site for Unix variants, http://www.boost.org/doc/libs/1%5F41%5F0/more/getting%5Fstarted/unix-variants.html.

They basically suggest that I run ./bjam install, which I did. The build completed successfully. However, the library names don't seem to match the Boost naming convention described both in the documentation above, and what is specified in the makefile of the application I am trying to build.

I noticed that there are a bunch of options that I can specify to bjam and I tried to play with those, but no matter what happens I can't seem to get it quite right. My understanding is that the libraries should go into the $BOOST_ROOT/lib directory. This is where the libraries show up, but named:

libboost_thread.a
libboost_thread.so
libboost_thread.so.1.41.0

I'd expect them to be named libboost_thread-gcc41-mt-d-1_41_0 or something similar.

I did try ./bjam --build-type=complete --layout=tagged and I see:

libboost_thread.a
libboost_thread-mt.a
libboost_thread-mt-d.a
libboost_thread-mt-d.so
libboost_thread-mt-d.so.1.41.0
libboost_thread-mt-s.a
libboost_thread-mt-sd.a
libboost_thread-mt.so
libboost_thread-mt.so.1.41.0
libboost_thread.so
libboost_thread.so.1.41.0

So, I am not sure if I should just make stage my -L directory? Is there any documentation which describe this in more detail?

+1  A: 

The names was changed in 1.40.0 - see in release notes:

Build System

The default naming of libraries in Unix-like environment now matches system conventions, and does not include various decorations.

They probably forgot to update this part in the build documentation.

Xeor
A: 

Peter,

there are two variables here. First is "install" vs. "stage" (default). "install" copies both libraries and headers into a directory -- /usr/local by default, and you can then remove source tree. "stage" puts libraries to "stage/lib", and you should add "-L /stage/lib -I " flags.

Second is --layout=versioned and --layout=system. It seems like you have discovered what they do already, and indeed, system is default since 1.40. The getting started guide fails to mention this, and I've added an action item to update it. Ideally, you should talk to the authors of the application to use the system naming of boost libraries. If that's not possible, then building with --layout=versioned is the only option.

Let me know if this helps, Volodya

Vladimir Prus