On Tue, 3 Mar 2026 at 11:27, Luigi Leonardi <[email protected]> wrote: > > Hi all, > > I found a problem when trying to build QEMU with igvm enabled: > When igvm is not installed in a "canonical" path, the build system > cannot find the library. > > To reproduce: > > build igvm (latest upstream, as there were some problems with pkg-config). > PREFIX=$HOME/igvminst make -f igvm_c/Makefile install > > This would result in igvm being installed in $HOME/igvminst > > Then build QEMU > PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$HOME/igvminst/lib64/pkgconfig/" > ./configure --target-list=x86_64-softmmu --enable-igvm > > ninja -C build > > This fails with the following error: > > In file included from ../stubs/igvm.c:15: > /root/qemu/include/system/igvm-internal.h:19:10: fatal error: > igvm/igvm.h: No such file or directory > 19 | #include <igvm/igvm.h> > | ^~~~~~~~~~~~~ > > IIUC the problem is that the stubs/igvm.c file uses the igvm header > via the "igvm-internal.h", but the library is not added as a > dependency in the meson config file. > > I tried this change to meson, but it doesn't seem to work. > > Not sure how to fix this. > > Thanks, > Luigi >
I found a possible solution: stubs/igvm.c doesn't really require the igvm library. It just needs the `QIgvm` structure. Therefore we can just use a forward declaration. I will soon send a patch. Luigi
