On 10/5/05, Max Bowsher <firstname.lastname@example.org> wrote:
> David James wrote:
> > Max, are you using a static or a dynamic build of APR?
> > I'm using a static build of APR.
> Oh dear. There's the problem.
> > Does that mean that C/Python module
> > (libsvn._core, libsvn._wc, etc) has a separate copy of the internal
> > APR datastructures?
> Yes :-(
> > If so, then it might be a good idea for us to
> > separately initialize APR in each module.
> Issues with this:
> - atexit() slots may be a scarce finite resource - no more than 32 are
> - are there any issues with passing objects allocated by pools owned by one
> apr instance to another?
> - does libsvn_swig_py have an additional copy of apr, as well as all the
> - it's worryingly inelegant
> I'm pretty surprised that the link succeeded at all, as I know that libtool
> is designed to outright refuse to link a shared library to a static library.
> Note also that we already require (though we do not enforce) that
> libsvn_swig_py be a shared library, with improper operation being the result
> if it is static (issue 2202). In view of this, I think we can reasonably
> require that apr also be a shared library.
> Perhaps we can create some configury to warn about this issue.
Yes, probably we should create a warning. I have reinstalled APR as a
shared library and everything works fine.
Still, I've found an easy way to get the bindings working with a
static APR. The following patch makes the Subversion bindings with a
static APR, on my system, because it initializes APR from inside the
libsvn_swig_py library as opposed to from within a Python library. (We
used to initialize APR from within libsvn_swig_py, until we changed
this behaviour in r16382. That's why static APR builds always used to
work for me.)
Create svn_swig_py_initialize API function for initializing the libsvn_swig_py
library. This function initializes APR, and sets up atexit(apr_terminate).
Followup to r16382.
Use svn_swig_py_initialize instead of apr_initialize and
David James -- http://www.cs.toronto.edu/~james
Received on Wed Oct 5 20:50:37 2005
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org