While working on creating a plan for netdata, I kept running into this error early in its build process:
autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /hab/pkgs/core/autoconf/2.69/20170513214252/bin/autoconf --force configure.ac:188: error: possibly undefined macro: AC_MSG_ERROR If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:200: error: possibly undefined macro: AC_CHECK_LIB configure.ac:312: error: possibly undefined macro: AC_CHECK_HEADER autoreconf: /hab/pkgs/core/autoconf/2.69/20170513214252/bin/autoconf failed with exit status: 1
I found a few hacks in
core-plans that dealt with aclocal and finding stuff:
- Worked, but violates package immutability
- Didn’t help me
- Works and seems clean!
It seems like setting
ACLOCAL_PATH while running
autogen.sh was all that was needed:
ACLOCAL_PATH="$(pkg_path_for core/pkg-config)/share/aclocal" ./autogen.sh
Is there a better way to fixing all these? Can packages with
share/aclocal just export ACLOCAL_PATH themselves now with that new feature for exporting build-time env variables? At the least, I think the
TODO in varnish’s plan can be cleaned up with this.
Here’s my ultimate (working) pull request for netdata: https://github.com/habitat-sh/core-plans/pull/1549