[Pkg-nagios-devel] Bug#876113: check-mk FTCBFS: configure livestatus for the build architecture

Helmut Grohne helmut at subdivi.de
Mon Sep 18 15:36:16 UTC 2017


Source: check-mk
Version: 1.2.8p16-1
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

check-mk fails to cross build from source, because it configure
livestatus for the build architecture. I think it is very sad that the
build system hides the configure invocation, configure output, make
invocation and make output from the build log. This has made debugging
much more time consuming than it needed to be. Enough said: After
passing the missing flags and removing the duplicate and broken strip
invocation, it cross builds. Please consider applying the attached
patch.

Helmut
-------------- next part --------------
diff -u check-mk-1.2.8p16/debian/changelog check-mk-1.2.8p16/debian/changelog
--- check-mk-1.2.8p16/debian/changelog
+++ check-mk-1.2.8p16/debian/changelog
@@ -1,3 +1,12 @@
+check-mk (1.2.8p16-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Pass --build and --host to configure.
+    + Do not strip, defer to dh_strip.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Mon, 18 Sep 2017 09:11:47 +0200
+
 check-mk (1.2.8p16-1) unstable; urgency=medium
 
   * new upstream release
diff -u check-mk-1.2.8p16/debian/rules check-mk-1.2.8p16/debian/rules
--- check-mk-1.2.8p16/debian/rules
+++ check-mk-1.2.8p16/debian/rules
@@ -9,8 +9,10 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-
-
+include /usr/share/dpkg/architecture.mk
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+export EXTRA_CONFIGURE_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
 
 
 configure: configure-stamp
only in patch2:
unchanged:
--- check-mk-1.2.8p16.orig/debian/patches/03_cross.patch
+++ check-mk-1.2.8p16/debian/patches/03_cross.patch
@@ -0,0 +1,21 @@
+Index: check-mk-1.2.8p16/setup.sh
+===================================================================
+--- check-mk-1.2.8p16.orig/setup.sh
++++ check-mk-1.2.8p16/setup.sh
+@@ -576,7 +576,7 @@
+            CONFIGURE_OPTS="--with-nagios4"
+         fi
+    fi
+-   ./configure --libdir=$libdir --bindir=$bindir $CONFIGURE_OPTS &&
++   ./configure --libdir=$libdir --bindir=$bindir $CONFIGURE_OPTS ${EXTRA_CONFIGURE_OPTS:-} &&
+    make clean &&
+    cat <<EOF > src/livestatus.h &&
+ #ifndef livestatus_h
+@@ -585,7 +585,6 @@
+ #endif // livestatus_h
+ EOF
+    make -j 8  2>&1 &&
+-   strip src/livestatus.o &&
+    mkdir -p $DESTDIR$libdir &&
+    install -m 755 src/livestatus.o $DESTDIR$libdir &&
+    mkdir -p $DESTDIR$bindir &&
only in patch2:
unchanged:
--- check-mk-1.2.8p16.orig/debian/patches/series
+++ check-mk-1.2.8p16/debian/patches/series
@@ -0,0 +1 @@
+03_cross.patch


More information about the Pkg-nagios-devel mailing list