vm_power_manager utilize libvirt API virDomainGetVcpuPinInfo for
retrieve domU vcpu information. This API implemented from version 0.9.3.
Suse11 SP3 32bit default libvirt version is 0.8.8, so there'll be build
error. Add judgement in sample Makefile to skip unsupport environment.

examples/vm_power_manager/channel_manager.c: In function
?update_pcpus_mask?:
channel_manager.c:117:3: error: implicit declaration of function
?virDomainGetVcpuPinInfo?

Fixes: 2e099bc5d104 ("fix split of compiler and linker options")

Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/examples/vm_power_manager/Makefile 
b/examples/vm_power_manager/Makefile
index 113dbc4..08e301f 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -36,6 +36,9 @@ endif
 # Default target, can be overridden by command line or environment
 RTE_TARGET ?= x86_64-native-linuxapp-gcc

+# check libvirt version >= 0.9.3
+ifeq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
+
 include $(RTE_SDK)/mk/rte.vars.mk

 # binary name
@@ -57,3 +60,10 @@ CFLAGS_main.o += -Wno-return-type
 endif

 include $(RTE_SDK)/mk/rte.extapp.mk
+
+else
+.PHONY: all clean
+all:
+$(info "vm_power_manager required libvirt version >= 0.9.3, please update 
libvirt-devel first")
+clean:
+endif
-- 
1.9.3

Reply via email to