Troubles with dlopen()-ing plugins after GStreamer relocation in Mac OS X
4ernov
4ernov at gmail.com
Mon Jan 14 08:40:19 PST 2013
Hello,
I suffer some troubles concerning GStreamer plugin loading process
after I relocated GStreamer framework in Mac OS X so that to deploy it
in my app bundle.
First I tried osxrelocator.py from cerbero tools, but it unfortunately
doesn't change id of libgstreamer library and everything fails.
Then I tried to do it manually, I changed all the id's and links of
*.dylib from lib/ directory and *.so from lib/gstreamer-0.10 directory
to @executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib.
The program image gets linked correctly, but when GStreamer tries to
load its plugins on ititialization, dyld refuses to load them like
this:
dyld: loaded: /Users/User/devel/image/myapp/Contents/Frameworks/GStreamer.framework/Versions/0.10/lib/gstreamer-0.10/libgstvp8.so
dyld: unloaded:
/Users/User/devel/image/myapp/Contents/Frameworks/GStreamer.framework/Versions/0.10/lib/gstreamer-0.10/libgstvp8.so
(gst-plugin-scanner:92322): GStreamer-WARNING **: Failed to load
plugin '/Users/User/devel/image/myapp/Contents/Frameworks/GStreamer.framework/Versions/0.10/lib/gstreamer-0.10/libgstvp8.so':
dlopen(/Users/User/devel/image/myapp/Contents/Frameworks/GStreamer.framework/Versions/0.10/lib/gstreamer-0.10/libgstvp8.so,
2): Library not loaded:
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgstbasevideo-0.10.23.dylib
Referenced from:
/Users/User/devel/image/myapp/Contents/Frameworks/GStreamer.framework/Versions/0.10/lib/gstreamer-0.10/libgstvp8.so
Reason: image not found
Still ../Frameworks/GStreamer.framework/Versions/0.10/lib/libgstbasevideo-0.10.23.dylib
exists and contains these dynamic info:
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgstbasevideo-0.10.23.dylib
(compatibility version 24.0.0, current version 24.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgstvideo-0.10.0.dylib
(compatibility version 26.0.0, current version 26.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgstbase-0.10.0.dylib
(compatibility version 31.0.0, current version 31.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgstreamer-0.10.0.dylib
(compatibility version 31.0.0, current version 31.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.2.11)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgobject-2.0.0.dylib
(compatibility version 3401.0.0, current version 3401.2.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libffi.5.dylib
(compatibility version 6.0.0, current version 6.10.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgmodule-2.0.0.dylib
(compatibility version 3401.0.0, current version 3401.2.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libgthread-2.0.0.dylib
(compatibility version 3401.0.0, current version 3401.2.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libxml2.2.dylib
(compatibility version 11.0.0, current version 11.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libz.1.2.7.dylib
(compatibility version 1.0.0, current version 1.2.7)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libglib-2.0.0.dylib
(compatibility version 3401.0.0, current version 3401.2.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libintl.8.dylib
(compatibility version 10.0.0, current version 10.1.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/libiconv.2.dylib
(compatibility version 8.0.0, current version 8.1.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/0.10/lib/liborc-0.4.0.dylib
(compatibility version 17.0.0, current version 17.0.0)
My guess is that @executable_path becomes different when dlopen() is
used to load a library. Is there any solution for this?
Thanks in advance,
Alexey Chernov
More information about the gstreamer-devel
mailing list