tons of uselib_local warnings in waf
tnagy at waf.io
Sun May 22 13:19:54 UTC 2022
On Thu, 19 May 2022 14:23:28 +0200, Andreas Schneider via samba-technical <samba-technical at lists.samba.org> wrote:
> On Sunday, April 3, 2022 6:52:29 AM CEST Michael Tokarev via samba-technical
> > I tried to dig there, but weren't able to figure out how
> > it all works. The following change does eliminate the
> > warning, but I'm not sure the resulting thing actually
> > does what it is supposed to do. For one, there's no
> > function like "apply_use()" in samba_waf18.py which does
> > something similar to "apply_uselib_local()", - I don't
> > see where this "use" attribute is processed.
> > What would be the right fix for this?
> > Also, where to look for some basic docs about waf
> > internals?
> Hi Michael,
> I wonder if someone really does. You can look for docs at https://waf.io for
> waf documentation, but there isn't any documentation for wafsamba at all.
> I would suggest to create a MR at gitlab, then we will see if anything breaks
> or not :-)
> Best regards
The purpose of uselib/uselib_local was to ensure that local libraries are always preferred over system ones. With the newer "use=" parameter, the previous schemes (uselib/uselib_local) can be discarded. Since the library order seems to be scrambled and unspecified in Samba at this time (https://gitlab.com/samba-team/samba/-/blob/master/buildtools/wafsamba/samba_deps.py#L270), I believe that the change suggested by Michael is fine.
Yet, if there is any concern that something might break silently, then the best approach is to simply remove the warnings on that line https://gitlab.com/samba-team/samba/-/blob/master/buildtools/wafsamba/samba_waf18.py#L319 (or build without the "verbose" option) and to focus the efforts on obtaining a consistent library order in buildtools/wafsamba/samba_deps.py.
More information about the samba-technical