[PATCH] Remove the autoconf build system

Andrew Bartlett abartlet at samba.org
Wed May 22 21:36:18 MDT 2013


I've uploaded my patches to remove the autoconf build system to the
remove-autoconf branch at git://git.samba.org/abartlet.samba.org

https://git.samba.org/abartlet/samba.git/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/remove-autoconf

In doing so I'm certainly not claiming waf is the perfect build system
(it is not), nor is it as fast as autoconf at small/null builds.  

I agree that a null build can take from 6 (hot) to 18 (cold) seconds in
my quick tests on my laptop.   I know that feels like ages when staring
at a screen, and I'm pretty sure has increased since we started with
waf, in line with the larger merged build.  (I seem to recall tridge
trying to keep it below 3 (hot)).  I'll continue to look at this (see my
other patch) in the hope of finding a marginal improvement.

I'm also not claiming to have addressed all of Volker's concerns,
because his workflow that is absolutely and totally built
around using the autoconf build system, extracting the absolute most
from each feature and quirk.   waf does some wonderful things, but for
those benefits it has required some change from us all.  A lot has been
done to make the waf system 'like autoconf' from the outside, but I
think we reached the limits to major changes back when Tridge was
actively working on it.

In our now massive Samba project, the waf build is required to manage
the greater complexity that has come from releasing a unified Samba 4.0,
and while the time waf isn't perfect maintaining two build systems isn't
something we can do into the indefinite future.

Having two build systems costs us as delays as jobs are re-submitted
back to autobuild because autoconf wasn't updated, it costs us in the
re-working of subsystems so as to never share an object file between two
object lists or and costs in the endless process of trying to keep two
very large 'configure' stage systems both portable and in sync.  

However, the biggest source of delay and frustration comes from the
long, fruitless debugging jobs that come out having a build without full
safety.  We have all spent time debugging Samba, both for users and
ourselves, where Samba has an 'impossible' crash, that if true would be
or is a devastating production bug.  Too often those came from not
having the build tree totally clean after we or a user applied a patch
to some core component, or somehow mixed up Samba plugin components.
Having a build system with things like tight, automatic symbol versions
and dependency tracking every time does cost us a little each 'make',
but it saves us and our users from ourselves, and ultimately saves us
all time. 

