Subject: bug#35848: Should automake use gmake by default if exists?

From: [email-masked]
Date: Wed, 22 May 2019 10:40:26 +0200

Hi Nick,

On 5/21/19 5:37 PM, Nick Bowler wrote:
> On 5/21/19, [email-masked] <[email-masked]> wrote:
>> automake expects GNU make to support dependency tracking.
>>
>> On Solaris it works well if MAKE variable is set to gmake during the
>> configuration, otherwise, it fails with the following error.
>>
>> config.status: error: Something went wrong bootstrapping makefile fragments
>>       for automatic dependency tracking.  Try re-running configure with the
>>       '--disable-dependency-tracking' option to at least be able to build
>>       the package (albeit without support for automatic dependency
>> tracking).
>> See `config.log' for more details
>>
>> My suggestion is to use gmake by default if the command exists,
>> otherwise fallback to make command. It could improve the overall user
>> experience since the user would not need to search a solution
>> (./configure MAKE=gmake) every-time this error is encountered.
> I doubt this will actually help users because the user probably
> won't know they need to explicitly run "gmake", and if the package
> is configured with MAKE=gmake and they run plain "make" it is likely
> to also fail.

you are right, the idea would only delay the probable failure, so please 
ignore my original suggestion.

Maybe the error message could be more informative, for example:
Something went wrong during bootstrapping of makefile fragments
for automatic dependency tracking. If the GNU make is not used by
default, consider to rerun the configure script with MAKE="gmake".
You can also try to rerun configure with the '--disable-dependency-tracking'
option to at least be able to build the package (albeit without support
for automatic dependency tracking).

When we agree on wording, I can prepare a patch to update depout.m4 file.

>
> The only "fancy" feature that Automake's dependency tracking should
> require of the make implementation is an "include" functionality, for
> example any make which implements the "include" directive from POSIX
> should suffice.  I'm pretty sure Solaris make has such a function, so
> I'd expect automatic dependency tracking to work with Solaris make.
>
> If it is not working, then there might be a real bug to fix in the
> dependency tracking feature in Automake.

In general, the dependency tracking works on Solaris. However, some 
packages (e.g., jq, flex, graphviz) expect GNU make since Makefile.am 
files are not compatible with Solaris make (conditional assignment 
operator, ...). If it is the case, one would expect a hint to use GNU 
make, therefore, the update of the error message could be the best way 
to go.

Thanks,
Libor

>
>> Note that we used automake 1.16.1 on Solaris 11.4 but the issue is also
>> reproducible with older automake versions.
> This doesn't sound accurate because the error you encountered does not
> exist in automake versions before 1.16.  Older versions may have a
> /different/ failure, of course...
>
> Cheers,
>    Nick