[MacPorts] #61699: gdk-pixbuf2 @2.42.0 breaks py-gobject3
MacPorts
noreply at macports.org
Sun Nov 29 04:29:37 UTC 2020
#61699: gdk-pixbuf2 @2.42.0 breaks py-gobject3
-----------------------+-------------------------
Reporter: fhgwright | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Keywords: | Port: gdk-pixbuf2
-----------------------+-------------------------
There's some kind of a path screwup related to `libgdk_pixbuf-2.0.0.dylib`
in the new `gdk-pixbuf2`, resulting in import failures from `py-jobject3`.
This can be demonstrated as follows:
With the previous version:
{{{
MacPro:~ fw$ port installed gdk-pixbuf2 | grep active
gdk-pixbuf2 @2.40.0_1+x11 (active)
MacPro:~ fw$ python -c 'import gi; from gi.repository import Gtk'
-c:1: PyGIWarning: Gtk was imported without specifying a version first.
Use gi.require_version('Gtk', '3.0') before import to ensure that the
right version gets loaded.
}}}
(the warning is harmless for this purpose, and the `gi.require_version`
call is omitted for simplicity)
With the new version:
{{{
MacPro:~ fw$ port installed gdk-pixbuf2 | grep active
gdk-pixbuf2 @2.42.0_0+x11 (active)
MacPro:~ fw$ python -c 'import gi; from gi.repository import Gtk'
** (process:1685): WARNING **: 19:59:36.238: Failed to load shared library
'libgdk_pixbuf-2.0.0.dylib' referenced by the typelib:
dlopen(libgdk_pixbuf-2.0.0.dylib, 9): image not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/gi/importer.py", line 145, in load_module
importlib.import_module('gi.repository.' + dep.split("-")[0])
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
line 37, in import_module
__import__(name)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/gi/importer.py", line 145, in load_module
importlib.import_module('gi.repository.' + dep.split("-")[0])
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
line 37, in import_module
__import__(name)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/gi/importer.py", line 146, in load_module
dynamic_module = load_overrides(introspection_module)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
override_mod = importlib.import_module(override_package_name)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
line 37, in import_module
__import__(name)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/gi/overrides/GdkPixbuf.py", line 32, in <module>
class Pixbuf(GdkPixbuf.Pixbuf):
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/gi/overrides/__init__.py", line 195, in override
assert g_type != TYPE_NONE
AssertionError
}}}
The exact error messages vary with the Python version, but the effect is
the same.
Some poking around with `dtruss` indicates that the problem is that it's
trying to load `libgdk_pixbuf-2.0.0.dylib` instead of
`/opt/local/lib/libgdk_pixbuf-2.0.0.dylib`. In fact, it works if one is
currently in the `/opt/local/lib` directory:
{{{
MacPro:~ fw$ cd /opt/local/lib
MacPro:lib fw$ port installed gdk-pixbuf2 | grep active
gdk-pixbuf2 @2.42.0_0+x11 (active)
MacPro:lib fw$ python -c 'import gi; from gi.repository import Gtk'
-c:1: PyGIWarning: Gtk was imported without specifying a version first.
Use gi.require_version('Gtk', '3.0') before import to ensure that the
right version gets loaded.
}}}
This does ''not'' seem to be a simple install-name issue:
{{{
MacPro:~ fw$ otool -L /opt/local/lib/libgdk_pixbuf-2.0.0.dylib
/opt/local/lib/libgdk_pixbuf-2.0.0.dylib:
/opt/local/lib/libgdk_pixbuf-2.0.0.dylib (compatibility version
4201.0.0, current version 4201.0.0)
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0,
current version 10.5.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1197.1.1)
/opt/local/lib/libglib-2.0.0.dylib (compatibility version
5801.0.0, current version 5801.3.0)
/opt/local/lib/libgobject-2.0.0.dylib (compatibility version
5801.0.0, current version 5801.3.0)
/opt/local/lib/libgmodule-2.0.0.dylib (compatibility version
5801.0.0, current version 5801.3.0)
/opt/local/lib/libgio-2.0.0.dylib (compatibility version 5801.0.0,
current version 5801.3.0)
}}}
This is all from 10.9.5, but the same symptom is present in 10.13.6 (and
probably others).
--
Ticket URL: <https://trac.macports.org/ticket/61699>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list