Dylibs and OS X
Asked Answered
A

1

5

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.

Australorp answered 30/5, 2012 at 17:9 Comment(0)
C
4

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.

Center answered 31/5, 2012 at 15:24 Comment(2)
Are you suggesting that I ADD /usr/local/Cellar/boost/1.49.0/lib to the path ?Australorp
Yes, that's right: export DYLD_LIBRARY_PATH=/usr/local/Cellar/boost/1.49.0/lib:$DYLD_LIBRARY_PATH (assuming you're using bash).Center

© 2022 - 2024 — McMap. All rights reserved.