From: Marvin Liu <yong.liu@intel.com>
To: dev@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dpdk-dev] [PATCH] examples/vm_power_manager: fix build with libvirt version < 0.9.3
Date: Mon, 11 Apr 2016 11:45:57 +0800 [thread overview]
Message-ID: <1460346357-26592-1-git-send-email-yong.liu@intel.com> (raw)
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@intel.com>
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 113dbc4..49a6b9b 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -33,9 +33,19 @@ ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
+LIBVIRT_COMMON = libvirt-common.h
+LIBVIRT_HEADER = libvirt.h
+INCLUDE_PATH = /usr/include/libvirt/
+
+HEADER_FILE = $(shell if [ -f $(INCLUDE_PATH)$(LIBVIRT_COMMON) ]; then echo $(LIBVIRT_COMMON);else echo $(LIBVIRT_HEADER); fi;)
+LIBVIRT_INCLUDE = $(INCLUDE_PATH)$(HEADER_FILE)
+
+LIBVIR_VER = $(shell gawk '/LIBVIR_VERSION_NUMBER .*/{print $$3}' $(LIBVIRT_INCLUDE))
+
# Default target, can be overridden by command line or environment
RTE_TARGET ?= x86_64-native-linuxapp-gcc
+ifeq ($(shell test $(LIBVIR_VER) -ge 00009003 && echo 1), 1)
include $(RTE_SDK)/mk/rte.vars.mk
# binary name
@@ -57,3 +67,10 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+
+else
+.PHONY: all clean
+all:
+$(warning "vm_power_manager required libvirt version >= 0.9.3, please update libvirt-devel first")
+clean:
+endif
--
1.9.3
next reply other threads:[~2016-04-11 3:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 3:45 Marvin Liu [this message]
2016-04-11 7:24 ` Thomas Monjalon
2016-04-11 8:48 ` Liu, Yong
2016-04-11 8:50 ` [dpdk-dev] [PATCH v2] " Marvin Liu
2016-04-11 9:26 ` Thomas Monjalon
2016-04-11 9:32 ` Thomas Monjalon
2016-04-11 9:46 ` Liu, Yong
2016-04-11 10:06 ` [dpdk-dev] [PATCH v3] " Marvin Liu
2016-04-11 10:32 ` [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check Thomas Monjalon
2016-04-11 10:37 ` Bruce Richardson
2016-04-11 10:43 ` [dpdk-dev] [PATCH v5] " Thomas Monjalon
2016-04-11 12:30 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460346357-26592-1-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).