I am working at building Boost 1.53.0 with Boost Log 2.0r862 on Mac OSX 10.8.2 and installed it to a fake root to keep the /usr/lib* and /opt/lib* clean. I built and installed Boost with./bootstrap --prefix=/path/to/myfakerootdir
and installed the library with./b2 install
This built and installed successfully; when running cmake on my project it properly detects the library include and lib directory. Yet after it completes building and attempts to run the executable I get
dyld: Library not loaded: libboost_system.dylib
Referenced from: /Users/brad/dev/strata/strataextract/build/Debug/StrataExtractUnitTests
Reason: image not found
Some the possible issues I've researched include:
1.Using otool to change the executable manually (Though it seems like a very "hacky" solution)
2.Use a modified portfile at Github Macports Overlay (Though the current version offered is too old for my project.
3.Multiple build tutorials on Boost, unfortunately most referencing Bjam which from what I
understand is no longer good practice.
I seem to remember of a similar situation requiring me to set relative path to false, but I am unsure how I would do this with Boost + bjam.
#define BOOST_LOG_DYN_LINK
the only error I get islibboost_log.so: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option::enum_type, boost::system::error_code*)'
– brad_c6 May 19 '13 at 04:23