[libbluray-devel] improve dlopen on osx

Rafaël Carré funman at videolan.org
Sat Aug 11 00:19:51 CEST 2012


Le 2012-08-10 22:53, Nathan Hjelm a écrit :
> 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?

3) is a good idea IMO, although I'm not sure we should specifically
mention VLC; other applications can use libbluray as well?

Does anyone know another app using it? Where in the .app would they put
libbluray.dylib?

Your patch looks OK at a quick glance.

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

Nice, I look forward to it.


More information about the libbluray-devel mailing list