[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: apr-1.7.0 breaks subversion build

From: Branko ─îibej <brane_at_apache.org>
Date: Wed, 10 Apr 2019 00:07:23 +0200

[moved from users@]

On 09.04.2019 18:07, Stefan Sperling wrote:
> On Tue, Apr 09, 2019 at 05:52:30PM +0200, Stefan Sperling wrote:
>> You are right, this looks like a problem in Subversion's configure script.
>> It assumes that APR uses "d", "ld" or "lld" for this format string which
>> is now a wrong assumption.
> Pierre, could you please try this patch against Subversion and let
> me know if it helps?
>
> Index: build/ac-macros/swig.m4
> ===================================================================
> --- build/ac-macros/swig.m4 (revision 1857217)
> +++ build/ac-macros/swig.m4 (working copy)
> @@ -132,6 +132,10 @@ AC_DEFUN(SVN_FIND_SWIG,
> dnl Sun Forte adds an extra space before substituting APR_INT64_T_FMT
> dnl gcc-2.95 adds an extra space after substituting APR_INT64_T_FMT
> dnl thus the egrep patterns have a + in them.
> + dnl
> + dnl APR >= 1.7.0 uses PRId64 from inttypes.h on many platforms, so if
> + dnl we fail to match APR_INT64_T_FMT to a known format string, try to
> + dnl deduce the format string from inttypes.h instead of apr.h.
> SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS"
> CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES"
> AC_CACHE_CHECK([for apr_int64_t Python/C API format string],
> @@ -154,6 +158,24 @@ AC_DEFUN(SVN_FIND_SWIG,
> MaTcHtHiS APR_INT64_T_FMT EnDeNd],
> [svn_cv_pycfmt_apr_int64_t="i"])
> fi
> + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
> + AC_EGREP_CPP([MaTcHtHiS +\"lld\" +EnDeNd],
> + [#include <inttypes.h>
> + MaTcHtHiS PRId64 EnDeNd],
> + [svn_cv_pycfmt_apr_int64_t="L"])
> + fi
> + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
> + AC_EGREP_CPP([MaTcHtHiS +\"ld\" +EnDeNd],r
> + [#include <inttypes.h>
> + MaTcHtHiS PRId64 EnDeNd],
> + [svn_cv_pycfmt_apr_int64_t="l"])
> + fi
> + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
> + AC_EGREP_CPP([MaTcHtHiS +\"d\" +EnDeNd],
> + [#include <inttypes.h>
> + MaTcHtHiS PRId64 EnDeNd],
> + [svn_cv_pycfmt_apr_int64_t="i"])
> + fi
> ])
> CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS"
> if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then

This is nonsense. We should replace the single use of
SVN_APR_INT64_T_PYCFMT in swigutil_py.c with "L" and cast to
PY_LONG_LONG and be done with it. Such checks will always have failing
edge cases, so let's just get rid of them.

-- Brane
Received on 2019-04-10 00:07:26 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.