From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH v4] examples/vm_power_manager: fix libvirt dependency check Date: Mon, 11 Apr 2016 12:32:52 +0200 Message-ID: <1460370772-17663-1-git-send-email-thomas.monjalon@6wind.com> References: <1460369173-30343-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 mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 311C911A2 for ; Mon, 11 Apr 2016 12:32:58 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id n3so98273598wmn.0 for ; Mon, 11 Apr 2016 03:32:58 -0700 (PDT) In-Reply-To: <1460369173-30343-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" From: Marvin Liu vm_power_manager utilize libvirt API virDomainGetVcpuPinInfo to retrieve domU vcpu information. This API is implemented from version 0.9.= 3. Suse11 SP3 32bit default libvirt version is 0.8.8. examples/vm_power_manager/channel_manager.c: channel_manager.c:117:3: error: implicit declaration of function =E2=80=98virDomainGetVcpuPinInfo=E2=80=99 Check and skip it from examples or raise an error when trying to compile without libvirt or with a too old libvirt. Fixes: e8ae9b662 ("examples/vm_power: channel manager and monitor in host= ") Signed-off-by: Marvin Liu Signed-off-by: Thomas Monjalon --- examples/Makefile | 4 ++++ examples/vm_power_manager/Makefile | 6 ++++++ 2 files changed, 10 insertions(+) v4: mix v2 and v3 to skip in examples list but raise an error if trying to compile directly diff --git a/examples/Makefile b/examples/Makefile index a8bc381..fcf1eb7 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -87,6 +87,10 @@ DIRS-$(CONFIG_RTE_LIBRTE_VHOST) +=3D vhost DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) +=3D vhost_xen DIRS-y +=3D vmdq DIRS-y +=3D vmdq_dcb +ifeq ($(shell pkg-config --atleast-version=3D0.9.3 libvirt; echo $$?), 0= ) DIRS-$(CONFIG_RTE_LIBRTE_POWER) +=3D vm_power_manager +else +$(info vm_power_manager requires libvirt >=3D 0.9.3) +endif =20 include $(RTE_SDK)/mk/rte.extsubdir.mk diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manag= er/Makefile index 113dbc4..59a9641 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -29,6 +29,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE US= E # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =20 +ifneq ($(shell pkg-config --atleast-version=3D0.9.3 libvirt; echo $$?), = 0) +$(error vm_power_manager requires libvirt >=3D 0.9.3) +else + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -57,3 +61,5 @@ CFLAGS_main.o +=3D -Wno-return-type endif =20 include $(RTE_SDK)/mk/rte.extapp.mk + +endif # libvirt check --=20 2.7.0