[MacPorts] #62508: webkit2-gtk unusable gobject-introspection bindings

MacPorts noreply at macports.org
Sun Mar 21 15:55:36 UTC 2021


#62508: webkit2-gtk unusable gobject-introspection bindings
--------------------+-------------------------
 Reporter:  elelay  |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.6.4
 Keywords:          |       Port:  webkit2-gtk
--------------------+-------------------------
 I see the bug from python 3.

 The typelib is loaded so the classes are found but the associated library
 can't be loaded because it's in the build, not prefix location.
 So instanciating the class produces `TypeError: could not get a reference
 to type class`

 {{{
 jojolapin at Mac-mini macports-ports % python3
 Python 3.9.2 (default, Mar 18 2021, 05:43:47)
 [Clang 11.0.3 (clang-1103.0.32.62)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from gi.repository import WebKit2
 <stdin>:1: PyGIWarning: WebKit2 was imported without specifying a version
 first. Use gi.require_version('WebKit2', '4.0') before import to ensure
 that the right version gets loaded.
 >>> WebKit2.\t
 ** (.:85635): WARNING **: 15:26:42.272: Failed to load shared library
 '/opt/local/var/macports/build/_Users_jojolapin_macports-
 ports_www_webkit2-gtk/webkit2-gtk/work/build/lib/libwebkit2gtk-4.0.37.dylib'
 referenced by the typelib: dlopen(/opt/local/var/macports/build
 /_Users_jojolapin_macports-
 ports_www_webkit2-gtk/webkit2-gtk/work/build/lib/libwebkit2gtk-4.0.37.dylib,
 9): image not found

 ** (.:85635): WARNING **: 15:26:42.272: Failed to load shared library
 '/opt/local/var/macports/build/_Users_jojolapin_macports-
 ports_www_webkit2-gtk/webkit2-gtk/work/build/lib/libjavascriptcoregtk-4.0.18.dylib'
 referenced by the typelib: dlopen(/opt/local/var/macports/build
 /_Users_jojolapin_macports-
 ports_www_webkit2-gtk/webkit2-gtk/work/build/lib/libjavascriptcoregtk-4.0.18.dylib,
 9): image not found

 Display all 223 possibilities? (y or n)
 WebKit2.ApplicationInfo(
 WebKit2.get_major_version(
 WebKit2.ScriptDialog(
 (....snip....)
 >>> WebKit2.UserContentManager
 <class 'gi.repository.WebKit2.UserContentManager'>
 >>> WebKit2.UserContentManager()
 <stdin>:1: Warning: cannot retrieve class for invalid (unclassed) type
 'void'
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: could not get a reference to type class
 >>> WebKit2.WebView()
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: could not get a reference to type class
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/62508>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list