Source: apr Version: 1.7.2-3 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
apr fails to cross build from source for most architectures: | checking for robust cross-process mutex support... configure: error: in `/<<PKGBUILDDIR>>/debian/build': | configure: error: cannot run test program while cross compiling Usually, I'd consider this an aspect of the builder, but apr is unique here in that its debian/rules has its own ideas of what that check should return even natively. I therefore propose updating debian/rules to also supply the value for cross builds. Do you agree? I'm attaching a patch for your convenience. Helmut
diff --minimal -Nru apr-1.7.2/debian/changelog apr-1.7.2/debian/changelog --- apr-1.7.2/debian/changelog 2023-02-26 21:51:24.000000000 +0100 +++ apr-1.7.2/debian/changelog 2023-08-28 13:07:59.000000000 +0200 @@ -1,3 +1,10 @@ +apr (1.7.2-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Supply result for cross-process mutex. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Mon, 28 Aug 2023 13:07:59 +0200 + apr (1.7.2-3) unstable; urgency=medium * Add more fixes for atomics from upstream, in particular for diff --minimal -Nru apr-1.7.2/debian/rules apr-1.7.2/debian/rules --- apr-1.7.2/debian/rules 2023-02-02 22:18:42.000000000 +0100 +++ apr-1.7.2/debian/rules 2023-08-28 13:07:55.000000000 +0200 @@ -36,14 +36,13 @@ ac_cv_prog_AWK=mawk # apr_cv_mutex_robust_shared causes hangs in procmutex test on arm(el|hf) and alpha -ifneq (,$(findstring armel,$(DEB_HOST_ARCH))) - CONFFLAGS += apr_cv_mutex_robust_shared=no -endif -ifneq (,$(findstring armhf,$(DEB_HOST_ARCH))) +ifneq (,$(filter $(DEB_HOST_ARCH),alpha armel armhf)) CONFFLAGS += apr_cv_mutex_robust_shared=no +else +# apr_cv_mutex_robust_shared cannot be detected during cross compilation +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + CONFFLAGS += apr_cv_mutex_robust_shared=yes endif -ifneq (,$(findstring alpha,$(DEB_HOST_ARCH))) - CONFFLAGS += apr_cv_mutex_robust_shared=no endif # SH4 cannot use proc_pthread.