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

nix-build -A pkgsMusl.coreutils fails (syntax error in configure) #108661

Closed
nomeata opened this issue Jan 7, 2021 · 5 comments · Fixed by #108685
Closed

nix-build -A pkgsMusl.coreutils fails (syntax error in configure) #108661

nomeata opened this issue Jan 7, 2021 · 5 comments · Fixed by #108685

Comments

@nomeata
Copy link
Contributor

nomeata commented Jan 7, 2021

Describe the bug

On current master (31eeb46) I get:

~/build/nixpkgs $ nix-build -A pkgsMusl.coreutils
these derivations will be built:
  /nix/store/q1152gqax5c39gx8yb53spaiwmh4di0y-coreutils-8.32.drv
building '/nix/store/q1152gqax5c39gx8yb53spaiwmh4di0y-coreutils-8.32.drv'...
unpacking sources
unpacking source archive /nix/store/3gyxcm7gqmqk90363iiwi2xwpfvh5x7l-coreutils-8.32.tar.xz
source root is coreutils-8.32
setting SOURCE_DATE_EPOCH to timestamp 1583417031 of file coreutils-8.32/doc/coreutils.info
patching sources
autoreconfPhase
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: running: autopoint --force
Copying file build-aux/config.rpath
Copying file m4/extern-inline.m4
Copying file m4/glibc2.m4
Copying file m4/intdiv0.m4
Copying file m4/intl.m4
Copying file m4/intldir.m4
Copying file m4/intmax.m4
Copying file m4/printf-posix.m4
Copying file m4/uintmax_t.m4
Copying file po/Makefile.in.in
Copying file po/Makevars.template
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /nix/store/8ji5gb80lcjjbpjv9kf7nfamy2k83ix8-autoconf-2.70/bin/autoconf --force
configure.ac:55: warning: The macro `AC_PROG_CC_STDC' is obsolete.
configure.ac:55: You should run autoupdate.
m4/std-gnu11.m4:476: AC_PROG_CC_STDC is expanded from...
configure.ac:55: the top level
configure.ac:61: warning: The macro `AC_GNU_SOURCE' is obsolete.
configure.ac:61: You should run autoupdate.
./lib/autoconf/specific.m4:312: AC_GNU_SOURCE is expanded from...
m4/gnulib-comp.m4:34: gl_EARLY is expanded from...
configure.ac:61: the top level
configure.ac:61: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:61: You should run autoupdate.
./lib/autoconf/general.m4:203: AC_HELP_STRING is expanded from...
m4/threadlib.m4:384: gl_THREADLIB_EARLY_BODY is expanded from...
m4/threadlib.m4:377: gl_THREADLIB_EARLY is expanded from...
m4/gnulib-comp.m4:34: gl_EARLY is expanded from...
configure.ac:61: the top level
configure.ac:63: warning: AC_CHECK_HEADERS(openssl/$ALG_header): you should use literals
./lib/autoconf/headers.m4:217: AC_CHECK_HEADERS is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/libs.m4:100: AC_CHECK_LIB is expanded from...
m4/gl-openssl.m4:13: gl_CRYPTO_CHECK is expanded from...
m4/md5.m4:7: gl_MD5 is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: AC_CHECK_HEADERS(openssl/$ALG_header): you should use literals
./lib/autoconf/headers.m4:217: AC_CHECK_HEADERS is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/libs.m4:100: AC_CHECK_LIB is expanded from...
m4/gl-openssl.m4:13: gl_CRYPTO_CHECK is expanded from...
m4/sha1.m4:7: gl_SHA1 is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: AC_CHECK_HEADERS(openssl/$ALG_header): you should use literals
./lib/autoconf/headers.m4:217: AC_CHECK_HEADERS is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/libs.m4:100: AC_CHECK_LIB is expanded from...
m4/gl-openssl.m4:13: gl_CRYPTO_CHECK is expanded from...
m4/sha256.m4:7: gl_SHA256 is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: AC_CHECK_HEADERS(openssl/$ALG_header): you should use literals
./lib/autoconf/headers.m4:217: AC_CHECK_HEADERS is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/libs.m4:100: AC_CHECK_LIB is expanded from...
m4/gl-openssl.m4:13: gl_CRYPTO_CHECK is expanded from...
m4/sha512.m4:7: gl_SHA512 is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: The macro `_AC_COMPUTE_INT' is obsolete.
configure.ac:63: You should run autoupdate.
./lib/autoconf/general.m4:3365: _AC_COMPUTE_INT is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2248: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2269: AC_CACHE_CHECK is expanded from...
m4/gethostname.m4:47: gl_PREREQ_HOST_NAME_MAX is expanded from...
m4/gethostname.m4:10: gl_FUNC_GETHOSTNAME is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:63: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
m4/malloc.m4:9: _AC_FUNC_MALLOC_IF is expanded from...
m4/malloc.m4:55: gl_FUNC_MALLOC_GNU is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:63: You should run autoupdate.
./lib/autoconf/general.m4:203: AC_HELP_STRING is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: $as_echo_n is obsolete; use AS_ECHO_N(["message"]) instead
m4/gnulib-common.m4:453: gl_CACHE_VAL_SILENT is expanded from...
m4/stdarg.m4:10: gl_STDARG_H is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:63: warning: The macro `AC_DECL_SYS_SIGLIST' is obsolete.
configure.ac:63: You should run autoupdate.
./lib/autoconf/specific.m4:40: AC_DECL_SYS_SIGLIST is expanded from...
m4/strsignal.m4:55: gl_PREREQ_STRSIGNAL is expanded from...
m4/gnulib-comp.m4:896: gl_INIT is expanded from...
configure.ac:63: the top level
configure.ac:64: warning: The macro `AC_ISC_POSIX' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/specific.m4:544: AC_ISC_POSIX is expanded from...
m4/jm-macros.m4:22: coreutils_MACROS is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
m4/check-decl.m4:14: gl_CHECK_DECLS is expanded from...
m4/jm-macros.m4:22: coreutils_MACROS is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/general.m4:203: AC_HELP_STRING is expanded from...
m4/xattr.m4:11: gl_FUNC_XATTR is expanded from...
m4/prereq.m4:28: gl_PREREQ is expanded from...
m4/jm-macros.m4:22: coreutils_MACROS is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/general.m4:203: AC_HELP_STRING is expanded from...
m4/jm-macros.m4:22: coreutils_MACROS is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/general.m4:2919: AC_TRY_LINK is expanded from...
m4/jm-macros.m4:22: coreutils_MACROS is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/general.m4:2919: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2893: _AC_LINK_IFELSE is expanded from...
./lib/autoconf/general.m4:2910: AC_LINK_IFELSE is expanded from...
./lib/autoconf/general.m4:2919: AC_TRY_LINK is expanded from...
m4/jm-macros.m4:22: coreutils_MACROS is expanded from...
configure.ac:64: the top level
autoreconf: running: /nix/store/8ji5gb80lcjjbpjv9kf7nfamy2k83ix8-autoconf-2.70/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory '.'
updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./build-aux/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./build-aux/config.guess
configuring
configure flags: --disable-dependency-tracking --prefix=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32 --bindir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/bin --sbindir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/sbin --includedir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/include --oldincludedir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/include --mandir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/share/man --infodir=/nix/store/rf5yb5092vfgycgaa3jnnkjclfk9id23-coreutils-8.32-info/share/info --docdir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/share/doc/coreutils --libdir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/lib --libexecdir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/libexec --localedir=/nix/store/q0wn26fcbrf495qh2wz0vwsn02550zpv-coreutils-8.32/share/locale --with-packager=https://NixOS.org --enable-single-binary=symlinks
checking for a BSD-compatible install... /nix/store/5b7a4ynm23gm375q1fzbsh4sqc806864-bootstrap-tools/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /nix/store/5b7a4ynm23gm375q1fzbsh4sqc806864-bootstrap-tools/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
./configure: line 6425: syntax error near unexpected token `ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89'
./configure: line 6425: `                      ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89'
builder for '/nix/store/q1152gqax5c39gx8yb53spaiwmh4di0y-coreutils-8.32.drv' failed with exit code 2
error: build of '/nix/store/q1152gqax5c39gx8yb53spaiwmh4di0y-coreutils-8.32.drv' failed

Pinging @matthewbauer @tobim @nh2 who seems to have dealt with coreutils and musl recently.

@nomeata
Copy link
Contributor Author

nomeata commented Jan 7, 2021

Git bisect points to 3f42dfe (autoconf: 2.69 -> 2.70) by @alyssais as the offending commit.

@tobim
Copy link
Contributor

tobim commented Jan 7, 2021

Its unclear what patch is meant here:

    ++ optionals stdenv.hostPlatform.isMusl [ autoreconfHook bison ];   # due to patch

Maybe that line can be dropped?

@nomeata
Copy link
Contributor Author

nomeata commented Jan 7, 2021

Indeed, with

diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index d0e032b7c10..1a0c9b2e10c 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -76,8 +76,7 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "info" ];
 
   nativeBuildInputs = [ perl xz.bin ]
-    ++ optionals stdenv.hostPlatform.isCygwin [ autoreconfHook texinfo ]   # due to patch
-    ++ optionals stdenv.hostPlatform.isMusl [ autoreconfHook bison ];   # due to patch
+    ++ optionals stdenv.hostPlatform.isCygwin [ autoreconfHook texinfo ];  # due to patch
   configureFlags = [ "--with-packager=https://NixOS.org" ]
     ++ optional (singleBinary != false)
       ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")

builds. I have no idea if that is a good thing, or just hiding problems, though :-)

@nomeata
Copy link
Contributor Author

nomeata commented Jan 7, 2021

Created a PR of this at #108685, but really, I don’t know what I am doing here. @tobim, shall I un-draft that?

@tobim
Copy link
Contributor

tobim commented Jan 7, 2021

Should be fine, it might still be an issue on Cygwin though.

alyssais pushed a commit that referenced this issue Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants