After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782352 - openjpeg: macOS dependencies not found / plugin is not loading
openjpeg: macOS dependencies not found / plugin is not loading
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.12.0
Other Mac OS
: Normal blocker
: 1.12.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-08 20:27 UTC by Florian Zwoch
Modified: 2017-05-10 07:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Florian Zwoch 2017-05-08 20:27:34 UTC
There seems to be a re-linking issues with the macOS openjpeg plugin.

$ gst-inspect-1.0 --version

(gst-plugin-scanner:46189): GStreamer-WARNING **: Failed to load plugin '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/libgstopenjpeg.so': dlopen(/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/libgstopenjpeg.so, 2): Library not loaded: libopenjp2.7.dylib
  Referenced from: /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/libgstopenjpeg.so
  Reason: image not found
gst-inspect-1.0 version 1.12.0
GStreamer 1.12.0
Unknown package origin


$ otool -L /Library/Frameworks/GStreamer.framework/Libraries/gstreamer-1.0/libgstopenjpeg.so 
/Library/Frameworks/GStreamer.framework/Libraries/gstreamer-1.0/libgstopenjpeg.so:
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstcodecparsers-1.0.0.dylib (compatibility version 1201.0.0, current version 1201.0.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstvideo-1.0.0.dylib (compatibility version 1201.0.0, current version 1201.0.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstbase-1.0.0.dylib (compatibility version 1201.0.0, current version 1201.0.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/liborc-0.4.0.dylib (compatibility version 26.0.0, current version 26.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib (compatibility version 1201.0.0, current version 1201.0.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgmodule-2.0.0.dylib (compatibility version 5001.0.0, current version 5001.3.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgobject-2.0.0.dylib (compatibility version 5001.0.0, current version 5001.3.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libffi.7.dylib (compatibility version 9.0.0, current version 9.0.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libglib-2.0.0.dylib (compatibility version 5001.0.0, current version 5001.3.0)
	/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	libopenjp2.7.dylib (compatibility version 7.0.0, current version 2.1.0)


$ ls -l /Library/Frameworks/GStreamer.framework/Libraries/libopenjp2.*
-rwxr-xr-x  1 root  wheel  245556  5 Mai 09:37 /Library/Frameworks/GStreamer.framework/Libraries/libopenjp2.2.1.0.dylib
-rwxr-xr-x  1 root  wheel  245556  5 Mai 09:37 /Library/Frameworks/GStreamer.framework/Libraries/libopenjp2.7.dylib
-rw-r--r--  1 root  wheel  871144  5 Mai 09:37 /Library/Frameworks/GStreamer.framework/Libraries/libopenjp2.a
-rwxr-xr-x  1 root  wheel  245556  5 Mai 09:37 /Library/Frameworks/GStreamer.framework/Libraries/libopenjp2.dylib
-rw-r--r--  1 root  wheel    1015  5 Mai 09:37 /Library/Frameworks/GStreamer.framework/Libraries/libopenjp2.la


The libraries are packaged correctly. Just the linked library location for libopenjp2.7.dylib is not correct or has not been updated. Fixing this manually resolves the issue:


$ sudo install_name_tool -change libopenjp2.7.dylib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libopenjp2.7.dylib libgstopenjpeg.so 

$ gst-inspect-1.0 openjpeg
Plugin Details:
  Name                     openjpeg
  Description              OpenJPEG-based JPEG2000 image decoder/encoder
  Filename                 /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/libgstopenjpeg.so
  Version                  1.12.0
  License                  LGPL
  Source module            gst-plugins-bad
  Source release date      2017-05-04
  Binary package           GStreamer Bad Plug-ins source release
  Origin URL               Unknown package origin

  openjpegenc: OpenJPEG JPEG2000 encoder
  openjpegdec: OpenJPEG JPEG2000 decoder

  2 features:
  +-- 2 elements
Comment 1 Jan Schmidt 2017-05-10 07:02:36 UTC
Thanks - fixed in cerbero, and future builds should have the right linking info:

commit e29b2a37086a8055a2cb316c3ed0e18db1795348
Author: Jan Schmidt <jan@centricular.com>
Date:   Wed May 10 16:58:57 2017 +1000

    openjpeg: Add patch to set the INSTALL_NAME_DIR
    
    Fixes a problem on OSX where the installed libopenjp2
    dylib id doesn't contain the full path, and leads to
    incorrect linking and a non-loadable plugin
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782352