On build system portability and flexability

Andrew Bartlett abartlet at samba.org
Mon Jun 4 01:42:48 MDT 2012


I've been spending a lot of time on build systems recently, and I wanted
to share some thoughts and data on the portability of Samba 4.0 in
master.

One of the few automated ways we have to measure the portability of
Samba is our build farm.

I've been looking over the results, and here are the current results for
which hosts currently build Samba master with waf and autoconf:

                                            waf     autoconf
Mac OS 10.4 i386            SerNet-imini    YES     NO
NetBSD5 amd64               SerNet-NetBSD5  YES     YES
IRIX irix 6.5 10070056 IP32 SerNet-IRIX     NO      YES [1]
Ubuntu 10.04 x86_64         sn-devel-104    YES     YES 
FreeBSD 7.2                 builder72       YES     NO
Ubuntu x86_64               svart           YES     YES
Debian Sid PPC64            tridge          YES     YES
OpenIndiana                 openindiana     YES     NO [2]
FreeBSD 10-CURRENT          tinderbox       YES     NO
HP-UX 11.23                 hpisgr8         NO      YES [3]
SLES8 i386                  SerNet-sles8    YES [4] YES
Tru64 UNIX V5.1B-4-PK6      SerNet-Tru64            NO [5]
OpenSUSE 12.1 X86-64        opensuse121     YeS     YES

[1] I presume this will build once the bug it found is fixed
[2] This is due to the make syntax issue in the VFS examples I reported
[3] autoconf build here fails to build due to the recursive waf build
for smbtorture4
[4] This is the only build I fixed last weekend, except to unbreak
things after the xattr changes.  It only builds waf via the autoconf
bin/smbtorture4 build
[5] The build is only attempted for autoconf on this host and fails due
to shell differences in build_idl.sh

So, what does this mean?  First, it means that we have not been paying
attention to the build farm, or else we would not have so many
failures.  

It also shows that at this time, the waf build actually builds on more
platforms than the autoconf build, and surprisingly this evidence
indicates that the waf build should be regarded as the most portable way
to build Samba.   

Looking at the causes of those failures, it is because while waf has a
consistent syntax that either runs everywhere, or fails everywhere, the
autoconf build relies on the quirks of the installed shell and make,
meaning that developers have to spend time installing virtual machines
just to correct simple syntax errors. 

Due to the way we use waf, it is hard to introduce a syntax error that
only shows up on some platforms, because the same waf scripts always
run.  The only variant is the python language, and the few additions to
the syntax are well documented - I know of no such easy reference for
the world's shell and make variants. 

I'm not proposing any specific action on the basis of this limited
sample, but I hope it helps us have an informed discussion about the
role and purpose of our build systems.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list