bzr-svn cannot be compiled for Subversion 1.5.* without hand-editing setup.py

Bug #263570 reported by Alexey Borzenkov
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Undecided
Jelmer Vernooij

Bug Description

The problem is that Subversion 1.5 does not have libsvn_ra_dav-1.lib anymore: this prevents bzr-svn from compiling out of the box. While it is not difficult to remove libsvn_ra_dav-1 by hand every time (and I'm sure that's how people compile it right now), it is not ideal and would be good if bzr-svn would only try to link to libraries that actually exist. The attached adds a filter to only link against existing subversion libraries on Windows.

Related branches

Revision history for this message
Alexey Borzenkov (snaury) wrote :
Revision history for this message
Alexey Borzenkov (snaury) wrote :

Oh, I withdraw my patch. Just tried this at work and something turned out to be very different, my patch no longer works, at least not with Visual Studio.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Is the bug report still valid?

Revision history for this message
Alexey Borzenkov (snaury) wrote :

Yes, but I have no clue how to fix this properly. :(

The problem is that there are two distributions of Subversion for Windows. Binaries built against Apache 2.0 (with libraries libapr, libapriconv and libaprutil) and binaries built against Apache 2.2 (with libraries libapr-1, libapriconv-1 and libaprutil-1). So my patch was working for Apache 2.0 binaries (which I installed by accident, distribution filenames don't even reflect if binaries are apache 2.0 or 2.2) and then at work (where I had Apache 2.2 binaries) my patch did more harm than good, first not linking to apr at all, and then later failing to copy dlls in install_lib_with_dlls.

This turns out rather complicated. Ideal solution would be sort of autodetect if we are linking against Subversion 1.4/1.5 and Apache 2.0/2.2, but I'm not entirely sure what would be an ideal way to do that. Looking thru header files it doesn't seem we can grep for exact information either. :(

Would you accept a patch that does a fuzzy testing, based on absence of libsvn_ra_dav-1.dll and and presence of -1 in libapr*.dll in ${SVN_DEV}/bin? It's not ideal, but it might work...

Revision history for this message
Alexey Borzenkov (snaury) wrote :

Oops. I was wrong about subversion, we can search svn_version.h for the version number. And apr_version.h for apr, where 0.* appear to be for Apache 2.0 and 1.* appear to be for Apache 2.2. Working on a patch. :)

Revision history for this message
Alexey Borzenkov (snaury) wrote :

Done and here's the patch, formed with bzr send this time.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Was this tested against svn 1.5 and 1.4, and with Visual Studio? Other than that, looks good to me.

Revision history for this message
Alexey Borzenkov (snaury) wrote :

Not yet, I'll only be able to test it with 1.4 and Visual Studio at work in several hours.

Revision history for this message
Alexey Borzenkov (snaury) wrote :

Jelmer, here's an improved patch. I tested this with Visual Studio and Subversion 1.4.6/1.5.2 (1.4.6 only Apache 2.2 ones, because I don't have the others and they are no longer available for download). This patch also adds libraries that became shared in 1.5 to the list of files copied to plugin directory and removes log.info mistakenly added in the previous patch.

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → jelmer
status: New → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.