WAF 2.x broken a lot of configure checks

Alexander Bokovoy ab at samba.org
Wed Sep 5 14:05:54 UTC 2018


On ke, 05 syys 2018, Alexander Bokovoy via samba-technical wrote:
> On ke, 05 syys 2018, Alexander Bokovoy via samba-technical wrote:
> > On ke, 05 syys 2018, Stefan Metzmacher via samba-technical wrote:
> > > Hi,
> > > 
> > > I just found that the values in
> > > bin/c4che/default.cache.py differ between
> > > the old and new versions of waf.
> > > 
> > > The old one had = () for undefined values
> > > the new one has = 0 for undefined values
> > > 
> > > This is related to change to define/undefine/define_cond in
> > > third_party/waf/wafadmin/Tools/config_c.py
> > > vs.
> > > third_party/waf/waflib/Tools/c_config.py
> > > 
> > > And we now have buildtools/wafsamba/samba_waf18.py,
> > > which also provides define() and undefine().
> > > 
> > > I found that by building on FreeBSD 11 with gcc.
> > > 
> > > The check for HAVE_WORKING_STRPTIME was broken
> > > as CONFIG_SET() returned True if HAVE_WORKING_STRPTIME is 0,
> > > while it returned False when it was ().
> > > 
> > > Adding this to CONFIG_SET fixed it:
> > > if v == 0:
> > >     return False
> > > 
> > > But I'm wondering about what else might be affected.
> > > 
> > > Should we better try to get '= ()' again in
> > > bin/c4che/default.cache.py?
> > > 
> > > On my Linux box I had this before:
> > > 
> > > less bin/c4che/default.cache.py | grep '= 0'
> > > HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE = 0
> > > HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER = 0
These two are coming from heimdal explicitly setting them to '0':
conf.define('HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE', 0)
conf.define('HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER', 0)

> > > 
> > > and now I have this:
> > > 
> > > less bin/c4che/default_cache.py | grep '= 0'
> > > HAVE_BSD_STRTOLL = 0
> > > HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE = 0
> > > HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER = 0
> > > HAVE_INCOHERENT_MMAP = 0
.. and both HAVE_BSD_STRTOLL and HAVE_INCOHERENT_MMAP are defined using
conf.CHECK_CODE() which passes 'None' to conf.define().

So I think my proposed patch would cover these two.

I'm not sure we want to change heimdal's definitions.

-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list