python and gtk3 and gdk-pixbuf and maybe big sur
Ryan Schmidt
ryandesign at macports.org
Tue Jul 13 00:34:37 UTC 2021
On Jul 12, 2021, at 10:40, Langer, Stephen A. (Fed) wrote:
>
> Hi --
>
> Since upgrading to Big Sur and reinstalling all ports, I can't run gtk3 with either python37 or python38. Running this:
>
> % python
>>>> import gi
>>>> gi.require_version("Gtk", "3.0")
>>>> from gi.repository import Gtk
>
> Leads to this:
>
> ** (process:3291): WARNING **: 11:18:57.866: Failed to load shared library './gdk-pixbuf/libgdk_pixbuf-2.0.0.dylib' referenced by the typelib: dlopen(./gdk-pixbuf/libgdk_pixbuf-2.0.0.dylib, 9): image not found
>
> using either python27 or python38. The gdk-pixbuf2 port is installed.
>
> I have two MacPorts installations, one for the default variants and one that uses quartz instead of x11, so both are built from source and use a non-standard installation prefix. This didn’t cause a problem before the Big Sur upgrade. Both have the same problem now.
>
> Can someone tell me if this problem exists on a normal MacPorts installation? Am I doing something wrong? I've tried the fixes suggested in https://trac.macports.org/ticket/61699.
>
> I don't know for sure if the problem is due to the Big Sur upgrade.
You didn't say whether you were on Intel or Apple Silicon so I downloaded both
http://packages.macports.org/gdk-pixbuf2/gdk-pixbuf2-2.42.2_2%2Bx11.darwin_20.x86_64.tbz2
and
http://packages.macports.org/gdk-pixbuf2/gdk-pixbuf2-2.42.2_2%2Bx11.darwin_20.arm64.tbz2
and extracted the contents. In both of those, the files opt/local/share/gir-1.0/GdkPixbuf-2.0.gir and opt/local/share/gir-1.0/GdkPixdata-2.0.gir have the correct (absolute path) library reference:
shared-library="/opt/local/lib/libgdk_pixbuf-2.0.0.dylib"
which is as I would have expected since gobject-introspection and gdk-pixbuf2 (and atk) were rev-bumped 6 months ago to fix this problem (https://trac.macports.org/ticket/61699#comment:19). Since you use nonstandard MacPorts prefixes you won't have received those archives but will have built from source, but we would expect the result to be comparable.
Can you show us the output of this command on your system (from https://trac.macports.org/ticket/61699#comment:14):
grep "shared-library" /opt/local/share/gir-1.0/*.gir | grep -v /opt/local/lib
(replacing both occurrences of /opt/local with whatever your MacPorts prefix is).
More information about the macports-users
mailing list