Re: Issues with bindings tests
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 13 May 2014 10:11:13 +0100 (BST)
Julian Foad wrote:
> 1. serf.m4 lacks the "SVN_REMOVE_STANDARD_LIB_DIRS" that is present in
More details. The bug shows up when all of these conditions are met:
* there is a development package of Subversion libraries, that we don't
* the 'serf' package that we are building against is installed under that
* 'pkgconfig' is not being used to find the 'serf' package.
The cause is that the detection of 'serf' inserts '/usr/lib' into the library search path(s) and then the installed Subversion development libraries are picked up instead of the Subversion libraries that we are building.
I witnessed two failure modes with an unwanted Subversion 1.8.8 development package and the wanted 'serf' package both installed under /usr. Subversion 1.9-dev failed to link at build time. A Subversion 1.8.9 build completed, and all the tests passed except the JavaHL bindings. The JavaHL test code linked to a 1.8.8 library, and at run time that dynamically loaded a 1.8.9 library, and a version check reported a mismatch. (Another time, the python-ctypes bindings failed in the same way.)
As far as I understand it (which isn't very far) there is no general solution to having some wanted and some unwanted libraries installed in the same place, because the dynamic library search mechanism only has the granularity of a path. But we have a precedent that helps with the common cases: when making additions to LDFLAGS we strip out standard installation paths. In 'serf.m4' we omitted to do this.
The manifestation I observed was also different between the version of libtool' in the tarball and the version on my (Ubuntu 12.04 64-bit) system. On my 1.8.9 tarball test build, re-running 'autogen.sh' so as to switch to using the system-installed libtool changed the behaviour and avoided the problem.
> This fix still needs to be applied to trunk, as far as I can see, although
Confirmed, by temporarily disabling the check for pkgconfig.
By code inspection, I found one other place that needs the same fix: in 'berkeley-db.m4', for the case where you specify --with-berkeley-db="x:y:LIBDIR:z" and LIBDIR is a standard system location such as "/usr/lib".
Committed to trunk in r1594156 and proposed for backport to 1.8.x in r1594157. We might also want it in 1.7.x.
Please let me know if there's any problem with the analysis or the fix.
This is an archived mail posted to the Subversion Dev mailing list.