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

Re: ra_load and wrong loads

From: Justin Erenkrantz <jerenkrantz_at_apache.org>
Date: 2002-07-31 20:25:21 CEST

On Wed, Jul 31, 2002 at 08:11:12PM +0200, Arkadiusz Miskiewicz wrote:
> On my systems these are dlopen()ed modules:
> [misiek@arm misiek]$ ldd /usr/bin/svn | grep ra
> libsvn_ra-1.so.0 => /usr/lib/libsvn_ra-1.so.0 (0x00156000)
> Compile with --enable-dso and you will see the problem.

The code in load_ra_module is completely bogus.

    /* ### fix the .so part */
    libname = apr_psprintf (pool, "libsvn_ra_%s.so", ra_name);
    funcname = apr_psprintf (pool, "svn_ra_%s_init", ra_name);

.so isn't guaranteed. Darwin uses .dylib. There are many other
variants, too.

If you really want to make this work with .so, you would have to
link the ra_* libraries with the "-module" flag and override
the default name to be libsvn_ra_*.so.

This is the strategy that httpd-2.0 uses for its DSO modules. You
would also place them in a separate directory than lib/ (ie

Since the ra_loader code only looks for specific modules anyway,
I'm not sure what the rationale is for having them dynamically
loaded. There isn't a way to register your provider with the
ra functions without a recompile anyway.

So, I'd rather see all of this code thrown out. -- justin

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 31 20:26:30 2002

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.