On 7/12/21, 9:52 PM, "macports-users on behalf of Langer, Stephen A. (Fed) via 
macports-users" 
<[email protected]<mailto:[email protected]>
 on behalf of 
[email protected]<mailto:[email protected]>> 
wrote:






On 7/12/21, 8:34 PM, "Ryan Schmidt" <[email protected]> wrote:



    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://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrac.macports.org%2Fticket%2F61699&amp;data=04%7C01%7Cstephen.langer%40nist.gov%7C4dca606d006f4e75dad208d945960583%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637617332906884800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B9RNpGISzc4bbqR7MixWiP5MsPAbLMlOcC6Mb%2BPcHNc%3D&amp;reserved=0.

    >

    > 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



    
https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpackages.macports.org%2Fgdk-pixbuf2%2Fgdk-pixbuf2-2.42.2_2%252Bx11.darwin_20.x86_64.tbz2&amp;data=04%7C01%7Cstephen.langer%40nist.gov%7C4dca606d006f4e75dad208d945960583%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637617332906884800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=NpfVAyOtQI0MdQXTml5Jfx1IB%2BuhmRqJgeO64fLAMHw%3D&amp;reserved=0



    and



    
https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpackages.macports.org%2Fgdk-pixbuf2%2Fgdk-pixbuf2-2.42.2_2%252Bx11.darwin_20.arm64.tbz2&amp;data=04%7C01%7Cstephen.langer%40nist.gov%7C4dca606d006f4e75dad208d945960583%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637617332906884800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Q1y0oU4sMgjr8p62Ny%2BM9UinouOsepTeHm4WY2CEGCU%3D&amp;reserved=0



    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://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrac.macports.org%2Fticket%2F61699%23comment%3A19&amp;data=04%7C01%7Cstephen.langer%40nist.gov%7C4dca606d006f4e75dad208d945960583%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637617332906884800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Z6dOvDfUwZ%2F6Q0%2FlL6tPKGn%2FIJUezGdai7ujzlUomv4%3D&amp;reserved=0).
 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://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrac.macports.org%2Fticket%2F61699%23comment%3A14&amp;data=04%7C01%7Cstephen.langer%40nist.gov%7C4dca606d006f4e75dad208d945960583%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637617332906884800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=FNXwYlzyHdFKuSf6dF63DEdFkZwzB7I101oQNswQIJY%3D&amp;reserved=0):



    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).











Here is the output:



iolanthe 505>> grep "shared-library" 
/opt/local/stow/ports-quartz/share/gir-1.0/*.gir | grep -v 
/opt/local/stow/ports-quartz/lib

/opt/local/stow/ports-quartz/share/gir-1.0/AppStreamGlib-1.0.gir:             
shared-library="./libappstream-glib/libappstream-glib.8.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/Atk-1.0.gir:             
shared-library="./atk/libatk-1.0.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/Atspi-2.0.gir:             
shared-library="./atspi/libatspi.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/Babl-0.1.gir:             
shared-library="./babl/libbabl-0.1.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/GDesktopEnums-3.0.gir:             
shared-library=""

/opt/local/stow/ports-quartz/share/gir-1.0/GExiv2-0.10.gir:             
shared-library="./gexiv2/libgexiv2.2.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/GdkPixbuf-2.0.gir:             
shared-library="./gdk-pixbuf/libgdk_pixbuf-2.0.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/GdkPixdata-2.0.gir:             
shared-library="./gdk-pixbuf/libgdk_pixbuf-2.0.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/Gegl-0.4.gir:             
shared-library="./gegl/libgegl-0.4.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/GtkSource-4.gir:             
shared-library="./gtksourceview/libgtksourceview-4.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/Notify-0.7.gir:             
shared-library="./libnotify/libnotify.4.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/Peas-1.0.gir:             
shared-library="./libpeas/libpeas-1.0.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/PeasGtk-1.0.gir:             
shared-library="./libpeas-gtk/libpeas-gtk-1.0.0.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/Soup-2.4.gir:             
shared-library="./libsoup/libsoup-2.4.1.dylib"

/opt/local/stow/ports-quartz/share/gir-1.0/SoupGNOME-2.4.gir:             
shared-library="./libsoup/libsoup-gnome-2.4.1.dylib"



I should have said I'm on Intel.



To be more specific about what I'm doing, the two installation prefixes are 
/opt/local/stow/ports-quartz and /opt/local/stow/ports/-x11.  When building 
macports, I also use --with-applications-dir=/Applications/stow/ports-quartz or 
--with-applications-dir=/Applications/stow/ports-x11.  To switch from one to 
the other, I have a script that unstows one and stows the other (using the stow 
port).  The only place where that's not practical is for startup items, so I 
add "startupitem_install no" to macports.conf in the quartz directory.



Thanks again.



-- Steve



More info:

I moved my non-standard installations aside (unstowed them) and installed 
MacPorts 2.7.1 from the pkg file, with no customizations.   Then I installed 
the gdk-pixbuf2, gobject-introspection, and py38-pygobject3 ports and their 
dependencies from source (with "port -s install …").   After that 
/opt/local/share/gir-1.0/GkdPixbuf-2.0.gir and 
/opt/local/share/gir-1.0/GdkPixdata-2.0.gir both contain relative paths for 
shared-library.



Uninstalling gdk-pixbuf2 and reinstalling without -s leads to .gir files with 
absolute paths.



I'll file a bug report but I don't know if this is a gdk-pixbuf2 bug or a 
gobject-introspection bug.



-- Steve






Reply via email to