Source: libvirt Version: 6.9.0-1 User: debian-cr...@lists.debian.org Usertags: ftcbfs
We're getting closer to making libvirt cross buildable. A lot of libvirt's dependencies have been fixed. One aspect that resides in libvirt is dtrace. dtrace runs a compiler and defaults to the build architecture compiler. As such it'll fail finding host architecture headers and that happens to break the build. When running dtrace, one must export the CC variable with a suitable value. Implementing this with meson is not entirely trivial due to https://github.com/mesonbuild/meson/issues/266. The attached patch therefore implements the suggested workaround. Please consider applying it to bring libvirt one step closer to being cross buildable. Helmut
--- libvirt-6.9.0.orig/meson.build +++ libvirt-6.9.0/meson.build @@ -2063,6 +2063,7 @@ if dtrace_prog.found() conf.set('WITH_DTRACE_PROBES', 1) endif + dtrace_command = [ 'env', 'CC=' + ' '.join(meson.get_compiler('c').cmd_array()), dtrace_prog ] endif if not get_option('host_validate').disabled() and host_machine.system() != 'windows' --- libvirt-6.9.0.orig/src/meson.build +++ libvirt-6.9.0/src/meson.build @@ -60,14 +60,14 @@ out_h, input: infile, output: out_h, - command: [ dtrace_prog, '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ], + command: dtrace_command + [ '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ], ) dtrace_gen_objects += custom_target( out_o, input: infile, output: out_o, - command: [ dtrace_prog, '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ], + command: dtrace_command + [ '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ], ) custom_target( --- libvirt-6.9.0.orig/src/qemu/meson.build +++ libvirt-6.9.0/src/qemu/meson.build @@ -56,14 +56,14 @@ out_h, input: infile, output: out_h, - command: [ dtrace_prog, '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ], + command: dtrace_command + [ '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ], ) qemu_dtrace_gen_objects += custom_target( out_o, input: infile, output: out_o, - command: [ dtrace_prog, '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ], + command: dtrace_command + [ '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ], ) qemu_dtrace_gen_stp = custom_target(