You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2014/05/13 11:03:50 UTC

svn commit: r1594156 - in /subversion/trunk/build/ac-macros: berkeley-db.m4 serf.m4

Author: julianfoad
Date: Tue May 13 09:03:50 2014
New Revision: 1594156

URL: http://svn.apache.org/r1594156
Log:
Fix a problem with the Unix build that could result in linking to the wrong
Subversion libraries at build time or at run time.

The bug shows up when all of these conditions are met:

  * there is a development package of Subversion libraries, that we don't
    want to use, installed somewhere (such as /usr);

  * the 'serf' package that we are building against is installed under that
    same prefix (such as /usr);

  * 'pkgconfig' is not being used to find the 'serf' package.

See the email thread "Issues with bindings tests" started by Julian Foad on
2014-05-12, at e.g. <http://svn.haxx.se/dev/archive-2014-05/0066.shtml>.

Thanks to Philip for help in tracking down the cause.

* build/ac-macros/serf.m4
  (SVN_SERF_PREFIX_CONFIG): Remove standard paths from LDFLAGS additions,
    like we already do for other packages.

* build/ac-macros/berkeley-db.m4
  (SVN_LIB_BERKELEY_DB): Same.

Modified:
    subversion/trunk/build/ac-macros/berkeley-db.m4
    subversion/trunk/build/ac-macros/serf.m4

Modified: subversion/trunk/build/ac-macros/berkeley-db.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/berkeley-db.m4?rev=1594156&r1=1594155&r2=1594156&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/berkeley-db.m4 (original)
+++ subversion/trunk/build/ac-macros/berkeley-db.m4 Tue May 13 09:03:50 2014
@@ -89,7 +89,7 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB,
         done
         SVN_DB_INCLUDES="${SVN_DB_INCLUDES## }"
         for l in [`echo "$withval" | $SED -e "s/.*:[^:]*:\([^:]*\):.*/\1/"`]; do
-          LDFLAGS="$LDFLAGS -L$l"
+          LDFLAGS="$LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS(-L$l)`"
         done
         SVN_DB_LIBS=""
         for l in [`echo "$withval" | $SED -e "s/.*:\([^:]*\)/\1/"`]; do

Modified: subversion/trunk/build/ac-macros/serf.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/serf.m4?rev=1594156&r1=1594155&r2=1594156&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/serf.m4 (original)
+++ subversion/trunk/build/ac-macros/serf.m4 Tue May 13 09:03:50 2014
@@ -105,7 +105,7 @@ AC_DEFUN(SVN_SERF_PREFIX_CONFIG,
     CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES -I$serf_prefix/include/$serf_major"
     AC_CHECK_HEADERS(serf.h,[
       save_ldflags="$LDFLAGS"
-      LDFLAGS="$LDFLAGS -L$serf_prefix/lib"
+      LDFLAGS="$LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS(-L$serf_prefix/lib)`"
       AC_CHECK_LIB($serf_major, serf_context_create,[
         AC_TRY_COMPILE([
 #include <stdlib.h>
@@ -128,7 +128,7 @@ AC_DEFUN(SVN_SERF_PREFIX_CONFIG,
       SVN_SERF_LIBS="$serf_prefix/lib/lib$serf_major.la"
     else
       SVN_SERF_LIBS="-l$serf_major"
-      LDFLAGS="$LDFLAGS -L$serf_prefix/lib"
+      LDFLAGS="$LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS(-L$serf_prefix/lib)`"
     fi
   fi
 ])