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

Stefan (metze) Metzmacher metze at samba.org
Fri Sep 5 17:04:23 GMT 2008


simo schrieb:
> On Wed, 2008-09-03 at 20:29 +0000, simo wrote:
>> 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
>> times).
>>
>> 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;
>> ./autogen.sh
>> ./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
>> happy.
>>
> 
> After some discussion with Jelmer (he didn't like the --with-<submodule>
> stuff) here it is another patch that seem to work fine in my tests.

Hi Simo,

why one large patch? Each subsystem should have it's own commit.
What repo are you working with (the source/lib/ prefix is missing...)?

Why the tdb.h change? Why should be include "signal.h"?

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20080905/629dfa96/signature.bin


More information about the samba-technical mailing list