Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't autoreconf when building from source #3658

Open
darlo-me opened this issue Jun 4, 2020 · 6 comments
Open

Can't autoreconf when building from source #3658

darlo-me opened this issue Jun 4, 2020 · 6 comments

Comments

@darlo-me
Copy link

darlo-me commented Jun 4, 2020

Describe the bug

When running ./bootstrap.sh (or autoreconf -f), I get this error message:

autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force 
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: configure.ac: not using Libtool
autoreconf-2.69: running: /usr/bin/autoconf-2.69 --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.
autoreconf-2.69: /usr/bin/autoconf-2.69 failed with exit status: 1

It seems installing autoconf-archive fixes the issue

Steps To Reproduce

curl https://nixos.org/releases/nix/nix-2.3.6/nix-2.3.6.tar.xz > nix-2.3.6.tar.xz
tar -xvf nix-2.3.6.tar.xz
cd nix-2.3.6
./bootstrap.sh

Expected behavior

Clearer error (install autoconf-archive) or documentation (mention it in the manual)

Additional context

I encountered this issue while trying to install the gentoo ebuild (https://github.com/trofi/nix-guix-gentoo)

Similar bug mentioned here: #3154 (comment)

@trofi
Copy link
Contributor

trofi commented Jun 4, 2020

Looking at aclocal run I think it means release tarball lacks 3 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'

@edolstra
Copy link
Member

./bootstrap.sh is only for building from a Git tree. When building from a tarball, ./configure should be sufficient. BTW we'll stop doing tarball releases for Nix >= 2.4.

@trofi
Copy link
Contributor

trofi commented Jun 10, 2020

Sometimes configure.ac has to be patched downstream. To regenerate configure from patched configure.ac all .m4 files has to already present in tarball. Be it used by ./bootstrap.sh or by manual autoconf run.

BTW we'll stop doing tarball releases for Nix >= 2.4.

How nix would be installed on users' systems in that case?

@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@trofi
Copy link
Contributor

trofi commented Oct 1, 2021

Sometimes configure.ac has to be patched downstream. To regenerate configure from patched configure.ac all .m4 files has to already present in tarball. Be it used by ./bootstrap.sh or by manual autoconf run.

BTW we'll stop doing tarball releases for Nix >= 2.4.

How nix would be installed on users' systems in that case?

Was clarified in #5308 (review). Git tags will still be present and autoconf-archive will be a required build-time depend.

@stale
Copy link

stale bot commented Apr 16, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants