[PATCH] standalone build enhancements for tdb,talloc,events,ldb

simo s at ssimo.org
Wed Sep 3 20:29:33 GMT 2008

I have been working on patch to make it possible to build
talloc,tdb,events and ldb standalone in a way that allows to build them
as shared objects and have events use libtalloc.so and ldb use
libtalloc.so libtdb.so and libevents.so

This will allow to avoid code duplication, fat binaries and most
importantly bad behaviors when using the same code linked multiple time
into binaries because of dependencies (we had lot of troubles at the
last sambaXp conference because the events code was linked in multiple

Next step would be to make it possible to build libreplace.a only once
and not in each subsystem again and again.

To test this work correctly I used the following approach:

for each subsystem in this order: (tdb,talloc,events,ldb)

cd $subdir;
./configure --prefix=/foo/bar --with-build-install-dir=../build
make build-install

Using the new option --with-build-install-dir and the new target
build-install the make files build the code and then just install .a/.so
libriaries (and headers) into ../build/[include|lib]
../build/include is also added to CFLAGS and ..build/lib to LIBS so that
when you build, say events, it will find the libtalloc.so file
in ../build/lib
if --with-build-install-dir is not used --with-talloc=/foo/bar (etc..)
can be used to specify exactly where an already installed library can be
found (if not available in the standard path (/usr/lib), this will allow
distributions and others to build specific versions of libraries and
link to those if preferred).

I tried to apply the patch on top of v4-0-test and recompiled, it seem
it doesn't break a normal static version of samba4, make test seem


-------------- next part --------------
A non-text attachment was scrubbed...
Name: standalone-dso-builds.patch
Type: text/x-patch
Size: 23835 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080903/c9cc4673/standalone-dso-builds.bin

More information about the samba-technical mailing list