Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qemu: igvm support: include path from pkgconfig not used everywhere #367

Open
osteffenrh opened this issue May 28, 2024 · 1 comment
Open

Comments

@osteffenrh
Copy link
Contributor

I get a build error, when the IGVM C library is not installed system-wide.
It seems the include paths indicated by pkgconfig are not picked up correctly for all
compilation units. For example backends/igvm.c builds, but then it fails later at target/i386/sev.c.

I probably did not hit this until now and assumed the pkgconfig detection works fine, because
I had an old left-over igvm.h around in the system ...

$ PKG_CONFIG_PATH=$HOME/igvm/lib64/pkgconfig ./configure [...]
$ make

[...]

[1580/2774] Compiling C object libqemu-x86_64-softmmu.fa.p/target_i386_sev.c.o
FAILED: libqemu-x86_64-softmmu.fa.p/target_i386_sev.c.o
cc -m64 -mcx16 -Ilibqemu-x86_64-softmmu.fa.p -I. -I.. -Itarget/i386 -I../target/i386 -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -Wshadow=local -isystem /home/osteffen/work/svsm/coconut/qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/osteffen/work/svsm/coconut/qemu -iquote /home/osteffen/work/svsm/coconut/qemu/include -iquote /home/osteffen/work/svsm/coconut/qemu/host/include/x86_64 -iquote /home/osteffen/work/svsm/coconut/qemu/host/include/generic -iquote /home/osteffen/work/svsm/coconut/qemu/tcg/i386 -pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="x86_64-softmmu-config-target.h"' '-DCONFIG_DEVICES="x86_64-softmmu-config-devices.h"' -MD -MQ libqemu-x86_64-softmmu.fa.p/target_i386_sev.c.o -MF libqemu-x86_64-softmmu.fa.p/target_i386_sev.c.o.d -o libqemu-x86_64-softmmu.fa.p/target_i386_sev.c.o -c ../target/i386/sev.c
In file included from ../target/i386/sev.h:21,
                 from ../target/i386/sev.c:29:
/home/osteffen/work/svsm/coconut/qemu/include/exec/confidential-guest-support.h:27:10: fatal error: igvm/igvm.h: No such file or directory
   27 | #include "igvm/igvm.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
[1581/2774] Compiling C object libqemu-x86_64-softmmu.fa.p/target_i386_cpu-sysemu.c.o
[1582/2774] Compiling C object libqemu-x86_64-softmmu.fa.p/meson-generated_.._qapi_qapi-introspect.c.o
[1583/2774] Compiling C object libqemu-x86_64-softmmu.fa.p/target_i386_kvm_hyperv.c.o
[1584/2774] Compiling C object libqemu-x86_64-softmmu.fa.p/target_i386_kvm_kvm.c.o
FAILED: libqemu-x86_64-softmmu.fa.p/target_i386_kvm_kvm.c.o
cc -m64 -mcx16 -Ilibqemu-x86_64-softmmu.fa.p -I. -I.. -Itarget/i386 -I../target/i386 -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -Wshadow=local -isystem /home/osteffen/work/svsm/coconut/qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/osteffen/work/svsm/coconut/qemu -iquote /home/osteffen/work/svsm/coconut/qemu/include -iquote /home/osteffen/work/svsm/coconut/qemu/host/include/x86_64 -iquote /home/osteffen/work/svsm/coconut/qemu/host/include/generic -iquote /home/osteffen/work/svsm/coconut/qemu/tcg/i386 -pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="x86_64-softmmu-config-target.h"' '-DCONFIG_DEVICES="x86_64-softmmu-config-devices.h"' -MD -MQ libqemu-x86_64-softmmu.fa.p/target_i386_kvm_kvm.c.o -MF libqemu-x86_64-softmmu.fa.p/target_i386_kvm_kvm.c.o.d -o libqemu-x86_64-softmmu.fa.p/target_i386_kvm_kvm.c.o -c ../target/i386/kvm/kvm.c
In file included from ../target/i386/sev.h:21,
                 from ../target/i386/kvm/kvm.c:34:
/home/osteffen/work/svsm/coconut/qemu/include/exec/confidential-guest-support.h:27:10: fatal error: igvm/igvm.h: No such file or directory
   27 | #include "igvm/igvm.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
@osteffenrh
Copy link
Contributor Author

(Opening this here, because the qemu repo does not have issues turned on)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant