svn commit: samba r22037 - in branches/SAMBA_4_0/source/build/smb_build: .

James Peach jpeach at samba.org
Tue Apr 3 04:13:36 GMT 2007


On 02/04/2007, at 7:23 PM, tridge at samba.org wrote:

> James,
>
>> I think the right thing might be to require GNU Make for $srcdir !=
>> $builddir. If you search the automake mailing list, there are claims
>> that GNU Make is the only make that implements VPATH "correctly".
>
> I think we can do $srcdir != $builddir correctly without GNU make.
>
> If you have a look at the build farm, you'll see that ldb, talloc, tdb
> and libreplace are all built and tested with $srcdir != $builddir. All
> of them build on both BSD systems without GNU make and on systems with
> GNU make. So it is possible, it just needs to be done carefully :)
>
> I also think it's worthwhile, as otherwise support for $builddir !=
> $srcdir will atrophy (as has happened before).  If you look at line
> 470 of build_test.fns in the build_farm, you'll see that currently we
> force tdb, talloc, ldb and libreplace to build with a separate
> builddir. Ideally, I'd like to add Samba4 to that list, so that as
> soon as anyone does something to break it, then we will get build
> breakage emails.

One reason that this might work for LDB is that it doesn't hit the  
relevant issue for BSD make, which is this:

ccache gcc   -I./lib/replace -I./lib/replace -I./lib/talloc -I./lib/ 
talloc -I/usr/local/include -I./lib/tdb/include -I./lib/tdb/include - 
I./heimdal_build -I./heimdal_build -I./heimdal/lib/roken -I./heimdal/ 
lib/roken -I./lib/socket_wrapper -I./lib/socket_wrapper -I./heimdal/ 
lib/com_err -I./heimdal/lib/com_err -I./heimdal/lib/asn1 -I./heimdal/ 
lib/asn1 -I./heimdal/lib/des/imath -I./heimdal/lib/des/imath -I./ 
heimdal/lib/des -I./heimdal/lib/des -I./heimdal/lib/hx509 -I./heimdal/ 
lib/hx509 -I./heimdal/lib/krb5 -I./heimdal/lib/krb5 -I./heimdal/lib/ 
hdb -I./heimdal/lib/hdb -I./heimdal/lib/gssapi -I./heimdal/lib/gssapi  
-I./heimdal/lib/gssapi/spnego -I./heimdal/lib/gssapi/spnego -I./ 
heimdal/lib/gssapi/krb5 -I./heimdal/lib/gssapi/krb5 -I./heimdal/lib/ 
gssapi/mech -I./heimdal/lib/gssapi/mech      -Wall -I./include -I. - 
I./lib -I./lib/replace -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H -fPIC -DPIC - 
c torture/libnet/libnet_rpc.c -o libnet/libnet_rpc.o

Note, that the there are 2 libnet_rpc.c files in the Samba4 tree. In  
fact, there are 111 filenames that are used more than once in the  
Samba4 tree. The Makefile for standalone TDB doesn't even use suffix  
rules, which are part of the problem here.

> If we restrict building outside of the source directory in Samba4 to
> GNU make, then we won't enable it on the build farm, and it will
> inevitably atrophy and break over time.

Yes, that's probably true. Unfortunately I've already spent more time  
on this than I can really justify. If it breaks again, I'll post a  
patch :)

--
James Peach | jpeach at samba.org




More information about the samba-technical mailing list