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

Re: Linker issues building subversion on Windows

From: D.J. Heap <djheap_at_gmail.com>
Date: Thu, 3 Sep 2009 18:56:41 -0600

On Thu, Sep 3, 2009 at 12:20 PM, Robert Dailey<rcdailey_at_gmail.com> wrote:
> I'm using  gen-make.py in the subversion root source directory to generate
> msvc9 project files, and then I use that to build subversion. I pass paths
> to all of the apr, sqlite, openssl, and other needed libraries to the
> gen-make.py script as command line arguments. I have opened the apr-util
> library in a hex editor and searched for the symbol names and I was able to
> find them in there. I also am aware that the aprutil.mak file (which I used
> to build aprutil) indeed does specify APU_DECLARE_STATIC, so I know for a
> fact that APR and APRUTIL are being built as static libraries. However, I'm
> building using the default 'release' configuration for Subversion in the
> generated visual studio 2008 project files provided by gen-make.py. I simply
> assumed these were the static SVN libraries as well, since I don't recall
> finding any DLL files, just LIB files in the output directories after the
> build.

Ok, if you are using the --disable-shared argument to gen-make.py then
the libsvn_*.lib files do appear to be the static libraries. Without
that option they are the dynamic import libraries and another set of
static libraries is generated as svn_*.lib.

With or without the --disable-shared option, I can build a small
sample app statically linked to Subversion with no difficulties as
long as I setup my app linker settings to pull in the right libraries.

However, even with --disable-shared, the Subversion libraries are
going to try to link to the dynamic import libraries for apr and
apr-util by default from what I can tell.

So, if you really want a build that is statically linked to apr as
well as Subversion, then you'll have to tweak the Subversion project
files yourself (and neon as well) to #define APR_DECLARE_STATIC and
APU_DECLARE_STATIC so that they will use the correct header
declarations for the static apr libraries. There may be more issues
as well, since I haven't pursued doing this beyond a few minutes
investigation. This is not the way Subversion builds are generally
done and the build system doesn't try to support it much (at least
that I can see).



To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-04 02:58:06 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.