The question as I see it is not 'is waf perfect?' (it isn't), but is it
good enough that we can focus on improving it as required and building
the rest of Samba, rather than synchronising and maintaining two build
systems. 

I therefore propose the remove-autoconf branch for review and comment,
so as to be able to discuss a concrete change, and so that if we choose
to make this change, that we avoid making any mistakes while doing it. 

Here is the diffstat of my remove-autoconf tree:

 auth/credentials/credentials_samba3.c        |   49 
 b/BUILD_SYSTEMS.txt                          |   25 
 b/buildtools/wafsamba/samba_patterns.py      |    6 
 b/dynconfig/dynconfig.c                      |   11 
 b/examples/smb.conf.default                  |   70 
 b/lib/param/loadparm.c                       |    2 
 b/lib/param/loadparm_server_role.c           |    4 
 b/lib/param/param_table.c                    |    2 
 b/lib/util/modules.c                         |    8 
 b/lib/util/wscript_configure                 |   22 
 b/nsswitch/wbinfo.c                          |    4 
 b/script/autobuild.py                        |   25 
 b/selftest/target/Samba3.pm                  |   16 
 b/selftest/wscript                           |    1 
 b/source3/passdb/machine_account_secrets.c   |    8 
 b/source3/passdb/pdb_ipa.c                   |    2 
 b/source3/smbd/posix_acls.c                  |    5 
 b/source3/wscript_build                      |    1 
 b/wscript                                    |    7 
 buildtools/compare_config_h3-exceptions.grep |   10 
 buildtools/compare_config_h3.sh              |   27 
 dynconfig/config.m4                          |  299 -
 examples/VFS/Makefile.in                     |   72 
 examples/VFS/autogen.sh                      |   63 
 examples/VFS/config.guess                    | 1561 ------
 examples/VFS/config.sub                      | 1686 ------
 examples/VFS/configure.in                    |  357 -
 examples/VFS/install-sh                      |  238 
 lib/ccan/libccan.m4                          |  363 -
 lib/iniparser_build/config.m4                |   45 
 lib/nss_wrapper/config.m4                    |   19 
 lib/ntdb/libntdb.m4                          |   41 
 lib/popt/libpopt.m4                          |   43 
 lib/popt/samba.m4                            |    8 
 lib/replace/crypt.m4                         |    6 
 lib/replace/dlfcn.m4                         |   31 
 lib/replace/install-sh                       |  238 
 lib/replace/libreplace.m4                    |  490 -
 lib/replace/libreplace_cc.m4                 |  197 
 lib/replace/libreplace_ld.m4                 |  337 -
 lib/replace/libreplace_macros.m4             |  347 -
 lib/replace/libreplace_network.m4            |  503 --
 lib/replace/repdir.m4                        |   81 
 lib/replace/strptime.m4                      |   16 
 lib/replace/system/config.m4                 |  145 
 lib/replace/timegm.m4                        |    1 
 lib/replace/win32.m4                         |   20 
 lib/socket_wrapper/config.m4                 |   22 
 lib/talloc/compat/talloc_compat1.m4          |   14 
 lib/talloc/libtalloc.m4                      |   38 
 lib/tdb/libtdb.m4                            |   41 
 lib/tevent/libtevent.m4                      |   75 
 lib/uid_wrapper/config.m4                    |   19 
 lib/zlib/zlib.m4                             |   29 
 librpc/build_idl.sh                          |   67 
 m4/check_make.m4                             |   33 
 m4/check_perl.m4                             |   32 
 m4/check_python.m4                           |  111 
 m4/pkg.m4                                    |  156 
 release-scripts/create-tarball               |  235 
 source3/Makefile-smbtorture                  |   24 
 source3/Makefile.in                          | 3405 -------------
 source3/autoconf/lib/param/README            |    3 
 source3/autoconf/librpc/gen_ndr/README       |    7 
 source3/autoconf/source3/param/README        |    3 
 source3/autogen.sh                           |  121 
 source3/config.guess                         | 1561 ------
 source3/config.sub                           | 1686 ------
 source3/configure.developer                  |    7 
 source3/configure.in                         | 6693 ---------------------------
 source3/include/autoconf/README              |    5 
 source3/include/autoconf/ldb_version.h       |    4 
 source3/install-sh                           |  238 
 source3/lib/netapi/examples/Makefile.in      |  364 -
 source3/lib/netapi/tests/Makefile.in         |   57 
 source3/m4/aclocal.m4                        |  899 ---
 source3/m4/autoconf-2.60.m4                  |  236 
 source3/m4/check_path.m4                     |   89 
 source3/m4/samba_version.m4                  |   29 
 source3/script/build_idl.sh                  |   60 
 source3/script/expand-includes.pl            |   30 
 source3/script/installbin.sh.in              |   34 
 source3/script/installdat.sh                 |   65 
 source3/script/installdirs.sh                |   18 
 source3/script/installman.sh                 |   87 
 source3/script/installmo.sh                  |   87 
 source3/script/installmodules.sh             |   42 
 source3/script/installscripts.sh             |   47 
 source3/script/linkmodules.sh                |   12 
 source3/script/mkbuildoptions.awk            |  275 -
 source3/script/mkinstalldirs                 |   38 
 source3/script/mkversion.sh                  |  150 
 source3/script/revert.sh                     |   18 
 source3/script/uninstallbin.sh.in            |   41 
 source3/script/uninstalldat.sh               |    1 
 source3/script/uninstallman.sh               |   37 
 source3/script/uninstallmo.sh                |    2 
 source3/script/uninstallmodules.sh           |   39 
 source3/script/uninstallmsg.sh               |    1 
 source3/script/uninstallscripts.sh           |   36 
 source3/script/uninstallswat.sh              |    1 
 source3/selftest/s3-selftest.sh              |   54 
 source3/tests/preproc-dummy.c                |    1 
 103 files changed, 45 insertions(+), 24946 deletions(-)

It also shrinks 4MB of our release tarball size, as pidl code is no
longer pre-generated.

As the patch is nearly 800k I won't attach it to the list.

Thanks,

Andrew Bartlett

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




More information about the samba-technical mailing list