xpra icon
Bug tracker and wiki

Opened 4 weeks ago

Closed 4 weeks ago

#2393 closed defect (fixed)

gi bindings don't load on win32

Reported by: totaamwin32 Owned by: Antoine Martin
Priority: blocker Milestone: 3.0
Component: packaging Version: 3.0.x
Keywords: Cc:

Description

Discovered as part of #1527:

E:\Xpra\trunk\src\dist>xpra_cmd proxy --no-daemon
2019-08-27 07:56:31,661 created named pipe: \\.\pipe\Xpra\Main
load_module(gi.repository.GLib)
is_registered=<built-in method is_registered of gi.Repository object at 0x000000
0003fc2ad0>
xpra main error:
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/scripts/main.py", line 110, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "E:\Xpra\trunk\src/xpra/scripts/main.py", line 445, in run_mode
    return run_server(error_cb, options, mode, script_file, args, current_display)
  File "E:\Xpra\trunk\src/xpra/scripts/server.py", line 446, in run_server
    return do_run_server(error_cb, opts, mode, xpra_file, extra_args, desktop_display)
  File "E:\Xpra\trunk\src/xpra/scripts/server.py", line 932, in do_run_server
    app = make_proxy_server()
  File "E:\Xpra\trunk\src/xpra/scripts/server.py", line 338, in make_proxy_server
    from xpra.server.proxy.proxy_server import ProxyServer
  File "E:\Xpra\trunk\src/xpra/server/proxy/proxy_server.py", line 33, in <module>
    glib = import_glib()
  File "E:\Xpra\trunk\src/xpra/gtk_common/gobject_compat.py", line 118, in import_glib
    return _try_import(import_glib3, import_glib2)
  File "E:\Xpra\trunk\src/xpra/gtk_common/gobject_compat.py", line 64, in _try_import
    return trygtk3()
  File "E:\Xpra\trunk\src/xpra/gtk_common/gobject_compat.py", line 60, in trygtk3
    return import_method_gtk3()
  File "E:\Xpra\trunk\src/xpra/gtk_common/gobject_compat.py", line 109, in import_glib3
    from gi.repository import GLib                  #@UnresolvedImport
  File "E:\Xpra\trunk\src\dist\lib\gi\importer.py", line 136, in load_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name GLib, introspection typelib not found

Something must be missing and the gi importer is making it extremely painful to figure out what that is.

Change History (1)

comment:1 Changed 4 weeks ago by totaamwin32

Resolution: fixed
Status: newclosed

The typelib has the correct spelling on disk:

# ls -la /c/msys64/mingw64/lib/girepository-1.0/GLib-2.0.typelib
-rw-r--r-- 1 Win7 Pro 64 None 193168 Jun 17 07:18 /c/msys64/mingw64/lib/girepository-1.0/GLib-2.0.typelib

But cx_freeze messes it up:

# ls -la lib/girepository-1.0/GLib*
-rw-r--r-- 1 Win7 Pro 64 None 193168 Jun 17 07:18 lib/girepository-1.0/Glib-2.0.typelib

The lowercase 'l' in Glib breaks everything.

Workaround in r23592.

Note: See TracTickets for help on using tickets.