cado-nfs fails to build on Apple Silicon Linux
When attempting to build cado-nfs on Fedora Asahi Spin, on an M1 Macbook Air (aarch64), some assembler errors occur.
The output of make cmake, then make is as follows:
maia@codrin:~/Downloads/cado-nfs$ make cmake
-- PREFIX=/home/maia/Downloads/cado-nfs/installed (from environment)
-- CFLAGS=-O2 (from environment)
-- CXXFLAGS=-O2 (from environment)
-- MAKE=make (from environment)
-- Configuring CADO revision df1b061f7
-- C compiler: GNU 13.2.1
-- C++ compiler: GNU 13.2.1
-- CFLAGS=-std=c99 -W -Wall -O2 (synthetized)
-- CXXFLAGS=-export-dynamic -std=c++17 -Wno-c++11-compat -W -Wall -O2 -Wno-literal-suffix (synthetized)
-- Adding /usr/lib64 to the search path for Gnu MP
-- GMP_INCDIR=/usr/include
-- GMP_LIBDIR=/usr/lib64
-- bits in unsigned long: 64
-- bits in unsigned long long: 64
-- uint64_t == unsigned long (exact match)
-- uint64_t == unsigned long long (compatibility match)
-- unsigned long long == unsigned long (compatibility match)
-- size_t == unsigned long (exact match)
-- size_t == unsigned long long (compatibility match)
-- mp_limb_t == unsigned long (exact match)
-- mp_limb_t == unsigned long long (compatibility match)
-- uint32_t == unsigned int (exact match)
-- int64_t == long (exact match)
-- int64_t == long long (compatibility match)
-- long long == long (compatibility match)
-- ssize_t == long (exact match)
-- ssize_t == long long (compatibility match)
-- int32_t == int (exact match)
-- mp_size_t == long long (compatibility match)
-- mp_size_t == long (exact match)
-- decltype(__mpz_struct::_mp_size) == int (exact match)
-- Checking the OS page size
-- Checking the OS page size -- 16384
-- Testing for gmp_random predictability
-- Testing for gmp_random predictability -- ok
-- Testing whether mmx code can be used
-- Testing whether mmx code can be used -- No
-- Testing whether sse2 code can be used
-- Testing whether sse2 code can be used -- No
-- Testing whether sse3 code can be used
-- Testing whether sse3 code can be used -- skipped
-- Testing whether ssse3 code can be used
-- Testing whether ssse3 code can be used -- skipped
-- Testing whether sse4.1 code can be used
-- Testing whether sse4.1 code can be used -- skipped
-- Testing whether popcnt code can be used
-- Testing whether popcnt code can be used -- skipped
-- Testing whether avx code can be used
-- Testing whether avx code can be used -- skipped
-- Testing whether avx2 code can be used
-- Testing whether avx2 code can be used -- skipped
-- Testing whether avx512f code can be used
-- Testing whether avx512f code can be used -- skipped
-- Testing whether avx512vl code can be used
-- Testing whether avx512vl code can be used -- skipped
-- Testing whether avx512dq code can be used
-- Testing whether avx512dq code can be used -- skipped
-- Testing whether pclmul code can be used
-- Testing whether pclmul code can be used -- skipped
-- Testing whether ARM NEON code can be used
-- Testing whether ARM NEON code can be used -- Yes
-- Trying to compile gcc-style x86_64 inline assembly
-- Trying to compile gcc-style x86_64 inline assembly -- Failed
-- Trying to compile gcc-style ARM inline assembly
-- Trying to compile gcc-style ARM inline assembly -- Failed
-- Trying to compile gas-syntax assembly sources
-- Trying to compile gas-syntax assembly sources -- Failed
-- Testing if the C library is GNU libc
-- Testing if the C library is GNU libc -- Success
-- Testing if the C library is musl libc
-- Testing if the C library is musl libc -- no
-- Looking for log2
-- Looking for log2 - requires m
-- Looking for exp2
-- Looking for exp2 - requires m
-- Looking for cabsl
-- Looking for cabsl - requires m
-- Looking for clog
-- Looking for clog - requires m
-- Testing whether posix_memalign exists and works -- yes
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for usleep
-- Looking for usleep - found
-- Looking for popen
-- Looking for popen - found
-- Looking for pclose
-- Looking for pclose - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for sigaction
-- Looking for sigaction - found
-- Looking for waitpid
-- Looking for waitpid - found
-- Looking for ctime_r
-- Looking for ctime_r - found
-- Looking for realpath
-- Looking for realpath - found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for wait4
-- Looking for wait4 - found
-- Testing whether RUSAGE_THREAD can be used
-- Trying to compile with RUSAGE_THREAD -- Success
-- Testing the existence of __sync_fetch functions
-- Testing the existence of __sync_fetch functions -- Success
-- Testing the existence of asprintf/vasprintf functions
-- Testing the existence of asprintf/vasprintf functions -- Success
-- Checking for MinGW
-- Checking for MinGW -- no
-- Testing if rand() gives true alea
-- Testing if rand() gives true alea -- Probably
-- Testing if srand() yields a deterministic sequence
-- Testing if srand() yields a deterministic sequence -- Yes
-- HWLOC_INCDIR=HWLOC_INCDIR-NOTFOUND
-- HWLOC_LIB=HWLOC_LIB-NOTFOUND
-- FMT_INCDIR=FMT_INCDIR-NOTFOUND
-- FMT_LIB=FMT_LIB-NOTFOUND
-- Using the embedded fmt library
-- GMPECM_INCDIR=GMPECM_INCDIR-NOTFOUND
-- GMPECM_LIB=GMPECM_LIB-NOTFOUND
-- /usr/bin/python3 --version returned: Python 3.12.0
-- Importing module sqlite3 in Python succeeded.
-- Perl version is 5.38.0
-- Testing whether C++11 alignas() can be used
-- Testing whether C++11 alignas() can be used -- yes
-- Testing whether __int128 is supported
-- Testing whether __int128 is supported -- Yes
-- Are we running some kind of static analysis tool?
-- Are we running some kind of static analysis tool? -- No
-- Checking for BSD/Linux execinfo interface
-- Checking for BSD/Linux execinfo interface -- Yes
-- Building with static libraries (ENABLE_SHARED="")
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Looking for pthread_barrier_wait
-- Looking for pthread_barrier_wait - found
-- MPI is not enabled
-- Using libs: (math) (pthreads)
-- Found linalg/m4ri source tree, but no ./configure there. Run autoreconf ?
-- Warning: DL mode forcibly disabled for linear algebra (amd64-only)
-- GF(2) arithmetic backend m128 not compiled in, sse-4.1 or popcnt support missing
-- GF(2) arithmetic backend enabled for factoring linear algebra: u64k1
-- GF(2) arithmetic backend enabled for factoring linear algebra: u64k2
-- GF(2) arithmetic backend enabled for factoring linear algebra: u64k3
-- GF(2) arithmetic backend enabled for factoring linear algebra: u64k4
-- GF(2) SpMV backends for linear algebra: bucket, basic, sliced
-- Test test_mpz_poly locks resources lock.0;lock.1
-- Test test_bwc_lingen_binary_test0 locks resources lock.0;lock.1
-- Test test_matpoly_u64k1 locks resources lock.1;lock.0
-- Test test_matpoly_basecase_u64k1 locks resources lock.0;lock.1
-- Test test_bwc_mod2_8k locks resources lock.0;lock.1
-- Main scripts will go to /home/maia/Downloads/cado-nfs/installed/bin
-- Libraries and binaries will go to /home/maia/Downloads/cado-nfs/installed/lib/cado-nfs-3.0.0
-- Data will go to /home/maia/Downloads/cado-nfs/installed/share/cado-nfs-3.0.0
-- Configuring done (4.0s)
-- Generating done (0.3s)
-- Build files have been written to: /home/maia/Downloads/cado-nfs/build/codrin
maia@codrin:~/Downloads/cado-nfs$ make
[ 0%] Building gf2x
Making all in lowlevel
Making all in src
Making all in .
/tmp/ccm4jlBd.s: Assembler messages:
/tmp/ccm4jlBd.s:389: Error: selected processor does not support `eor3 v0.16b,v0.16b,v1.16b,v2.16b'
/tmp/ccm4jlBd.s:447: Error: selected processor does not support `eor3 v4.16b,v4.16b,v2.16b,v1.16b'
/tmp/ccm4jlBd.s:502: Error: selected processor does not support `eor3 v0.16b,v4.16b,v2.16b,v0.16b'
/tmp/ccm4jlBd.s:505: Error: selected processor does not support `eor3 v4.16b,v4.16b,v1.16b,v2.16b'
/tmp/ccm4jlBd.s:570: Error: selected processor does not support `eor3 v1.16b,v1.16b,v7.16b,v4.16b'
/tmp/ccm4jlBd.s:572: Error: selected processor does not support `eor3 v0.16b,v0.16b,v4.16b,v6.16b'
/tmp/ccm4jlBd.s:577: Error: selected processor does not support `eor3 v2.16b,v2.16b,v4.16b,v3.16b'
/tmp/ccm4jlBd.s:903: Error: selected processor does not support `eor3 v2.16b,v2.16b,v0.16b,v3.16b'
/tmp/ccm4jlBd.s:904: Error: selected processor does not support `eor3 v1.16b,v5.16b,v4.16b,v1.16b'
/tmp/ccm4jlBd.s:907: Error: selected processor does not support `eor3 v0.16b,v6.16b,v0.16b,v16.16b'
/tmp/ccm4jlBd.s:912: Error: selected processor does not support `eor3 v3.16b,v3.16b,v5.16b,v4.16b'
/tmp/ccm4jlBd.s:962: Error: selected processor does not support `eor3 v1.16b,v1.16b,v2.16b,v7.16b'
/tmp/ccm4jlBd.s:965: Error: selected processor does not support `eor3 v0.16b,v0.16b,v1.16b,v6.16b'
/tmp/ccm4jlBd.s:969: Error: selected processor does not support `eor3 v0.16b,v0.16b,v2.16b,v7.16b'
/tmp/ccm4jlBd.s:973: Error: selected processor does not support `eor3 v0.16b,v0.16b,v1.16b,v6.16b'
/tmp/ccm4jlBd.s:1029: Error: selected processor does not support `eor3 v1.16b,v1.16b,v5.16b,v16.16b'
/tmp/ccm4jlBd.s:1031: Error: selected processor does not support `eor3 v2.16b,v2.16b,v16.16b,v4.16b'
/tmp/ccm4jlBd.s:1034: Error: selected processor does not support `eor3 v0.16b,v0.16b,v4.16b,v5.16b'
/tmp/ccm4jlBd.s:1082: Error: selected processor does not support `eor3 v3.16b,v3.16b,v21.16b,v2.16b'
/tmp/ccm4jlBd.s:1084: Error: selected processor does not support `eor3 v2.16b,v2.16b,v4.16b,v20.16b'
/tmp/ccm4jlBd.s:1087: Error: selected processor does not support `eor3 v0.16b,v0.16b,v4.16b,v19.16b'
/tmp/ccm4jlBd.s:1089: Error: selected processor does not support `eor3 v1.16b,v1.16b,v4.16b,v18.16b'
/tmp/ccm4jlBd.s:1098: Error: selected processor does not support `eor3 v3.16b,v4.16b,v3.16b,v5.16b'
make[5]: *** [Makefile:725: libgf2x_local_a-gf2x.o] Error 1
make[4]: *** [Makefile:911: all-recursive] Error 1
make[3]: *** [Makefile:540: all] Error 2
make[2]: *** [CMakeFiles/gf2x-build.dir/build.make:71: CMakeFiles/gf2x-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1279: CMakeFiles/gf2x-build.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
make: *** [Makefile:7: all] Error 2
OS: Fedora Linux Asahi Remix 39 (Thirty Nine) aarch64 Host: Apple MacBook Air (M1, 2020) Kernel: 6.5.11-404.asahi.fc39.aarch64+16k
Edited by Maia Karpovich