Undefined symbol "Py_InitModule4_64" while upgrading harfbuzz
For the past few days I've been ignoring upgrade errors from
harfbuzz, and this morning I finally found time to track things down. The first step was to figure out what the heck "harfbuzz" is, and why it's installed. Turns out it's a glyph generator; on my FreeBSD systems, it's ultimately a dependency of
Trying to update the installed
harfbuzz-1.5.1_1 port to the new
harfbuzz-1.7.2 release was kicking back errors like this:
Traceback (most recent call last): File "/usr/local/bin/g-ir-scanner", line 65, in <module> from giscanner.scannermain import scanner_main File "/usr/local/lib/gobject-introspection/giscanner/scannermain.py", line 41, in <module> from giscanner.dumper import compile_introspection_binary File "/usr/local/lib/gobject-introspection/giscanner/dumper.py", line 34, in <module> from .gdumpparser import IntrospectionBinary File "/usr/local/lib/gobject-introspection/giscanner/gdumpparser.py", line 36, in <module> from .transformer import TransformerException File "/usr/local/lib/gobject-introspection/giscanner/transformer.py", line 34, in <module> from .girparser import GIRParser File "/usr/local/lib/gobject-introspection/giscanner/girparser.py", line 31, in <module> from .girwriter import COMPATIBLE_GIR_VERSION File "/usr/local/lib/gobject-introspection/giscanner/girwriter.py", line 29, in <module> from .xmlwriter import XMLWriter File "/usr/local/lib/gobject-introspection/giscanner/xmlwriter.py", line 46, in <module> from giscanner._giscanner import collect_attributes ImportError: /usr/local/lib/gobject-introspection/giscanner/_giscanner.so: Undefined symbol "Py_InitModule4_64" [54151 refs] gmake: *** [/usr/local/share/gobject-introspection-1.0/Makefile.introspection:156: HarfBuzz-0.0.gir] Error 1 gmake: Leaving directory '/usr/ports/print/harfbuzz/work/harfbuzz-1.7.2/src' gmake: *** [Makefile:2464: all-recursive] Error 1 gmake: Leaving directory '/usr/ports/print/harfbuzz/work/harfbuzz-1.7.2/src' gmake: *** [Makefile:1357: all] Error 2 gmake: Leaving directory '/usr/ports/print/harfbuzz/work/harfbuzz-1.7.2/src' gmake: *** [Makefile:505: all-recursive] Error 1 gmake: Leaving directory '/usr/ports/print/harfbuzz/work/harfbuzz-1.7.2' gmake: *** [Makefile:437: all] Error 2 gmake: Leaving directory '/usr/ports/print/harfbuzz/work/harfbuzz-1.7.2' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/print/harfbuzz
The solution for me was to deinstall and reinstall
gobject-introspection, then deinstall and reinstall
[user@host /]# cd /usr/ports/devel/gobject-introspection [user@host /usr/ports/devel/gobject-introspection]# make deinstall reinstall ===> Deinstalling for gobject-introspection ===> Deinstalling gobject-introspection-1.50.0,1 Updating database digests format: 100% Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: gobject-introspection-1.50.0,1 Number of packages to be removed: 1 The operation will free 11 MiB. [1/1] Deinstalling gobject-introspection-1.50.0,1... [1/1] Deleting files for gobject-introspection-1.50.0,1: 100% ===> Installing for gobject-introspection-1.50.0,1 ===> Registering installation for gobject-introspection-1.50.0,1 Installing gobject-introspection-1.50.0,1... [user@host /usr/ports/devel/gobject-introspection]# cd /usr/ports/print/harfbuzz [user@host /usr/ports/print/harfbuzz]# make clean deinstall reinstall . . . snip . . . ====> Compressing man pages (compress-man) ===> Installing for harfbuzz-1.7.3 ===> Registering installation for harfbuzz-1.7.3 Installing harfbuzz-1.7.3...
All working now!