Noticed this change in the Waflib
Christopher O Cowan
Christopher.O.Cowan at ibm.com
Tue Sep 18 20:58:36 UTC 2018
With the recent change, I've noticed that waf is dying during configuration
when doing a CHECK_CFG(). On a non-Linux platform, it runs pkg-config
and gets an error message for the package not being found, and throws a
uncaught exception. This happens for things like popt on AIX, which should
fall through and pick up the replacement lib.
After doing some digging around I noticed the following change to check_cfg
():
Before in thirdparty/waf/wafadmin/Tools/config_c.py, line 245:
self.validate_cfg(kw)
if 'msg' in kw:
self.check_message_1(kw['msg'])
ret = None
try:
ret = self.exec_cfg(kw)
except Configure.ConfigurationError, e:
if 'errmsg' in kw:
self.check_message_2(kw['errmsg'], 'YELLOW')
if 'mandatory' in kw and kw['mandatory']:
if Logs.verbose > 1:
raise
else:
self.fatal('the configuration failed
(see %r)' % self.log.name)
else:
kw['success'] = ret
if 'okmsg' in kw:
self.check_message_2(self.ret_msg(kw
['okmsg'], kw))
return ret
After in third_party/waf/waflib/Tools/c_config.py
self.validate_cfg(kw)
if 'msg' in kw:
self.start_msg(kw['msg'], **kw)
ret = None
try:
ret = self.exec_cfg(kw)
except self.errors.WafError:
if 'errmsg' in kw:
self.end_msg(kw['errmsg'], 'YELLOW', **kw)
if Logs.verbose > 1:
raise
else:
self.fatal('The configuration failed')
else:
if not ret:
ret = True
kw['success'] = ret
if 'okmsg' in kw:
self.end_msg(self.ret_msg(kw['okmsg'], kw),
**kw)
return ret
The difference is that the mandatory flag is no longer being considered, so
all errors are being thrown as an exception.
As a secondary question, I was wondering whether cmocka is expected to be
mandatory now? Not issue for me, because I was able to compile on AIX.
(But only after having to get a recent version of cmake).
More information about the samba-technical
mailing list