WAF 2.x upgrade status

Andreas Schneider asn at samba.org
Thu Jul 5 10:08:17 UTC 2018

On Thursday, 5 July 2018 10:39:57 CEST Alexander Bokovoy via samba-technical 
> On to, 05 heinä 2018, Amitay Isaacs wrote:
> > >> > I'm looking at some ways to mitigate this by setting ONNODE before
> > >> > running the tests but that doesn't help with the other failure.
> > >> 
> > >> Attached patch fixes the tests.
> > >> 
> > >> You can drop the patch that tries to use the installed run_tests.sh
> > >> (ctdb/wscript: use generated ctdb_run_tests).
> > > 
> > > Thanks! Do you think we should keep bin in ctdb/?
> > 
> > I'm not sure what the correct thing to do is.  Did you change the bin
> > directory explicitly? Or did that change happen automatically with
> > waf-2.0?
> It is result of unification. waf 2.0 has now 'top' and 'out' to point to
> source and binary build directories. We also use 'top' to find out where
> buildtools are, so end result is that out is defined as $top/bin.
> It seems to play well with lib/* libraries.
> > If it's not too much trouble, then it's easier to do sub-directory
> > builds (e.g. do tdb or talloc build for testing) and discard them
> > without having to touch the top-level build.
> I'll look what could be done to preserve this use case.

As I'm a big fan from cmake here are some explanations:

cmake by default encourages out of source builds. This means you create a 
directory and tell cmake where the source is. An example is, that with libssh 
we support 3 crypto backends: openssl, gcrypt and mbedtls. For each of them I 
have created a build directory and one for 32bit compilation.

obj is the one for openssl, the others should be obvious.

l | grep obj
drwxr-xr-x  9 asn users    4096 Jul  5 11:52 obj
drwxr-xr-x  9 asn users    4096 Jun 29 09:21 obj-gcrypt
drwxr-xr-x  9 asn users    4096 Jul  5 11:20 obj-mbedtls
drwxr-xr-x  9 asn users    4096 Jun 30 14:12 obj-m32

As we don't have cmake, it would be great to have the same with waf. Have an 
build dir for samba with heimdal, samba with mitkrb5, samba with python3 so 
that I don't have to rebuild everything if I need different configure options.

The reason why this works is that cmake uses absolute paths everywhere.


Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D

More information about the samba-technical mailing list