Skip to contentSkip to conversation

hw/xen/xen_pvdev: Include qemu/log.h for qemu_log_vprintf()

PATCH In review Thomas Huth 4 participants 5 messages Nov 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/xen/xen_pvdev: Include qemu/log.h for qemu_log_vprintf()

Olaf Hering reported a build failure due to an undefined reference to 'qemu_log_vprintf'. Explicitely including qemu/log.h seems to fix the issue.

---
 hw/xen/xen_pvdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/xen/xen_pvdev.c +1 -1
index 405e154..5212bc6 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-
+#include "qemu/log.h"
 #include "hw/xen/xen_backend.h"
 #include "hw/xen/xen_pvdev.h"
 
Signature · 7 lines
1.8.3.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thomas Huth

Olaf Hering reported a build failure due to an undefined reference to 'qemu_log_vprintf'. Explicitely including qemu/log.h seems to fix the issue.

The fix makes sense:

However I was unable to reproduce the build failure, so I would like a confirmation from Olaf that the fix is working.

Quoted 19 lines
 hw/xen/xen_pvdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/xen/xen_pvdev.c +1 -1
index 405e154..5212bc6 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-
+#include "qemu/log.h"
 #include "hw/xen/xen_backend.h"
 #include "hw/xen/xen_pvdev.h"
 
Signature · 1 line
1.8.3.1

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 5 lines · Stefano Stabellini
Quoted 4 lines · Thomas Huth

Olaf Hering reported a build failure due to an undefined reference to 'qemu_log_vprintf'. Explicitely including qemu/log.h seems to fix the issue.

Quoted 8 lines
Quoted 1 line

The fix makes sense:

However I was unable to reproduce the build failure, so I would like a confirmation from Olaf that the fix is working.

If you configure with the (default) simple trace backend then trace.h will pull in qemu/log.h (and in this case trace.h comes in via xen_common.h). But if you're using a different backend then it won't bring in that header, and you'll get the build failure.

This is a fairly common "breaks but only with some trace backends" compile failure, but I'm not sure how best to try to make it more robust (or at least into a 'fails-everywhere' bug).

thanks
-- PMM

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 21 lines · Peter Maydell
Quoted 5 lines · Stefano Stabellini
Quoted 4 lines · Thomas Huth

Olaf Hering reported a build failure due to an undefined reference to 'qemu_log_vprintf'. Explicitely including qemu/log.h seems to fix the issue.

Quoted 8 lines
Quoted 1 line

The fix makes sense:

However I was unable to reproduce the build failure, so I would like a confirmation from Olaf that the fix is working.

If you configure with the (default) simple trace backend then trace.h will pull in qemu/log.h (and in this case trace.h comes in via xen_common.h). But if you're using a different backend then it won't bring in that header, and you'll get the build failure.

Quoted 4 lines

This is a fairly common "breaks but only with some trace backends" compile failure, but I'm not sure how best to try to make it more robust (or at least into a 'fails-everywhere' bug).

Personally what I can do is adding

--enable-trace-backends=syslog

to my test scripts. That is enough to repro the issue. Thanks for the explanation.