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

Re: Circular library dependency under Windows? (was: Re: svn commit: r18462 - in trunk/subversion: libsvn_fs libsvn_fs_base libsvn_fs_fs)

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-02-16 13:19:34 CET

On Thu, 16 Feb 2006, Malcolm Rowe wrote:

> On Wed, Feb 15, 2006 at 09:47:02AM -0600, kfogel@collab.net wrote:
> > "Peter N. Lundblad" <peter@famlundblad.se> writes regarding r18462:
> > > Hmmm, I thought such circular dependencies were not supported on
> > > Windows...
> >
> > You mean having the lower-level library make calls into the
> > higher-level library? Hmm, that's a good point. It just compiled and
> > worked for me (Debian GNU/Linux), so I assumed there was no problem.
> >
> I'm not absolutely certain if circular dependencies are the reason, but my Cygwin build now fails with:
>
> cd subversion/libsvn_fs_fs && /bin/sh /cygdrive/d/svn/svn-objdir/libtool --tag=CC --silent --mode=link gcc -g -O2 -DSVN_DEBUG -DAP_DEBUG -Wpointer-arith -Wwrite-strings -Wshadow -rpath /usr/local/lib -o libsvn_fs_fs-1.la -no-undefined dag.lo err.lo fs.lo fs_fs.lo id.lo key-gen.lo lock.lo revs-txns.lo tree.lo ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la /usr/lib/libaprutil-0.la -lgdbm -ldb-4.2 -lexpat -liconv /usr/lib/libapr-0.la -lresolv -lcrypt -lz
> Creating library file: .libs/libsvn_fs_fs-1.dll.a
> .libs/tree.o: In function `copy_helper':
> /cygdrive/d/svn/svn-objdir/../svn-trunk/subversion/libsvn_fs_fs/tree.c:1935: undefined reference to `_svn_fs__same_p'
> /cygdrive/d/svn/svn-objdir/../svn-trunk/subversion/libsvn_fs_fs/tree.c:1937: undefined reference to `_svn_fs_path'
> /cygdrive/d/svn/svn-objdir/../svn-trunk/subversion/libsvn_fs_fs/tree.c:1937: undefined reference to `_svn_fs_path'
> collect2: ld returned 1 exit status
> make: *** [subversion/libsvn_fs_fs/libsvn_fs_fs-1.la] Error 1
>
Probably. Fear maxb! (See r16017:-)

> (Hmm, the immediate problem may just be that libsvn_fs isn't listed as
> a library for libsvn_fs_fs. I've re-run autogen, it's not that.)
>

Ouch! Does our build system handle circular dependencies?

> I do notice th following section in configure that implies that Cygwin
> is the only platform that can't do circular linkage.
>
> AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
> case $host in
> *-*-cygwin*)
> AC_MSG_RESULT([yes])
> AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1,
> [Define if circular linkage is not possible on this platform.])
> ;;
> *)
> AC_MSG_RESULT([no])
> ;;
> esac
>

That long macro with a very very long name is only used in one place in
the Swig bindings it seems.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 16 13:21:03 2006

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.