[dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3
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 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
[dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3
2016-04-11 11:26, Thomas Monjalon: > 2016-04-11 16:50, Marvin Liu: > > Fixes: 2e099bc5d104 ("fix split of compiler and linker options") > > As commented earlier, I don't think it is the origin of the issue. > > > +$(info "vm_power_manager required libvirt version >= 0.9.3, please update > > libvirt-devel first") > > "required" should be "requires". > libvirt-devel is the name of the package on some distributions, but > it is not always the case. Moreover, the whole libvirt package must be > updated atomically, not only the headers. That's why I think it's better > to remove this part and just keep: > "vm_power_manager requires libvirt version >= 0.9.3" > > Other issue: it would better to use $(error to generate a compilation error. > But the example should not be skipped from examples/Makefile in this case. Sorry I mean the example *should be* skipped from examples/Makefile, with the small message "vm_power_manager requires libvirt >= 0.9.3".
[dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3
2016-04-11 16:50, Marvin Liu: > Fixes: 2e099bc5d104 ("fix split of compiler and linker options") As commented earlier, I don't think it is the origin of the issue. > +$(info "vm_power_manager required libvirt version >= 0.9.3, please update > libvirt-devel first") "required" should be "requires". libvirt-devel is the name of the package on some distributions, but it is not always the case. Moreover, the whole libvirt package must be updated atomically, not only the headers. That's why I think it's better to remove this part and just keep: "vm_power_manager requires libvirt version >= 0.9.3" Other issue: it would better to use $(error to generate a compilation error. But the example should not be skipped from examples/Makefile in this case.