Subject: Re: c-ares 1.5.3 build issues/resolutions

Re: c-ares 1.5.3 build issues/resolutions

From: Brad House <>
Date: Sun, 28 Sep 2008 23:24:41 -0400

>> It appears as though a manual check for AR is being performed
>> which is infact causing issues if you want to use a different AR
>> than exists in your path, it's always overwriting it without ever
>> checking for the variable to have already been set.
> Issues? Which ones?

Specifically, it did _NOT_ honor my custom AR, it overwrote it
with the one it 'found' instead.

> With mostly any version of autoconf you _really_ need the tools to be
> available in your path. Setting the AR variable before running
> configure should work with all autoconf versions.

In this particular case, a build script it was passing AR as
'ar -X 64' for IBM AIX (not sure why its not using AR_FLAGS,
but it did uncover this issue). It ended up just using the
found 'ar' instead. After commenting out that section, all worked

> No matter what the autoconf manual says, AC_PATH_TOOL does read and
> use the environment variable if properly set, at least from autoconf
> 2.57 up to 2.63. Remember to use an absolute path.

Well, didn't work for me, though obviously the AR wasn't set to the
actual executable path but instead path + flags, which could have
caused an issue. I'd say to skip your sanity check if AR is already
set and assume the user knows what they're doing if AR is set.

>> I'm not sure
>> why this check is being performed as it is one of the standard
>> checks autoconf does already, and in a more sane manner, I'd
>> suggest removing that block of code.
> The check is done in order to allow early detection of misconfigured
> or incomplete build toolchain and halt the configure process. This
> allows the user to focus on the real error instead of getting hundreds
> of warnings which would not really help him to fix the problem on his
> own.

I was under the assumption that configure would fail if it couldn't
find ar. Why try to relocate the tool though? I'm pretty sure you
could just see if $AR has been set as if it hasn't, autoconf didn't
find it ... That should run prior to anything in your,

> Autoconf does not do this check at all, it is automagically pulled
> from libtool which does the check, but this one does not halt the
> configure process and after all the warnings the result is a failed
> library build.

Autoconf definitely checks for ar...

> Could you elaborate on your affirmation "in a more sane manner" ?
>> Then, similar checks are being done for GREP, EGREP, and SED,
>> you should instead use the AC_PROG_GREP, AC_PROG_EGREP,
>> and AC_PROG_SED macros as per:
> Our configure script is compatible with autoconf 2.57, but
> AC_PROG_SED and AC_PROG_GREP are not available until autoconf 2.60, so
> this would require 2.60 for our configure script.

Ok, well, AC_PROG_EGREP at least should be used then...

Received on 2008-09-29