When --enable-sqlite-compatibility-version is used, the configure script ends up defining CFLAGS such that it contains
-DSVN_SQLITE_MIN_VERSION='"X.Y.Z"'
This string then makes it into the generated
subversion/bindings/swig/perl/native/Makefile.PL as
my $cflags = '… -DSVN_SQLITE_MIN_VERSION='"X.Y.Z"' …';
which causes the perl script to have invalid syntax:
cd ./subversion/bindings/swig/perl/native; \
/usr/bin/perl Makefile.PL INSTALLDIRS=vendor; \
sed -i -e '/^LD_RUN_PATH/s/^/#/' Makefile Makefile.[a-z]*
String found where operator expected at Makefile.PL line 55, near
"'-DSVN_SQLITE_MIN_VERSION_NUMBER=3007012 -DSVN_SQLITE_MIN_VERSION='"3.7.12""
(Missing operator before "3.7.12"?)
String found where operator expected at Makefile.PL line 55, near
""3.7.12"' -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -pthread'"
(Missing operator before ' -g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread'?)
syntax error at Makefile.PL line 55, near
"'-DSVN_SQLITE_MIN_VERSION_NUMBER=3007012 -DSVN_SQLITE_MIN_VERSION='"3.7.12""
Execution of Makefile.PL aborted due to compilation errors.
The attached patch fixes the issue for me.
Cheers,
--
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>
Index: subversion/bindings/swig/perl/native/Makefile.PL.in
===================================================================
--- subversion/bindings/swig/perl/native/Makefile.PL.in (revision 1559006)
+++ subversion/bindings/swig/perl/native/Makefile.PL.in (working copy)
@@ -45,10 +45,17 @@
my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
-my $cppflags = '@CPPFLAGS@';
-my $cflags = '@CFLAGS@';
+my $cppflags = <<'EOT';
+@CPPFLAGS@
+EOT
+my $cflags = <<'EOT';
+@CFLAGS@
+EOT
my $includes = '@SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@';
+chomp($cppflags);
+chomp($cflags);
+
# Avoid this bug in SWIG:
# https://sourceforge.net/tracker/?func=detail&aid=3571361&group_id=1645&atid=101645
# SWIG is using C++ style comments in an extern "C" code.
signature.asc
Description: Digital signature

