Bug#1116005: xmlrpc-c FTCBFS: Hardcodes pkg-config in its build
Source: xmlrpc-c
Version: 1.59.03-10.1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
X-Debbugs-Cc: debian-cross@lists.debian.org, tchet@debian.org
Dear Maintainer,
xmlrpc-c seems to directly run the configure script, and the same
seems to hard-code pkg-config.
Next, it also hard-codes it in config.mk.in and lastly, I see hard
coding in lib/openssl/Makefile though it seems to be unused, but
it is good to fix it anyway.
It should use the value of arch prefixed PKG_CONFIG variable which is setup
by the cross toolchain instead, which also needs to be passed via d/rules.
I've attached a patch that fixes this. Please consider applying.
Thanks
Nilesh
From 7a8040a282e09ba8c3f71c4d4f31ba5eacbc5f5b Mon Sep 17 00:00:00 2001
From: Nilesh Patra <nilesh@debian.org>
Date: Tue, 23 Sep 2025 03:21:53 +0530
Subject: [PATCH] cross
---
debian/patches/cross.patch | 53 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 3 ++-
3 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 debian/patches/cross.patch
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..9c24e61
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,53 @@
+--- a/configure
++++ b/configure
+@@ -641,6 +641,7 @@
+ LIBWWW_LIBDIR
+ LIBWWW_LDADD
+ LIBWWW_CONFIG
++PKG_CONFIG
+ WININET_LIBDIR
+ WININET_LDADD
+ WININET_CFLAGS
+@@ -5988,11 +5989,13 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL library" >&5
+ $as_echo_n "checking for OpenSSL library... " >&6; }
+
+-if pkg-config openssl; then
++: "${PKG_CONFIG:=pkg-config}"
++
++if $PKG_CONFIG openssl; then
+ HAVE_OPENSSL=yes
+- OPENSSL_LDADD=$(pkg-config openssl --libs)
++ OPENSSL_LDADD=`$PKG_CONFIG openssl --libs`
+
+- OPENSSL_CFLAGS=$(pkg-config openssl --cflags)
++ OPENSSL_CFLAGS=`$PKG_CONFIG openssl --cflags`
+
+ else
+ HAVE_OPENSSL=no
+--- a/config.mk.in
++++ b/config.mk.in
+@@ -52,7 +52,7 @@
+ CCLD = $(CC)
+ CXXLD = $(CXX)
+ AR = @AR@
+-PKG_CONFIG = pkg-config
++PKG_CONFIG = @PKG_CONFIG@
+ RANLIB = @RANLIB@
+ LN_S = ln -s
+ INSTALL = $(SRCDIR)/install-sh
+--- a/lib/openssl/Makefile
++++ b/lib/openssl/Makefile
+@@ -24,9 +24,10 @@
+ PKGCONFIG_FILES_TO_INSTALL := xmlrpc_openssl.pc
+
+ MAJ := 1
++PKG_CONFIG ?= pkg-config
+
+-OPENSSL_INCLUDES := $(shell pkg-config openssl --cflags)
+-OPENSSL_LIBS := $(shell pkg-config openssl --libs)
++OPENSSL_INCLUDES := $(shell $(PKG_CONFIG) openssl --cflags)
++OPENSSL_LIBS := $(shell $(PKG_CONFIG) openssl --libs)
+
+ include $(SRCDIR)/common.mk
+
diff --git a/debian/patches/series b/debian/patches/series
index 1b6b07f..646ca88 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ reproducible_build.patch
001-fix-pkg-config-files.patch
xmlrpc-c-1.59.03-use-system-expat.patch
fix-gcc15-build.patch
+cross.patch
diff --git a/debian/rules b/debian/rules
index 7e5f4dc..0966d45 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,8 @@ override_dh_auto_configure:
rm -fv tools/turbocharger/mod_gzip.c
dh_auto_configure -- \
--disable-libwww-client \
- --disable-wininet-client
+ --disable-wininet-client \
+ PKG_CONFIG=$(PKG_CONFIG)
override_dh_auto_build:
dh_auto_build -- 'CC_FOR_BUILD=$(CC_FOR_BUILD)'
--
2.50.1
Reply to: