问题是由于 gobject-introspection 中未引用 GTK3 的编译版本。
.typelib
通过列出gobject-introspection 中的文件来检查问题很简单
$ 哪个 g-ir 扫描仪
/Produits/publics/x86_64.Linux.RH6/gobject-introspection/1.40.0/bin/g-ir-scanner
$ ls /Produits/publics/x86_64.Linux.RH6/gobject-introspection/1.40.0/lib/girepository-1.0/
cairo-1.0.typelib fontconfig-2.0.typelib GIRepository-2.0.typelib GModule-2.0.typelib win32-1.0.typelib xlib-2.0.typelib
DBus-1.0.typelib freetype2-2.0.typelib GL-1.0.typelib GObject-2.0.typelib xfixes-4.0.typelib xrandr-1.3.typelib
DBusGLib-1.0.typelib Gio-2.0.typelib GLib-2.0.typelib libxml2-2.0.typelib xft-2.0.typelib
应该通过使用 configure 选项重新编译 GTK(及其依赖项)来解决该问题--enable-introspection=yes
。