Enabling the generation of introspection data (GIR files) in your library package involves the following:
Inherit the
gobject-introspection
class.
Make sure introspection is not disabled anywhere in
the recipe or from anything the recipe includes.
Also, make sure that "gobject-introspection-data" is
not in
DISTRO_FEATURES_BACKFILL_CONSIDERED
and that "qemu-usermode" is not in
MACHINE_FEATURES_BACKFILL_CONSIDERED
.
If either of these conditions exist, nothing will
happen.
Try to build the recipe.
If you encounter build errors that look like
something is unable to find
.so
libraries, check where these
libraries are located in the source tree and add
the following to the recipe:
GIR_EXTRA_LIBS_PATH = "${B}/something
/.libs"
oe-core
repository that use that
GIR_EXTRA_LIBS_PATH
variable
as an example.
Look for any other errors, which probably mean that introspection support in a package is not entirely standard, and thus breaks down in a cross-compilation environment. For such cases, custom-made fixes are needed. A good place to ask and receive help in these cases is the Yocto Project mailing lists.