[sending again in a form that will be visible on the bug's page] On Sun, Nov 20, 2022 at 06:01:13PM +0100, Helmut Grohne wrote: > libvirt fails to cross build from source when building on amd64 for > armhf or armel. It uses meson's has_header to figure out whether > linux/kvm.h exists and due to linux-libc-dev:amd64 being installed, > /usr/include/linux/kvm.h exists. has_header is able to figure this out > without actually including it. When libvirt actually #includes it, > asm/kvm.h is missing as that's a multiarch headers. Thus linux headers > should be tested with check_header, which actually #includes it. While > has_header may seem relatively useless at this point, it is far quicker > than check_header. Thus I'm proposing to only employ check_header for > linux headers. I'm attaching a patch for your convenience.
Thanks for the report and tentative patch, Helmut! I've decided to go for a slightly different approach when submitting the change upstream [1]; after verifying that the overhead caused by just using check_header() all the time is negligible, we ultimately went for that approach [2][3]. The fix is going to be part of libvirt 9.3.0, which will be released next week. [1] https://listman.redhat.com/archives/libvir-list/2023-April/239672.html [2] https://listman.redhat.com/archives/libvir-list/2023-April/239679.html [3] https://gitlab.com/libvirt/libvirt/-/commit/0324adb647885932efc97eefcfe08f6a8db60ae1 -- Andrea Bolognani <e...@kiyuko.org> Resistance is futile, you will be garbage collected.
signature.asc
Description: PGP signature