Skip to contentSkip to conversation

systemtap: disable libvirt

PATCH New [email protected] 1 participant 2 messages Sep 23, 2014

lore
Share & tools
lore
#0 lore raw

cover systemtap: disable libvirt

From: Wenzong Fan <[email protected]>

libvirt is automatically linked to if present, this undetermined dependency may cause build errors like:

../lib/libvirt.so: undefined reference to libssh2_channel_open_ex' ../lib/libvirt.so: undefined reference to libssh2_session_hostkey'
...

Both libvirt and libssh2 are not oe-core recipes for now, just disable libvirt to fix this issue.

The following changes since commit afdbe3112b940987f3f3cddcb32c91a5e17a297d:

bitbake: bitbake-worker: Fix bitbake -n (2014-09-22 15:54:40 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/systemtap
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/systemtap

Wenzong Fan (1):
systemtap: disable libvirt

 .../configure-allow-to-disable-libvirt.patch       |   39 ++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.bb     |    3 ++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |    1 +
 3 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 systemtap: disable libvirt

From: Wenzong Fan <[email protected]>

libvirt is automatically linked to if present, this undetermined dependency may cause build errors like:

../lib/libvirt.so: undefined reference to libssh2_channel_open_ex' ../lib/libvirt.so: undefined reference to libssh2_session_hostkey'
...

Both libvirt and libssh2 are not oe-core recipes for now, just disable libvirt to fix this issue.

---
 .../configure-allow-to-disable-libvirt.patch       |   39 ++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.bb     |    3 ++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |    1 +
 3 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch
meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch new file +39 -0
new file mode 100644
index 0000000..b4f2fbc
@@ -0,0 +1,39 @@
+From 5eb10d90af9178edb65e6091ae939d1b5b19bb78 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <[email protected]>
+Date: Tue, 23 Sep 2014 04:47:10 -0400
+Subject: [PATCH] systemtap: allow to disable libvirt
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <[email protected]>
+---
+ configure.ac |   13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a631ae7..cb4885b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -525,10 +525,15 @@ dnl Check for the libvirt and libxml2 devel packages
+ 
+ dnl We require libvirt >= 1.0.2 because stapvirt relies on the
+ dnl virDomainOpenChannel function, which was implemented in 1.0.2.
+-PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
+-   have_libvirt=yes
+-   AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
+-   ], [have_libvirt=no])
++AC_ARG_ENABLE([libvirt],
++  AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present]))
++
++if test "$enable_libvirt" != no; then
++  PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
++     have_libvirt=yes
++     AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
++     ], [have_libvirt=no])
++fi
+ AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"])
+ PKG_CHECK_MODULES([libxml2], [libxml-2.0], [
+    have_libxml2=yes
+-- 
+1.7.9.5
+
meta/recipes-kernel/systemtap/systemtap_git.bb +3 -0
index 488d417..d0dd42a 100644
@@ -20,6 +20,9 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
 
 EXTRA_OECONF += "${STAP_DOCS} "
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
+
 inherit autotools gettext pkgconfig
 
 BBCLASSEXTEND = "native nativesdk"
meta/recipes-kernel/systemtap/systemtap_git.inc +1 -0
index 33aa136..f81e8ba 100644
@@ -8,6 +8,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
            file://obsolete_automake_macros.patch \
            file://system_map_location.patch \
            file://tapset-linux-sendfile-syscall.patch \
+           file://configure-allow-to-disable-libvirt.patch \
           "
 
 # systemtap doesn't support mips
Signature · 1 line
1.7.9.5