Bug#1030223: gobject-introspection mini-policy: separate GIR XML from -dev package to make cross-compilation possible?

Simon McVittie smcv at debian.org
Wed Feb 1 16:11:36 GMT 2023


On Wed, 01 Feb 2023 at 10:39:30 +0000, Simon McVittie wrote:
> GObject-Introspection gets some of its information by parsing the source
> code, and that's fine. However, it gets other information by introspecting
> the just-built libflatpak.so.0 (hence its name): linking a small executable
> to libflatpak.so.0, and running it. When doing "true" cross-compiling
> (without the ability to run host executables via qemu-user or similar),
> this is not possible.

Alternatively, we might be able to do something like this:

- commit a copy of the output of the dump executable in debian/

- optionally have architecture-specific output, but as far as I know, the
  common case is the same for every architecture (like .symbols files)

- during a native build:
    - if the cached copy in debian/ does not match the real result,
      fail with an error (ideally showing the differences)
    - or if the cached copy in debian/ is missing, tell the maintainer
      what to add (in the form of a diff, like .symbols files)

- during a cross build, use the cached copy (and assume it's right)

That would mean we can have GIR, and maybe even typelibs?, from
cross-builds too - as long as someone has done a native build of the
same upstream version at least once (on any architecture for the common
case where the GIR is the same on all architectures, or on the matching
architecture in the uncommon case where it's different per-architecture).

    smcv



More information about the pkg-gnome-maintainers mailing list