From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 11 Apr 2016 01:50:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,462,1455004800"; d="scan'208";a="956039859" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 11 Apr 2016 01:50:38 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u3B8oZoS024254; Mon, 11 Apr 2016 16:50:35 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u3B8oX9X028417; Mon, 11 Apr 2016 16:50:35 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u3B8oX74028413; Mon, 11 Apr 2016 16:50:33 +0800 From: Marvin Liu To: dev@dpdk.org Cc: Marvin Liu Date: Mon, 11 Apr 2016 16:50:31 +0800 Message-Id: <1460364631-28381-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1460346357-26592-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: 8bit Subject: [dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 08:50:39 -0000 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