Pango dylib missing
Hi,
I want to report the following issue:
Environment
- Operating system and version: MacOS Big Sur 11.3.2,
- Harwareplatform: MacBook Pro 13" 2020, M1 Apple Silicon
- Python version: 3.9 (Homebrew)
gobject-introspection version
Installed via brew install
% brew info gobject-introspection
gobject-introspection: stable 1.68.0 (bottled)
Generate introspection data for GObject libraries
https://gi.readthedocs.io/en/latest/
/opt/homebrew/Cellar/gobject-introspection/1.68.0 (190 files, 12.8MB) *
Poured from bottle on 2021-04-11 at 18:19:34
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gobject-introspection.rb
License: GPL-2.0-or-later and LGPL-2.0-or-later and MIT
==> Dependencies
Build: bison ✘, meson ✔, ninja ✔
Required: cairo ✔, glib ✔, libffi ✔, pkg-config ✔, python@3.9 ✔
==> Analytics
install: 213,546 (30 days), 447,847 (90 days), 1,595,750 (365 days)
install-on-request: 48,694 (30 days), 75,054 (90 days), 216,651 (365 days)
build-error: 0 (30 days)
Steps to reproduce
Executing python3 gitest.py
minimal example like so:
import gi
gi.require_version('Pango', '1.0')
from gi.repository import Pango
print(Pango.version_string())
Problem
Output of the script fails with Assertion Error like so:
** (process:8103): WARNING **: 13:02:15.250: Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found
Traceback (most recent call last):
File "/Users/epp/Documents/Python/PyDev/gitest.py", line 3, in <module>
from gi.repository import Pango
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "/opt/homebrew/lib/python3.9/site-packages/gi/importer.py", line 145, in load_module
dynamic_module = load_overrides(introspection_module)
File "/opt/homebrew/lib/python3.9/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
override_mod = importlib.import_module(override_package_name)
File "/opt/homebrew/Cellar/python@3.9/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/opt/homebrew/lib/python3.9/site-packages/gi/overrides/Pango.py", line 41, in <module>
FontDescription = override(FontDescription)
File "/opt/homebrew/lib/python3.9/site-packages/gi/overrides/__init__.py", line 195, in override
assert g_type != TYPE_NONE
AssertionError
Expected behaviour
script should print the pango version.
Probable Cause:
libpango-*.dylib not linked in girepository
% strings $(brew --prefix)/lib/girepository-1.0/*.typelib | grep libpango-[0-9.]*.dylib
zsh: no matches found: libpango-[0-9.]*.dylib
This should have been fixed upstream as reported here, but somehow pops up in the brew build?