From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marvin Liu Subject: [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3 Date: Mon, 11 Apr 2016 16:50:31 +0800 Message-ID: <1460364631-28381-1-git-send-email-yong.liu@intel.com> References: <1460346357-26592-1-git-send-email-yong.liu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Marvin Liu To: dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7EC1F1BBE for ; Mon, 11 Apr 2016 10:50:39 +0200 (CEST) In-Reply-To: <1460346357-26592-1-git-send-email-yong.liu@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 =E2=80=98update_pcpus_mask=E2=80=99: channel_manager.c:117:3: error: implicit declaration of function =E2=80=98virDomainGetVcpuPinInfo=E2=80=99 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_manag= er/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 ?=3D x86_64-native-linuxapp-gcc =20 +# check libvirt version >=3D 0.9.3 +ifeq ($(shell pkg-config --atleast-version=3D0.9.3 libvirt; echo $$?), 0= ) + include $(RTE_SDK)/mk/rte.vars.mk =20 # binary name @@ -57,3 +60,10 @@ CFLAGS_main.o +=3D -Wno-return-type endif =20 include $(RTE_SDK)/mk/rte.extapp.mk + +else +.PHONY: all clean +all: +$(info "vm_power_manager required libvirt version >=3D 0.9.3, please upd= ate libvirt-devel first") +clean: +endif --=20 1.9.3