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

svn 1.4.4 --version/--help gives error without dav

From: Karl Berry <karl_at_freefriends.org>
Date: 2007-07-30 01:06:04 CEST

When I built subversion 1.4.4 --without-neon, I get a working svn
binary, except that svn --version and --help report:

svn: 'libsvn_ra_dav-1.so.0' does not define 'svn_ra_dav__init()': Error string not specified yet

and exit without actually printing any information. As near as I could
tell, nothing else was broken.

The whole build command was: configure \
  --without-berkeley-db \
  --without-apxs \
  --without-neon \
  LDFLAGS="-Wl,-R -Wl,/usr/local/gnu/lib" \
  CFLAGS=-g \
&& make

but I believe it's only the --without-neon that matters here.

Running gdb, I found that in subversion/svn/help-cmd.c, the svn_cl__help
function was returning prematurely, due to the SVN_ERR wrapper around
svn_ra_print_modules. Removing that SVN_ERR at least allowed --version
and --help to complete normally, although the ra list is not yet
actually printed:

*** /usr/local/src/subversion-1.4.4/subversion/svn/ORIG/help-cmd.c Mon Jul 10 20:57:27 2006
--- /usr/local/src/subversion-1.4.4/subversion/svn/help-cmd.c Mon Jul 30 00:42:24 2007
***************
*** 73,77 ****
  
    version_footer = svn_stringbuf_create(ra_desc_start, pool);
! SVN_ERR(svn_ra_print_modules(version_footer, pool));
  
    return svn_opt_print_help2(os,
--- 73,77 ----
  
    version_footer = svn_stringbuf_create(ra_desc_start, pool);
! svn_ra_print_modules(version_footer, pool);
  
    return svn_opt_print_help2(os,

To get the ra information displayed again, gdb showed me
svn_ra_print_modules in ra_loader.c. Similarly, load_ra_module fails
for dav, and so again the SVN_ERR wrapper makes the fn return
prematurely. And again, taking the SVN_ERR out then lets the ra modules
which actually exist to be reported.

*** /usr/local/src/subversion-1.4.4/subversion/libsvn_ra/ORIG/ra_loader.c Mon Jul 30 00:57:22 2007
--- /usr/local/src/subversion-1.4.4/subversion/libsvn_ra/ra_loader.c Mon Jul 30 00:57:38 2007
***************
*** 688,693 ****
        initfunc = defn->initfunc;
        if (! initfunc)
! SVN_ERR(load_ra_module(&initfunc, NULL, defn->ra_name,
! iterpool));
  
        if (initfunc)
--- 688,693 ----
        initfunc = defn->initfunc;
        if (! initfunc)
! load_ra_module(&initfunc, NULL, defn->ra_name,
! iterpool);
  
        if (initfunc)

Perhaps it would be cleaner for the ra_libraries array in ra_loader.c to
be initialized to only include those ra's actually configured, but that
change was beyond me.

Hope this helps somehow. Thanks for subversion.

karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 30 01:04:51 2007

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.