[Debian-ha-maintainers] Bug#865048: pacemaker FTCBFS: uses the build architecture pkg-config
Helmut Grohne
helmut at subdivi.de
Sun Jun 18 20:33:47 UTC 2017
Source: pacemaker
Version: 1.1.16-1
Severity: wishlist
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap
pacemaker fails to cross build from source, because it uses the build
architecture pkg-config by searching for it with AC_PATH_PROG rather
than AC_PATH_TOOL or even better PKG_PROG_PKG_CONFIG. The latter two
macros do consider $ac_tool_prefix which is required for cross building.
After applying the attached patch, pacemaker still fails to cross build
due to its use of help2man. There is no obvious solution for that
problem, but I think the attached patch is still useful, as it makes the
help2man problem visible and moves pacemaker's configure.ac to a more
correct one. Please consider applying it.
Helmut
-------------- next part --------------
diff --minimal -Nru pacemaker-1.1.16/debian/changelog pacemaker-1.1.16/debian/changelog
--- pacemaker-1.1.16/debian/changelog 2016-12-01 14:15:23.000000000 +0100
+++ pacemaker-1.1.16/debian/changelog 2017-06-18 22:26:55.000000000 +0200
@@ -1,3 +1,10 @@
+pacemaker (1.1.16-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * cross.patch: Consider $ac_tool_prefix for pkg-config. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Sun, 18 Jun 2017 22:26:55 +0200
+
pacemaker (1.1.16-1) unstable; urgency=medium
* [d90daf5] Refresh our patches
diff --minimal -Nru pacemaker-1.1.16/debian/patches/cross.patch pacemaker-1.1.16/debian/patches/cross.patch
--- pacemaker-1.1.16/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ pacemaker-1.1.16/debian/patches/cross.patch 2017-06-18 22:26:52.000000000 +0200
@@ -0,0 +1,91 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Subject: consider $ac_tool_prefix for pkg-config
+
+Index: pacemaker-1.1.16/configure.ac
+===================================================================
+--- pacemaker-1.1.16.orig/configure.ac
++++ pacemaker-1.1.16/configure.ac
+@@ -561,7 +561,7 @@
+ AC_PATH_PROGS(TAR, tar)
+ AC_PATH_PROGS(MD5, md5)
+ AC_PATH_PROGS(TEST, test)
+-AC_PATH_PROGS(PKGCONFIG, pkg-config)
++PKG_PROG_PKG_CONFIG
+ AC_PATH_PROGS(XML2CONFIG, xml2-config)
+ AC_PATH_PROGS(VALGRIND_BIN, valgrind, /usr/bin/valgrind)
+ AC_DEFINE_UNQUOTED(VALGRIND_BIN, "$VALGRIND_BIN", Valgrind command)
+@@ -707,20 +707,20 @@
+ AC_MSG_ERROR(You do not have the libuuid development package installed)
+ fi
+
+-if test x"${PKGCONFIG}" = x""; then
++if test x"${PKG_CONFIG}" = x""; then
+ AC_MSG_ERROR(You need pkgconfig installed in order to build ${PACKAGE})
+ fi
+
+ if
+- $PKGCONFIG --exists glib-2.0
++ $PKG_CONFIG --exists glib-2.0
+ then
+- GLIBCONFIG="$PKGCONFIG glib-2.0"
++ GLIBCONFIG="$PKG_CONFIG glib-2.0"
+ else
+ set -x
+ echo PKG_CONFIG_PATH=$PKG_CONFIG_PATH
+- $PKGCONFIG --exists glib-2.0; echo $?
+- $PKGCONFIG --cflags glib-2.0; echo $?
+- $PKGCONFIG glib-2.0; echo $?
++ $PKG_CONFIG --exists glib-2.0; echo $?
++ $PKG_CONFIG --cflags glib-2.0; echo $?
++ $PKG_CONFIG glib-2.0; echo $?
+ set +x
+
+ AC_MSG_ERROR(You need glib2-devel installed in order to build ${PACKAGE})
+@@ -937,14 +937,14 @@
+ AC_CHECK_LIB(ncurses, printw,
+ [AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)]
+ )
+- CURSESLIBS=`$PKGCONFIG --libs ncurses` || CURSESLIBS='-lncurses'
++ CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
+ fi
+
+ if test "$ac_cv_header_ncurses_ncurses_h" = "yes"; then
+ AC_CHECK_LIB(ncurses, printw,
+ [AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)]
+ )
+- CURSESLIBS=`$PKGCONFIG --libs ncurses` || CURSESLIBS='-lncurses'
++ CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
+ fi
+
+ dnl Only look for non-n-library if there was no n-library.
+@@ -1216,10 +1216,10 @@
+ AM_CONDITIONAL(BUILD_DBUS, test $HAVE_dbus = 1)
+
+ if test $HAVE_dbus = 1; then
+- CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1`"
++ CFLAGS="$CFLAGS `$PKG_CONFIG --cflags dbus-1`"
+ fi
+
+-DBUS_LIBS="$CFLAGS `$PKGCONFIG --libs dbus-1`"
++DBUS_LIBS="$CFLAGS `$PKG_CONFIG --libs dbus-1`"
+ AC_SUBST(DBUS_LIBS)
+
+ AC_CHECK_TYPES([DBusBasicValue],,,[[#include <dbus/dbus.h>]])
+@@ -1751,7 +1751,7 @@
+ SERVICELOG_EXISTS="no"
+ AC_MSG_CHECKING(for $SERVICELOG packages)
+ if
+- $PKGCONFIG --exists $SERVICELOG
++ $PKG_CONFIG --exists $SERVICELOG
+ then
+ PKG_CHECK_MODULES([SERVICELOG], [servicelog-1])
+ SERVICELOG_EXISTS="yes"
+@@ -1764,7 +1764,7 @@
+ OPENIPMI_SERVICELOG_EXISTS="no"
+ AC_MSG_CHECKING(for $SERVICELOG $OPENIPMI packages)
+ if
+- $PKGCONFIG --exists $OPENIPMI $SERVICELOG
++ $PKG_CONFIG --exists $OPENIPMI $SERVICELOG
+ then
+ PKG_CHECK_MODULES([OPENIPMI_SERVICELOG],[OpenIPMI OpenIPMIposix])
+ OPENIPMI_SERVICELOG_EXISTS="yes"
diff --minimal -Nru pacemaker-1.1.16/debian/patches/series pacemaker-1.1.16/debian/patches/series
--- pacemaker-1.1.16/debian/patches/series 2016-12-01 14:14:42.000000000 +0100
+++ pacemaker-1.1.16/debian/patches/series 2017-06-18 22:24:54.000000000 +0200
@@ -9,3 +9,4 @@
Enable-the-subdir-objects-Automake-option.patch
crm_perror-appends-a-colon-to-its-fmt-argument.patch
Don-t-report-error-if-the-output-file-isn-t-syncable.patch
+cross.patch
More information about the Debian-ha-maintainers
mailing list