[libbluray-devel] improve dlopen on osx

Nathan Hjelm hjelmn at mac.com
Fri Aug 10 22:53:38 CEST 2012


With the current version of VLC (2.0.3) users can not simply drop libaacs.dylib into VLC.app/Contents/MacOS/lib. As far as I can tell this is because neither @loader_path/../lib (@loader_path references from the location of the Mach-O binary that is calling dlopen. In this case VLC.app/Contents/MacOS/plugins/) or @executable_path/lib (@executable_path references from the current running executable: VLC.app/Contents/MacOS) are part of the default search path for dynamically loaded libraries. Now this can be fixed in several ways including:

1) VLC adds @loader_path/../lib to the rpath of liblibbluray_plugin.dylib (install_name_path -add_rpath @loader_path/../lib liblibbluray_plugin.dylib),
2) VLC adds @executable_path/lib to the rpath of VLC executable (install_name_path -add_rpath @executable_path/../lib VLC), or
3) update libbluray.dylib to search for libaacs and libbbdplus through some common paths if libaacs.dylib can't be found in the default path.

I think #3 is a more general fix for to the loading problem and a patch vs the latest tarball (0.2.2) is attached.

Thoughts?

-Nathan

FYI, I will be posting another patch to the libaacs devel list to add support for IOKit to libaacs.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libbluray_dlopen_search.patch
Type: application/octet-stream
Size: 2881 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20120810/09f82351/attachment.obj>


More information about the libbluray-devel mailing list