Install Path is not set in dylibs (shared libs) on OS X
Added by Alexander Theißen almost 11 years ago
I installed wt-3.3.1 from source on OS X 10.9.1.
I followed the manual and called cmake:
cmake -DWT_CPP_11_MODE=-std=c++0x -DCMAKE_INSTALL_PREFIX=/opt/wt ..
Then I did:
make
make install
Compilation and installation worked without any errors. I can link against the dylibs. The only problem is that programs wich are linked against the wt libs can't find the dylibs. That is because wt does not set the correct install path on the dylibs:
Alexanders-iMac:lib alexander$ pwd
/opt/wt/lib
Alexanders-iMac:lib alexander$ otool -L libwthttp.3.3.1.dylib
libwthttp.3.3.1.dylib:
libwthttp.36.dylib (compatibility version 36.0.0, current version 3.3.1)
libwt.36.dylib (compatibility version 36.0.0, current version 3.3.1)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 50.0.0)
/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 50.0.0)
/usr/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_program_options-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_date_time-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_random-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_signals-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
Because of this the wt dylibs are only searched for in the working directory.
Did I forget to set some cmake var or is it not implemented? If the latter: It ist just a matter of adding the following flag to the linker call:
-install_name /path/to/libwt.dylib
Replies (2)
RE: Install Path is not set in dylibs (shared libs) on OS X - Added by conrad bielski almost 11 years ago
Dear Alexander,
I hope you were able to fix your problem, but if not, then maybe this will help.
1. This other Wt forum question sort of deals with the problem: http://redmine.webtoolkit.eu/boards/2/topics/2957
- I, on the other hand, added the path via my DYLD_LIBRARY_PATH variable (which is something Apple frowns upon) which I got from here: http://faisalzqureshi.blogspot.it/2014/01/boost-library-on-osx-dyld-woes.html .
Hope this helps,
Conrad :)
RE: Install Path is not set in dylibs (shared libs) on OS X - Added by Alexander Theißen almost 11 years ago
Thank you for your answer. I already committed a bug report and solved the problem using rpath:
http://redmine.webtoolkit.eu/issues/2705