Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dylibs and OS X

I am trying to run a program called vowpal-wabbit (version 6.0) in mac os x.

I've used homebrew to install some things, such as lib tools and, importantly, boost.

However -- I'm finding that, even though

/usr/local/Cellar/boost/1.49.0/lib

Clearly has all the boost libs, (including lib boost_program_options.dylib)...

The error message i get when trying to run a binary is :

dyld: Library not loaded: libboost_program_options.dylib

I get the same (basically) error when running "make" to build this binary from scratch :

ld: library not found for -lboost_program_options

So ... I guess my question is : How can I get my compiled binary to "see" the libboost_program_options.dylib ? Or alternatively... how can I get vw (version 6.0) running on os x lion.

like image 406
jayunit100 Avatar asked Oct 07 '22 16:10

jayunit100


1 Answers

I'll guess that /usr/local/Cellar/boost/1.49.0/lib is not on either DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH. You could export either of those in your environment, or you could symlink the Boost libraries from /usr/local/lib.

Be careful not to wipe out the contents of DYLD_FALLBACK_LIBRARY_PATH, though! From the dyld man page, the default value for this is $(HOME)/lib:/usr/local/lib:/lib:/usr/lib.

like image 120
kfb Avatar answered Oct 12 '22 11:10

kfb