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

simo idra at samba.org
Thu Dec 18 18:28:34 GMT 2008


On Thu, 2008-12-18 at 10:45 +1100, Andrew Bartlett wrote:
> On Fri, 2008-09-05 at 14:01 -0400, simo wrote:
> > On Fri, 2008-09-05 at 19:04 +0200, Stefan (metze) Metzmacher wrote:
> > > 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?
> > 
> > Just to give the sense of the change.
> > 
> > >  Each subsystem should have it's own commit.
> > 
> > Yes I will break down into separate patches if I get the go to commit
> > 
> > > What repo are you working with (the source/lib/ prefix is missing...)?
> > 
> > To make sure they can really build standalone I copied
> > replace,events,talloc,tdb,ldb off tree and tested they really build
> > stanalone w/o any other source from samba).
> 
> How is ldb expected to build in the build farm at the moment.  This (I
> presume) has broken the build farm, and similarly standalone builds no
> longer seem to find the talloc and events code from the rest of the
> Samba tree. 

I suspect standalone build were broken when we moved to the
samba3+samba4+libs tree structure, and libs are now located elsewhere.

Unfortunately I never worked on build farm stuff so I do not know how to
fix it.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <simo at redhat.com>



More information about the samba-technical mailing list