RFC: static / dynamic linking in samba3

Andrew Bartlett abartlet at samba.org
Thu Apr 2 22:08:06 GMT 2009

On Thu, 2009-04-02 at 10:58 +0200, Michael Adam wrote:
> I have just started to revise the s3-linking of internal subsystems
> as static vs. shared libraries.

> * Finally, I would come up with a linking scheme that copes
>   better with the fact that our libraries like libtalloc start to
>   appear as sytem libraries in the distributions (maybe triggered
>   by our introduction of building libtalloc and friends shared in
>   Samba 3.2).
>   A scheme for building (that is basically also what samba4 does)
>   initially discussed with Jelmer and Lars (among others)
>   on irc could be the following:
>   - check wheter libfoo is in the system
>     and check whether it suits our version requirements
>     (current checks use pkg-config for this)
>   - if libfoo is available and version is ok, then
>     adapt compile / link flags according to pkg-config to
>     link against that library
>   - if either the library is not found or version is not ok,
>     then build libfoo internally and link it in _statically_
>   This would be the scheme for very isolated libraries like
>   libtalloc, libtdb.
>   Other, more samba-specific subsystems that won't find their
>   way into distributions any time soon could still be built and
>   linked dynamically internally.

I really like this.  We have updated libtdb in the past week for
OpenLDAP and libldb to use it.  It would get very sticky if we can't
develop or deploy on such systems until the vendor library is updated.

Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20090403/fa8bf89c/attachment.bin

More information about the samba-technical mailing list