Source: libvirt Version: 8.9.0-1 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
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. Helmut
--- libvirt-8.9.0.orig/meson.build +++ libvirt-8.9.0/meson.build @@ -623,7 +623,7 @@ endif foreach name : headers - if cc.has_header(name) + if name.startswith('linux/') ? cc.check_header(name) : cc.has_header(name) conf.set('WITH_@0@'.format(name.underscorify().to_upper()), 1) endif endforeach