Subject: bug#78562: Coreutils-9.7 do not build on macOS High Sierra, Version 10.13.6, because src/cksum.c: uses invalid cpu feature string for builtin

From: Peter Dyballa <[email-masked]>
Date: Sat, 24 May 2025 10:44:13 +0200

I had to patch the patch to become

	--- configure.ac.orig	2025-02-26 16:53:31.000000000 +0100
	+++ configure.ac	2025-05-24 10:08:06.000000000 +0200
	@@ -696,8 +696,9 @@
	       __m256i a, b;
	       a = _mm256_clmulepi64_epi128 (a, b, 0x00);
	       a = _mm256_shuffle_epi8 (a, b);
	-      return __builtin_cpu_supports ("avx2") &&
	-        __builtin_cpu_supports ("vpclmulqdq");
	+      return __builtin_cpu_supports ("vpclmulqdq")
	+             && __builtin_cpu_supports ("avx512bw")
	+             && __builtin_cpu_supports ("avx512f");
	     }
	   ]])
	   ],[

because the text after @@ and the line with so many zeros were too much (for my version of patch).

Now configure fails:

	config.status: creating po/Makefile
	Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
	  alignof: found in coreutils-9.7/config.log
	  __GNUC_PREREQ: found in coreutils-9.7/config.log
	  unreachable: found in coreutils-9.7/config.log
	  MIN: found in coreutils-9.7/config.log
	  __fpending: found in coreutils-9.7/config.log
	  re_set_syntax: found in coreutils-9.7/config.log
	  re_compile_pattern: found in coreutils-9.7/config.log
	  re_search: found in coreutils-9.7/config.log
	  re_match: found in coreutils-9.7/config.log
	  free: found in coreutils-9.7/config.log
	Warning: Configuration logfiles contain indications of -Wimplicit-int; check that features were not accidentally disabled:
	  found in coreutils-9.7/config.log
	--->  Building coreutils-devel
	Executing:  cd "/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_coreutils-devel/coreutils-devel/work/coreutils-9.7" && /usr/bin/make -j8 -w all 
	make: Entering directory `/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_coreutils-devel/coreutils-devel/work/coreutils-9.7'
	CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh '/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_coreutils-devel/coreutils-devel/work/coreutils-9.7/build-aux/missing' aclocal-1.16 -I m4
	/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_coreutils-devel/coreutils-devel/work/coreutils-9.7/build-aux/missing: line 81: aclocal-1.16: command not found
	WARNING: 'aclocal-1.16' is missing on your system.
	         You should only need it if you modified 'acinclude.m4' or
	         'configure.ac' or m4 files included by 'configure.ac'.
	         The 'aclocal' program is part of the GNU Automake package:
	         <https://www.gnu.org/software/automake>
	         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
	         <https://www.gnu.org/software/autoconf>
	         <https://www.gnu.org/software/m4/>
	         <https://www.perl.org/>
	make: *** [aclocal.m4] Error 127
	make: Leaving directory `/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_coreutils-devel/coreutils-devel/work/coreutils-9.7'
	Command failed:  cd "/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_coreutils-devel/coreutils-devel/work/coreutils-9.7" && /usr/bin/make -j8 -w all 
	Exit code: 2
	Error: Failed to build coreutils-devel: command execution failed

Reason is that already automake @1.17 is installed here…

I changed in configure line #5985:am__api_version='1.16' to become 1.17 and configure succeeded.

Is it possible to make the tools relying on that number to accept newer software? (I have no idea what these tools are good for, I am only suffering from them.)

--
Greetings

  Pete

Don't force it; get a larger hammer. 
				– Anthony's Law of Force