[PATCH] build: don't execute statfs and f_fsid checks
abartlet at samba.org
Thu Mar 6 13:58:13 MST 2014
On Sat, 2014-02-08 at 07:25 +1300, Andrew Bartlett wrote:
> On Fri, 2014-02-07 at 14:59 -0300, Gustavo Zacarias wrote:
> > On 02/07/2014 02:51 PM, Andrew Bartlett wrote:
> > > The difficulty here is to understand why this code was executed in the
> > > first place. It was executed in the autoconf build, and an extensive
> > > look into that codebase hasn't made it possible to find the rationale
> > > there either.
> > >
> > > The other frustration is that this check is in a different spot to the
> > > other statfs checks (under lib/util), some of which do seem to genuinely
> > > need to be run. (It seems to duplicate part of those other tests).
> > >
> > > In any case, what do you mean when you say it's undefined on some
> > > platforms?
> > By looking at the statfs manpage (in linux):
> RETURN VALUE
> On success, zero is returned. On error, -1 is returned, and
> errno is set appropriately.
> > Nobody knows what f_fsid is supposed to contain (but see below).
> Sure, it isn't a firm standard, but where the behaviour is known, it is
> well known.
> > And then there's a whole explanation on what the different *xes do with it.
> > For samba 3.6.x at least the test passes thru without explicitly needing
> > to execute it, didn't look into 4.0.x but IIRC it was the same case,
> > snip from a 3.6.x config.log:
> > configure:37221: checking vfs_fileid: checking for statfs() and struct
> > statfs.f_fsid)
> > configure:37254: result: cross
> > So it'll basically assume a default on it if it can't test it.
> Yes, but please do not take any comfort from that. I would have very
> little comfort in the accuracy of the the choice of cross-compile
> default in our autoconf tests. I say this because while this may be the
> exception, the typical pattern was to just copy the last similar test,
> and modify it. It can't be easily shown that whoever wrote this test
> considered this carefully. (The same often applied to the choice of
> Adding the the confusion, I added
> 2a4eaa3241fc4ccb79359ea4e4d511754a84d46b only recently, with
> execute=True, in order to make the FreeBSD build match the waf build.
> > The same does not happen on 4.1.x, in fact i can't even cache the answer
> > for some odd reason and thus is a stumbling block for cross compiling.
> Günther and David,
> Do you happen to know anything more about this? What do you think we
> should do here?
> My only thoughts on a way forward are to move this code to
> lib/util/wscript_configure, and to then run it on one each of
> BSD/Solaris/AIX systems as well as linux, and ensure it still matches
> the previous output.
Cross-compilation is a special interest of yours, could you look into
the implications here? I'm after some other opinions and hopefully
thoughts from someone who may remember any of the history here.
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical