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

simo idra at samba.org
Fri Sep 5 16:16:50 GMT 2008


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.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <simo at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: standalone-dso-builds.patch
Type: text/x-patch
Size: 27643 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080905/1f630456/standalone-dso-builds.bin


More information about the samba-technical mailing list