When compiling with --disable-tpm:
../vl.o: In function `main':
/home/rjones/d/qemu/vl.c:4908: undefined reference to `tpm_cleanup'
This appears to have been introduced in commit c37cacabf228
("tpm: Move tpm_cleanup() to right place").
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
vl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vl.c b/vl.c
index 0723835bbf..dbfd06d4bc 100644
--- a/vl.c
+++ b/vl.c
@@ -4905,7 +4905,9 @@ int main(int argc, char **argv, char **envp)
res_free();
/* vhost-user must be cleaned up before chardevs. */
+#ifdef CONFIG_TPM
tpm_cleanup();
+#endif
net_cleanup();
audio_cleanup();
monitor_cleanup();
--
2.13.1
On 10/19/2017 03:50 AM, Richard W.M. Jones wrote: > When compiling with --disable-tpm: > > ../vl.o: In function `main': > /home/rjones/d/qemu/vl.c:4908: undefined reference to `tpm_cleanup' > > This appears to have been introduced in commit c37cacabf228 > ("tpm: Move tpm_cleanup() to right place"). > > Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> > --- > vl.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/vl.c b/vl.c > index 0723835bbf..dbfd06d4bc 100644 > --- a/vl.c > +++ b/vl.c > @@ -4905,7 +4905,9 @@ int main(int argc, char **argv, char **envp) > res_free(); > > /* vhost-user must be cleaned up before chardevs. */ > +#ifdef CONFIG_TPM > tpm_cleanup(); > +#endif > net_cleanup(); > audio_cleanup(); > monitor_cleanup();
Since I posted this, there are more failures with --disable-tpm ... LINK x86_64-softmmu/qemu-system-x86_64 ../vl.o: In function `main': /home/rjones/d/qemu/vl.c:4908: undefined reference to `tpm_cleanup' ../tpm.o: In function `qmp_query_tpm_types': /home/rjones/d/qemu/tpm.c:230: undefined reference to `tpm_be_find_by_type' ../tpm.o: In function `qmp_query_tpm_types': tpm.c:(.text+0x4a): undefined reference to `tpm_be_find_by_type' tpm.c:(.text+0x7a): undefined reference to `tpm_be_find_by_type' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:193: qemu-system-x86_64] Error 1 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
19.10.2017 10:50, Richard W.M. Jones wrote: > When compiling with --disable-tpm: > > ../vl.o: In function `main': > /home/rjones/d/qemu/vl.c:4908: undefined reference to `tpm_cleanup' > > This appears to have been introduced in commit c37cacabf228 > ("tpm: Move tpm_cleanup() to right place"). > > index 0723835bbf..dbfd06d4bc 100644 > --- a/vl.c > +++ b/vl.c > @@ -4905,7 +4905,9 @@ int main(int argc, char **argv, char **envp) > res_free(); > > /* vhost-user must be cleaned up before chardevs. */ > +#ifdef CONFIG_TPM > tpm_cleanup(); > +#endif Maybe we can define it to an empty macro (or inline function) in the header file instead? /mjt
On 11/06/2017 12:49 PM, Michael Tokarev wrote: > 19.10.2017 10:50, Richard W.M. Jones wrote: >> When compiling with --disable-tpm: >> >> ../vl.o: In function `main': >> /home/rjones/d/qemu/vl.c:4908: undefined reference to `tpm_cleanup' >> >> This appears to have been introduced in commit c37cacabf228 >> ("tpm: Move tpm_cleanup() to right place"). >> >> index 0723835bbf..dbfd06d4bc 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -4905,7 +4905,9 @@ int main(int argc, char **argv, char **envp) >> res_free(); >> >> /* vhost-user must be cleaned up before chardevs. */ >> +#ifdef CONFIG_TPM >> tpm_cleanup(); >> +#endif > Maybe we can define it to an empty macro (or inline function) in > the header file instead? It's solved with a stub in stubs/tpm.c. Stefan > > /mjt >
© 2016 - 2024 Red Hat, Inc.