[Top][All Lists]

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

Suggestion for improving an error message

From: Reuben Thomas
Subject: Suggestion for improving an error message
Date: Sat, 6 Apr 2024 13:08:52 +0200

Last night I had the baffling error "possibly undefined macro: AC_MSG_WARN".
Surely "impossibly undefined macro"!

Anyway, I was led to the following excellent analysis of the problem:

In my case, I was briefly baffled even further, as I *had* installed
pkg-config. But after a little thought I realised that my case was the
"opposite": I had failed to install a required autoconf-archive macro in my
project. Problem solved!

I wonder though if it might be possible to adopt the simplest suggestion of
the article I cite above, and improve the error message to something like
the following (lightly edited from the blog post to conform better to what
I take for autoconf house style):

configure.ac:34: error: unexpanded AC_XXX macro: AC_MSG_ERROR
    A token that looks like an autoconf macro was left unexpanded in the output.
    It may be undefined, or passed by `quote' to another macro that should
    have invoked it but isn't installed to do so. If this token and others
    are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.configure.ac:143: error: unexpanded
autoreconf: /usr/bin/autoconf failed with exit status: 1

Quite wordy, but might help more users get straight to the real problem!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]