S3: build and use talloc shared and static library

Jelmer Vernooij jelmer at samba.org
Tue Feb 12 18:31:40 GMT 2008

Am Dienstag, den 12.02.2008, 18:17 +0100 schrieb Michael Adam:
> We are building a couple of shared and static libraries in
> samba3. Since recently, we are also linking against one
> shared (or static) library: libwbclient.so .
> Now I have started to enable building and also internal linking
> of more "subsystems", starting with a talloc library as the most
> isolated and simple example, standalone talloc not (yet) being 
> widely available on systems.
> I want to isolate and link more libraries in the sequel.
> I have started with a simple apporach: When we do build
> a subsystem as a shared library, then we also link it in
> dynamically, unless the (new) configure option
> "--with-static-libs=LIBS" is set and contains the name of the 
> library/subsystem as one entry of a comma separated list
> (example: "--with-static-libs=libtalloc").
> When this is set or when we do not even build the shared library,
> then we link against the static library (which we always build).
> This approach could of course easily be extended to support 
> libraries that are by default linked statically with a similar
> option "--with-shared-libs=LIBS".
> Besides reducing the memory usage of the binaries by using
> shared libs internally, another goal I have in mind is to build
> (e.g.) parts of the new libnet_* code as libraries, that could
> then also be used by third party applications.
> Any objections to this approach in principle?
One thing to keep in mind is that doing this means that we will have to
make sure that talloc's version and soversion is always updated when
changes to the API are made and that the two are always kept in sync
(version X.Y.Z of talloc should *always* provide exactly the same API). 

Without this, users can run into strange problems if they have both
Samba 3 and Samba 4 (or some other app that uses the talloc from
http://talloc.samba.org/) installed together.

Maybe we should switch to using a submodules (or whatever nested trees
were called in git) for talloc first so that there is only a single
talloc tree, or the talloc exported from samba3 could be renamed
libsamba3-talloc as I suggested on IRC.


Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.samba.org/archive/samba-technical/attachments/20080212/28db672a/attachment.bin

More information about the samba-technical mailing list