[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cannnot build nbd from git clone



On Sun, Dec 17, 2017 at 07:30:59PM +0000, richard parkins wrote:
> 
> 
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> 
>     From: Eric Blake <eblake@redhat.com>
>     To: richard parkins <aleph0hpela-suse@yahoo.co.uk>; "nbd@other.debian.org"
>     <nbd@other.debian.org>
>     Sent: Wednesday, 13 December 2017, 23:13
>     Subject: Re: Cannnot build nbd from git clone
>    
>     Yep, that was autoreconf (well, aclocal run as part of autoreconf)
>     trying to tell you that it was building a corrupt configure file because
>     your development environment is incomplete.  Can we make the error
>     message a bit nicer than a corrupted configure file?  Probably.  (In
>     fact, if we were to use m4_pattern_forbid([AM_PATH_GLIB]) in
>     configure.ac, it would make failure to find the third-party library a
>     hard error that refuses to generate configure, rather than a soft error
>     that only shows up later during the run of ./configure).
> 
> Is there an autoconf macro to check that a particular file exists, and if not
> fail with a specified error message?

I don't think so, really.

> If so, you could simply add a call to check if (ACLOCAL)/glib-2.0.m4
> exists and tell the user to install glib2 development tools if it
> doesn't. In general, rather than than just reporting a problem, it's
> better to tell the user what to do to fix it - that reduces traffic on
> this list as well!

True.

OTOH, autoreconf really isn't supposed to be run by anyone but the
developer. The message "you didn't install library XYZ" when configure
is run is *much* clearer than the one issued by m4 as part of the
autoconf run.

The issue is that m4 is a macro language -- it reads input and produces
output, and assumes that things in the input that don't match particular
macros messages should be copied to output unchanged. This makes it
difficult to detect that something doesn't exist, because the assumption
for anything that m4 doesn't know is that it is just extra shell code
that needs to be part of configure...

We can document this better, but 'producing clear error messages in the
autoconf run' is likely to have 'making the autoconf run more brittle'
as a side effect, and I don't think that's a good idea.

-- 
Could you people please use IRC like normal people?!?

  -- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008
     Hacklab


Reply to: