trofi / nix-guix-gentoo

Gentoo overlay for nix and guix functional package managers.
107 stars 9 forks source link

sys-apps/nix-2.3.{4,5,6} configure.ac:118: error: possibly undefined macro: AC_MSG_ERROR #8

Closed darlo-me closed 4 years ago

darlo-me commented 4 years ago

Prepare fails with Running autoconf --force ... fails for sys-apps/nix-2.3.{4,5,6}

autoconf.out:

***** autoconf *****
***** PWD: /var/tmp/portage/sys-apps/nix-2.3.6/work/nix-2.3.6
***** autoconf --force

configure.ac:118: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

See https://github.com/NixOS/nix/issues/3658

Maybe autoconf-archive should be added in the DEPEND?

trofi commented 4 years ago

That sounds reasonable, but AC_MSG_ERROR macro comes from autoconf itself. It's a very simple macro without seemingly any extra dependencies:

AC_DEFUN([NEED_PROG],
[
AC_PATH_PROG($1, $2)
if test -z "$$1"; then
    AC_MSG_ERROR([$2 is required])
fi
])

I wonder what it really misses here. I'll try to reproduce without autoconf-archive installed to try to debug.

trofi commented 4 years ago

Reproduced locally. Upstream tarball is missing at least the following .m4 files:

$ aclocal -I m4/ --install
aclocal-1.16: installing 'm4//ax_boost_base.m4' from '/usr/share/aclocal/ax_boost_base.m4'
aclocal-1.16: installing 'm4//ax_require_defined.m4' from '/usr/share/aclocal/ax_require_defined.m4'
aclocal-1.16: installing 'm4//pkg.m4' from '/usr/share/aclocal/pkg.m4'

These come from:

$ qfile /usr/share/aclocal/ax_boost_base.m4 /usr/share/aclocal/ax_require_defined.m4 /usr/share/aclocal/pkg.m4
dev-util/pkgconfig: /usr/share/aclocal/pkg.m4
sys-devel/autoconf-archive: /usr/share/aclocal/ax_boost_base.m4
sys-devel/autoconf-archive: /usr/share/aclocal/ax_require_defined.m4
trofi commented 4 years ago

https://github.com/trofi/nix-guix-gentoo/commit/bda7aa4c3ff66cb14cd615e424f10f4ea69069a0 should hopefully fix it