[PATCH] build: fix libarchive detection
abartlet at samba.org
Fri May 29 12:00:29 MDT 2015
On Fri, 2015-05-29 at 11:46 +0200, David Disseldorp wrote:
> On Fri, 29 May 2015 10:26:55 +0200, Björn Jacke wrote:
> > On 2015-05-29 at 09:15 +1200 Andrew Bartlett sent off:
> > > On Thu, 2015-05-28 at 16:52 +0200, Björn Jacke wrote:
> > > > our libarchive detection was solidly broken, we also don't rely on pkgconfig now.
> > >
> > > What was wrong with relying on pkg-config? We really should be using
> > > that as much as possible.
> > basically I agree that pkg-config should be preferred if available. The
> > non-pkg-config check should also worth though in any case. And as I've written
> > in the bug report later on also, the check function that was used was wrong -
> > conf.CHECK_BUNDLED_SYSTEM works only for our bundeled libraries.
> CHECK_BUNDLED_SYSTEM works for both bundled and system libraries. If you
> really want to avoid the bundled check behavior then we could go with
> the attached patch, but I still wouldn't really call it a bug fix.
> > > I would much rather we fix whatever was wrong with using pkg-config, or
> > > at least use that and recover if we really know there is a broken
> > > libarchive that:
> > > - we still want to use
> > > - but has a broken pkg-config
> > see comment 4 in the bug report. I would apreciate if you can enhance the waf
> > build system to make proper pkg-config checks for generic libraries including
> > falback for non-pkg-config checks and the function check feature of
> > CHECK_FUNCS_IN we can then change the checks of this and actually all the other
> > external library checks that to such a function. Currently this is wrong and a
> > limitation of waf obviously. I'll change the comment as sugested by David.
> I don't see why we need the function check fallback for libarchive. The
> library provides a perfectly usable pkg-config file.
I would really like to avoid function check fallbacks, particularly for
optional features against libraries that provide pkg-config files.
Also, fallbacks combined with pkg-config version constraints perform
rather poorly, you have to build a fallback check that is also
version-constrained, and then both document that and hope it remains
reliable. It just seems pointless effort.
Our goal should be to be using pkg-config exclusivity, it is a much
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical