The configure option "--with-berkeley-db" is broken in Subversion 1.6.3
for linux distributions CentOS 4.7 and Ubuntu 8.04 LTS (and, I suspect,
most/all of the rest ;). On investigation, this appears to be caused
because APR-util 1.3.5 introduced DSO handling of the db, gdbm and ndbm
drivers unless "--disable-util-dso" is configured. As a result, although
apr-util/configure has no problem finding BerkeleyDB (at least in the
Berkeley DB distribution default locations), the '$apu_config --libs'
trick in configure to "Extract only the -ldb.* flag from the libs
supplied by $apu-config" no longer works because the '--libs' option to
apu-1-config does not report "LDADD_dbm_db" (or any of the LDDADD_s
AFAIK ;).
A "possible" quick (and dirty ;) "fix" for this "problem" is to add the
"--disable-util-dso" option to configure and apr-util will statically
link the BerkeleyDB drivers (just like it did for apr-util versions
prior apr-util to 1.3.5/subversion 1.6.2) AND THEN 'apu-1-config --libs'
will once again report the BerkeleyDB flag that apr-util/config found
(if any ;). I've tested this "fix" on both of the cited versions of
CentOS and Ubuntu and it "appears" to be OK.
For those who are wondering "Why didn't he just supply the PATH in the
'--with-berkeley-db=PATH' option??" Well -- there is another problem. ;)
Although it is clearly documented that configure option
"--with-berkeley-db=PATH" requires a PATH of the form
[HEADER:INCLUDES:LIB_SEARCH_DIRS:LIBS], I wasn't aware (until now) that
apr-util/configure EITHER looks for the Berkeley DB header and library
in 'PATH/include' and 'PATH/lib' OR, if PATH is of the form
'HEADER:LIB', then it searches for header files in
HEADER, and the library in LIB. Consequently, when the configure PATH is
passed to apr-util/configure, apr-util/configure looks for header files
in "HEADER" (e.g. db.h) and the library in "LIBS" (e.g. db-4.7).
While I certainly don't a sufficient grasp of either subversion or
apr-utils (or sufficient mojo ;) to suggest any change, I have
"hand-patched" (for my own amusement ;) apr-util/configure to accept
either form of "colon" PATH -- note: ONLY for "case "$requested"
default)" and only for BerkeleyDB 4.7. I have tested this change on both
of the cited versions of CentOS and Ubuntu and it appears to be OK. Even
though I'm sure that any astute change to apr-util/configure would
likely be done in macro 'APU_CHECK_DB', an abbreviated version of my
hand patch follows for those who might be interested.
--- apr-util/configure
+++ apr-util/configure.fix
@@ -30861,6 +30861,13 @@
"std" )
description="the standard places"
;;
+ *":"*":"*":"* )
+ header=\ # <-- split to avoid wrap
"`echo $bdb_place | sed -e 's/.*:\([^:]*\):[^:]*:.*/\1/'`"
+ lib="`echo $bdb_place | sed -e 's/.*:[^:]*:\([^:]*\):.*/\1/'`"
+ CPPFLAGS="$CPPFLAGS -I$header"
+ LDFLAGS="$LDFLAGS -L$lib"
+ description="$header and $lib"
+ ;;
*":"* )
header="`echo $bdb_place | sed -e 's/:.*$//'`"
lib="`echo $bdb_place | sed -e 's/^.*://'`"
@@ -31345,6 +31352,56 @@
apu_db_lib=$bdb_libname
apu_have_db=1
;;
+ *":"*":"*":"*)
+ header="`echo $found | sed -e 's/.*:\([^:]*\):[^:]*:.*/\1/'`"
+ lib="`echo $found | sed -e 's/.*:[^:]*:\([^:]*\):.*/\1/'`"
+
+
+ if test "x$APRUTIL_INCLUDES" = "x"; then
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .[omitted code matches case *":"*) which follows] . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ apu_db_header=$bdb_header
+ apu_db_lib=$bdb_libname
+ apu_have_db=1
+ ;;
*":"*)
header="`echo $found | sed -e 's/:.*$//'`"
lib="`echo $found | sed -e 's/^.*://'`"
--
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2369454
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-09 19:12:55 CEST