Wrong INTROSPECTION_MAKEFILE path when cross compiling under buildroot
On a default buildroot setup, with glibc toolchain, python3, and gobject-introspection explicitly enabled in the build, building the libmbim
package fails because the INTROSPECTION_MAKEFILE
variable populated inside the Makefile points to the host gobject-introspection path, instead of to the target gobject-introspection path, and there may be no host installed gobject-introspection.
The generated Makefile contents include:
INTROSPECTION_CFLAGS = -I/home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/include/gobject-introspection-1.0 -I/home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/include/glib-2.0 -I/home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/lib/glib-2.0/include
INTROSPECTION_COMPILER = /home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/bin/g-ir-compiler
INTROSPECTION_GENERATE = /home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/bin/g-ir-generate
INTROSPECTION_GIRDIR = /share/gir-1.0
INTROSPECTION_LIBS = -L/home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/lib -lgirepository-1.0 -lgobject-2.0 -lglib-2.0
INTROSPECTION_MAKEFILE = /usr/share/gobject-introspection-1.0/Makefile.introspection
INTROSPECTION_SCANNER = /home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/bin/g-ir-scanner
INTROSPECTION_TYPELIBDIR = /lib/girepository-1.0
The INTROSPECTION_MAKEFILE
path should have pointed to /home/aleksander/Development/foss/buildroot/output/host/bin/../i586-buildroot-linux-gnu/sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection
instead.
The INTROSPECTION_GIRDIR
path also seems wrong, doesn't even have a correct prefix for what I can tell.
The previous list of variables is generated with the introspection.m4
file included in gobject introspection 1.68.0 (attached here introspection.m4), NOT with the one included in libmbim sources (which is a bit older and should be updated as well anyway).