Due to a presumed bug in MP's g-ir-scanner[1], generated typelib files often point to the dylib's relative build path. E.g. running g-ir-inspect --print-shlibs Pango Will print something like shlib: ./pango/libpango-1.0.0.dylib At run-time, the GObject Introspection infrastructure won't be able to find the libpango dylib, and panic ensues. This patch ensures that the full install paths are specified in the typelib file. You can ensure correct operation with the above command, which should print something like shlib: /opt/local/lib/libpango-1.0.0.dylib [1] https://trac.macports.org/ticket/62391 --- mesonbuild/modules/gnome.py.orig 2022-03-22 05:17:35.000000000 +0800 +++ mesonbuild/modules/gnome.py 2022-04-06 05:54:44.000000000 +0800 @@ -1177,6 +1177,13 @@ for incdir in typelib_includes: typelib_cmd += ["--includedir=" + incdir] + for target in girtargets: + if isinstance(target, build.SharedLibrary): + typelib_cmd += ["--shared-library=" + + os.path.join(state.environment.get_prefix(), + state.environment.get_shared_lib_dir(), + target.filename)] + typelib_target = self._make_typelib_target(state, typelib_output, typelib_cmd, generated_files, T.cast('T.Dict[str, T.Any]', kwargs)) self._devenv_prepend('GI_TYPELIB_PATH', os.path.join(state.environment.get_build_dir(), state.subdir))