Endian trouble loading Typelib with gi.repository import
- From: Matt <mwtaylor gmail com>
- To: python-hackers-list gnome org
- Subject: Endian trouble loading Typelib with gi.repository import
- Date: Mon, 19 Jun 2017 10:55:29 +0100
Hi,
I'm having some issues with using pygobject on a big-endian architecture
(mips router), for example:
>>> from gi.repository import GLib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1161, in
_load_backward_compatible
File "/usr/lib/python3.4/site-packages/gi/importer.py", line 67, in
load_module
dynamic_module._load()
File "/usr/lib/python3.4/site-packages/gi/module.py", line 294, in _load
self._introspection_module = get_introspection_module(self._namespace)
File "/usr/lib/python3.4/site-packages/gi/module.py", line 273, in
get_introspection_module
module = IntrospectionModule(namespace, version)
File "/usr/lib/python3.4/site-packages/gi/module.py", line 122, in
__init__
repository.require(namespace, version)
gi.RepositoryError: Failed to load typelib file
'/usr/lib/girepository-1.0/GLib-2.0.typelib' for namespace 'GLib':
Typelib size 1957626368 does not match 175988
This is clearly something related to the endianness when checking the
typelib size: struct.unpack('<I', struct.pack('>I', 1957626368)) ==
(175988,)
175988 is the correct filesize.
Can anyone help me out with what the issue might be here? (I'm using
pygobject version 3.14.0, gobject-introspection 1.42.0, glib2 2.43.4,
all cross-compiled for the architecture).
Many thanks,
Matt
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]