See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/76 OptionsGTK.cmake contains: # Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building. if (CMAKE_CROSSCOMPILING) set(ENABLE_GTKDOC OFF) set(ENABLE_INTROSPECTION OFF) endif () But in fact, if we remove these lines, cross building works perfectly fine. We've been patching out these lines when building the GNOME runtimes because we cross-build i386 and armv7 packages and obviously need introspection to work. These lines were added way back in r186259, so I can only presume something has changed somewhere such that it's no longer a problem, because both work perfectly fine. We have very simple CMake toolchain files that just set CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR, which is minimum required when cross building with CMake, so if it works for us I assume it should work for anyone....
Created attachment 399647 [details] Patch
Comment on attachment 399647 [details] Patch I think this is from before the times packagers figured out that they could run gtk-doc and/or g-ir-scanner/g-ir-generate using qemu userspace emulation to allow running code for the target platform when doing a cross-compiled build. While that's a terrible hack and ideally GTK-Doc and GI should support cross-compilation better, it's true that it is no longer needed to forcibly disable these two options 🤔️ Let's land this.
Committed r261814: <https://trac.webkit.org/changeset/261814> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399647 [details].
I'm pretty sure we're not using qemu or anything special? *shrug*
(In reply to Michael Catanzaro from comment #4) > I'm pretty sure we're not using qemu or anything special? *shrug* In case you feel like doing some oddball build tooling archeology... I have no idea how Fedora (which I suppose is the “we” there) wrangles this, but I am sure that's how Yocto and Buildroot do it: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/gobject-introspection.bbclass#n28 https://git.busybox.net/buildroot/tree/package/gobject-introspection/gobject-introspection.mk#n96 As for Flatpak, if you do a cross-build the whole build sandbox runs inside the qemu userspace emulator.
(In reply to Adrian Perez from comment #5) > I have no idea how Fedora (which I suppose is the “we” there) wrangles > this, but I am sure that's how Yocto and Buildroot do it: No, Fedora never cross builds anything, we do native builds only. Maybe armv7 builds are done in a VM or something, dunno. Here "we" is GNOME, I'm trying to upstream this GNOME patch. > As for Flatpak, if you do a cross-build the whole build sandbox runs > inside the qemu userspace emulator. Probably that explains why it works for GNOME.
(In reply to Michael Catanzaro from comment #6) > No, Fedora never cross builds anything, we do native builds only. Maybe > armv7 builds are done in a VM or something, dunno. Here "we" is GNOME, I'm > trying to upstream this GNOME patch. Ugh, sorry. There "we" in the first sentence meant Fedora, and in the third second meant GNOME. I can probably change my "we" multiple times in the same sentence if not careful. So many hats....