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

Pádraig Brady <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On 24/05/2025 10:29, Peter Dyballa wrote:
> 
>> Am 24.05.2025 um 01:37 schrieb Pádraig Brady <[email protected]>:
>>
>> I suspect the following will avoid the issue:
> 
> It does not:
> 
> 	/usr/bin/clang  -I. -I./lib  -Ilib -I./lib -Isrc -I./src -I/opt/local/include -mavx -mpclmul  -Wno-format-extra-args -Wno-tautological-constant-out-of-range-compare -pipe -Os -arch x86_64 -MT src/libcksum_pclmul_a-cksum_pclmul.o -MD -MP -MF src/.deps/libcksum_pclmul_a-cksum_pclmul.Tpo -c -o src/libcksum_pclmul_a-cksum_pclmul.o `test -f 'src/cksum_pclmul.c' || echo './'`src/cksum_pclmul.c
> 	src/cksum.c:190:30: error: invalid cpu feature string for builtin
> 	  bool avx512_enabled = (0 < __builtin_cpu_supports ("vpclmulqdq")
> 	                             ^                       ~~~~~~~~~~~~
> 	1 error generated.
> 	make[2]: *** [src/cksum-cksum.o] Error 1
> 
> 
> I then set GCC 14 as compiler to build (instead of Clang 17.0.6). The result is:
> 
> 	mv -f src/.deps/libcksum_avx2_a-cksum_avx2.Tpo src/.deps/libcksum_avx2_a-cksum_avx2.Po
> 	depbase=`echo src/ls-dir.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> 		/opt/local/bin/gcc-mp-14  -I. -I./lib  -Ilib -I./lib -Isrc -I./src -I/opt/local/include   -pipe -Os -arch x86_64 -MT src/ls-dir.o -MD -MP -MF $depbase.Tpo -c -o src/ls-dir.o src/ls-dir.c &&\
> 		mv -f $depbase.Tpo $depbase.Po
> 	<stdin>:59:2: error: instruction requires: AVX-512 ISA
> 	        vmovdqa64       lC0(%rip), %zmm0
> 	        ^

It seems like you may have a mismatch between compiler (flags)
used at configure time and build time.  These must match
so that code upsupported by your build is not enabled.
I'm surprised USE_AVX512_CRC32 is defined at all for you during your build?

thanks,
Pádraig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.