package/libostree: enable introspection
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 22 Mar 2020 09:28:54 +0000 (10:28 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 22 Mar 2020 21:44:38 +0000 (22:44 +0100)
commit978d835640e64822302d4d1be24eb47880e1804e
tree0ed3d674c9f5f17f73575e71a5dfafd92d0d0f9a
parent1c6f0097dfdc161c9a63dc4ef94ed3d355c61b98
package/libostree: enable introspection

libostree build fails when introspection is enabled:

    ./.libs/libostree-1.so: error adding symbols: File in wrong format
    collect2: error: ld returned 1 exit status
    src/libostree/ostree-repo-deprecated.h:28: Warning: OSTree: symbol='G_GNUC_DEPRECATED_FOR': Skipping foreign symbol from namespace Gio
    linking of temporary binary failed: Command '['/bin/bash', './libtool', '--mode=link', '--tag=CC', '--silent', 'gcc', [...] ]' returned non-zero exit status 1.

This is because the build system for libostree hard-codes CC=gcc when
calling the GOI scanner, which obviously causes build failures when in
cross-compilation.

In d264351cfcca (package/libostree: disable introspection), we just
papered over the problem by forcibly disabling introspection altogether.

Turns out the fix is realatively simple: we can just override the
INTROSPECTION_SCANNER_ENV variable when calling make, which will revert
to the behaviour we expect: to use the cross-compiler in the GOI scanner
wrapper.

Thanks to Adam for pointing out at INTROSPECTION_SCANNER_ENV in the
first place. :-)

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libostree/libostree.mk