Bug#1122137: apache2 FTCBFS: uses AC_RUN_IFELSE
Helmut Grohne <[email protected]> Sat, 6 Dec 2025 17:57:00 +0100
| Newsgroups | gmane.linux.debian.devel.apache |
|---|---|
| Message-ID | <20251206165700.GA901459__9590.02811448357$1765138537$gmane$org@subdivi.de> |
Source: apache2 Version: 2.4.66-1 Tags: patch upstream User: [email protected] Usertags: ftcbfs Thanks for applying my earlier cross build patches. Now with the new upstream release, there is a new cross build regression. A use of AC_RUN_IFELSE was introduced and that cannot possibly work during a cross build. Fortunately, what is being tested is sizes of data types and AC_CHECK_SIZEOF has been made compatible with cross building in a creative way. (In a native build it indeed runs stuff, but for cross building it uses compilation bisection to discover the size.) Employing that macro, we may perform the same check. I'm attaching a patch for your convenience. Please consider applying the patch and also forwarding it upstream together with the patch that already is being applied. Both patches are beneficial to other distributions such as Yocto or PtxDist. Helmut
cross.patch
(text/x-diff, 790 B)
Index: apache2-2.4.66/acinclude.m4
===================================================================
--- apache2-2.4.66.orig/acinclude.m4
+++ apache2-2.4.66/acinclude.m4
@@ -721,16 +721,9 @@ dnl Checks if the size of a void pointer
dnl integer type.
dnl
AC_DEFUN([APACHE_CHECK_VOID_PTR_LEN], [
-
-AC_CACHE_CHECK([for void pointer length], [ap_cv_void_ptr_lt_long],
-[AC_TRY_RUN([
-int main(void)
-{
- return sizeof(void *) < sizeof(long);
-}], [ap_cv_void_ptr_lt_long=no], [ap_cv_void_ptr_lt_long=yes],
- [ap_cv_void_ptr_lt_long=yes])])
-
-if test "$ap_cv_void_ptr_lt_long" = "yes"; then
+AC_CHECK_SIZEOF([void *])
+AC_CHECK_SIZEOF([long])
+if test "$ac_cv_sizeof_void_p" -lt "$ac_cv_sizeof_long"; then
AC_MSG_ERROR([Size of "void *" is less than size of "long"])
fi
])