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

Re: FS abstraction and circular dependencies

From: Chris Foote <cfoote_at_v21.me.uk>
Date: 2004-05-02 03:29:38 CEST

From: "Greg Hudson" <ghudson@MIT.EDU>

> When I wrote the FS abstraction code, I deliberately introduced some
> circular dependencies between the FS modules and the loader library,
> figuring that it would work out as long as the loader library
> consisted of only one source file.
>
> Well, that castle has apparently come crumbling down; reportedly,
> Windows doesn't allow shared libraries to have undefined symbols, so
> you can only have circular references with a static build.
>
[snip]

Aren't these symbols in the FS abstraction the problem?
* extern fs_library_vtable_t svn_fs_base__vtable;
* extern fs_library_vtable_t svn_fs_fs__vtable;
as they are in the FS modules, and hence cause the circular dependency.
Once these are removed there is no circular dependency problem for
building shared libraries on windows.

I don't have any problems compiling the FS modules as dlls
on Windows after simply doing the following:
1) remove the defines in svn_private_config.hw to link in the modules.
   #undef SVN_LIBSVN_FS_LINKS_FS_BASE
   #undef SVN_LIBSVN_FS_LINKS_FS_FS
2) export the vtables from the FS modules.
3) link the FS modules with the FS abstraction.
4) rename the FS module dlls to *.so.0 so that they can be loaded.

The resulting svnadmin dynamically loads the FS module and successfully
creates a new repo.

Although I would suggest doing the following in the fs-loader:

#ifdef SVN_LIBSVN_FS_LINKS_FS_BASE
extern fs_library_vtable_t svn_fs_base__vtable;
#endif

#ifdef SVN_LIBSVN_FS_LINKS_FS_FS
extern fs_library_vtable_t svn_fs_fs__vtable;
#endif

Regards
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun May 2 03:30:20 2004

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.