Cannot build on Apple M1
System Info
Model Name: Mac mini
Model Identifier: Macmini9,1
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
System Firmware Version: 6723.120.36
OS Loader Version: 6723.120.36
System Version: macOS 11.4 (20F71)
Kernel Version: Darwin 20.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal
jairon@jairons-Mac-mini Scratch % git clone https://github.com/shibatch/sleef
Git Clone Output
``` Cloning into 'sleef'... remote: Enumerating objects: 4865, done. remote: Counting objects: 100% (170/170), done. remote: Compressing objects: 100% (124/124), done. remote: Total 4865 (delta 97), reused 86 (delta 46), pack-reused 4695 Receiving objects: 100% (4865/4865), 4.70 MiB | 5.93 MiB/s, done. Resolving deltas: 100% (3821/3821), done. ```
jairon@jairons-Mac-mini Scratch % cd sleef && mkdir build && cd build
jairon@jairons-Mac-mini build % cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=FALSE -DBUILD_DFT=FALSE -DBUILD_GNUABI_LIBS=FALSE -DBUILD_QUAD=FALSE -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
Cmake Output
-- The C compiler identification is AppleClang 12.0.5.12050022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long double
-- Check size of long double - done
-- Performing Test COMPILER_SUPPORTS_FLOAT128
-- Performing Test COMPILER_SUPPORTS_FLOAT128 - Failed
-- Performing Test COMPILER_SUPPORTS_SVE
-- Performing Test COMPILER_SUPPORTS_SVE - Success
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND)
-- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES
-- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES - Failed
-- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH
-- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH - Success
-- Performing Test COMPILER_SUPPORTS_SYS_GETRANDOM
-- Performing Test COMPILER_SUPPORTS_SYS_GETRANDOM - Failed
-- Configuring build for SLEEF-v3.6.0
Target system: Darwin-20.5.0
Target processor: arm64
Host system: Darwin-20.5.0
Host processor: arm64
Detected C compiler: AppleClang @ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
CMake: 3.20.2
Make program: /usr/bin/make
-- Using option `-Wall -Wno-unused-function -Wno-attributes -Wno-unused-result -ffp-contract=off -fno-math-errno -fno-trapping-math` to compile libsleef
-- Building shared libs : FALSE
-- Building static test bins: OFF
-- MPFR : LIB_MPFR-NOTFOUND
-- GMP : LIBGMP-NOTFOUND
-- RT :
-- FFTW3 : LIBFFTW3-NOTFOUND
-- OPENSSL :
-- SDE : SDE_COMMAND-NOTFOUND
-- RUNNING_ON_TRAVIS :
-- COMPILER_SUPPORTS_OPENMP :
-- Building SLEEF with VLA SVE support
*** Note: Parallel build is only supported with Ninja ***
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jairon/Scratch/sleef/build
jairon@jairons-Mac-mini build % make -j 1
See make-log.md
Last bunch of lines from Make
[ 35%] Built target sleefadvsimd
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f src/libm/CMakeFiles/renameSVE.h_generated.dir/build.make src/libm/CMakeFiles/renameSVE.h_generated.dir/depend
cd /Users/jairon/Scratch/sleef/build && /opt/homebrew/Cellar/cmake/3.20.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/jairon/Scratch/sleef /Users/jairon/Scratch/sleef/src/libm /Users/jairon/Scratch/sleef/build /Users/jairon/Scratch/sleef/build/src/libm /Users/jairon/Scratch/sleef/build/src/libm/CMakeFiles/renameSVE.h_generated.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f src/libm/CMakeFiles/renameSVE.h_generated.dir/build.make src/libm/CMakeFiles/renameSVE.h_generated.dir/build
make[2]: Nothing to be done for `src/libm/CMakeFiles/renameSVE.h_generated.dir/build'.
[ 36%] Built target renameSVE.h_generated
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f src/libm/CMakeFiles/sleefsve.dir/build.make src/libm/CMakeFiles/sleefsve.dir/depend
cd /Users/jairon/Scratch/sleef/build && /opt/homebrew/Cellar/cmake/3.20.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/jairon/Scratch/sleef /Users/jairon/Scratch/sleef/src/libm /Users/jairon/Scratch/sleef/build /Users/jairon/Scratch/sleef/build/src/libm /Users/jairon/Scratch/sleef/build/src/libm/CMakeFiles/sleefsve.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f src/libm/CMakeFiles/sleefsve.dir/build.make src/libm/CMakeFiles/sleefsve.dir/build
[ 36%] Building C object src/libm/CMakeFiles/sleefsve.dir/sleefsimdsp.c.o
cd /Users/jairon/Scratch/sleef/build/src/libm && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DDORENAME=1 -DENABLE_BUILTIN_MATH=1 -DENABLE_SVE=1 -DSLEEF_STATIC_LIBS=1 -I/Users/jairon/Scratch/sleef/src/common -I/Users/jairon/Scratch/sleef/src/arch -I/Users/jairon/Scratch/sleef/build/src/libm/include -I/Users/jairon/Scratch/sleef/src/libm -Wall -Wno-unused-function -Wno-attributes -Wno-unused-result -ffp-contract=off -fno-math-errno -fno-trapping-math -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -march=armv8-a+sve -std=gnu99 -MD -MT src/libm/CMakeFiles/sleefsve.dir/sleefsimdsp.c.o -MF CMakeFiles/sleefsve.dir/sleefsimdsp.c.o.d -o CMakeFiles/sleefsve.dir/sleefsimdsp.c.o -c /Users/jairon/Scratch/sleef/src/libm/sleefsimdsp.c
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: aarch64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/3b/zy6vnsjd4jbg8rdmm18vjcbr0000gn/T/sleefsimdsp-15f95c.c
clang: note: diagnostic msg: /var/folders/3b/zy6vnsjd4jbg8rdmm18vjcbr0000gn/T/sleefsimdsp-15f95c.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/jairon/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:
********************
make[2]: *** [src/libm/CMakeFiles/sleefsve.dir/sleefsimdsp.c.o] Error 254
make[1]: *** [src/libm/CMakeFiles/sleefsve.dir/all] Error 2
make: *** [all] Error 2
jairon@jairons-Mac-mini build %
Using -v suggestion
jairon@jairons-Mac-mini build % cd /Users/jairon/Scratch/sleef/build/src/libm && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -v -DDORENAME=1 -DENABLE_BUILTIN_MATH=1 -DENABLE_SVE=1 -DSLEEF_STATIC_LIBS=1 -I/Users/jairon/Scratch/sleef/src/common -I/Users/jairon/Scratch/sleef/src/arch -I/Users/jairon/Scratch/sleef/build/src/libm/include -I/Users/jairon/Scratch/sleef/src/libm -Wall -Wno-unused-function -Wno-attributes -Wno-unused-result -ffp-contract=off -fno-math-errno -fno-trapping-math -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -march=armv8-a+sve -std=gnu99 -MD -MT src/libm/CMakeFiles/sleefsve.dir/sleefsimdsp.c.o -MF CMakeFiles/sleefsve.dir/sleefsimdsp.c.o.d -o CMakeFiles/sleefsve.dir/sleefsimdsp.c.o -c /Users/jairon/Scratch/sleef/src/libm/sleefsimdsp.c
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: aarch64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple arm64-apple-macosx11.0.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name sleefsimdsp.c -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -fno-trapping-math -ffp-contract=off -fno-rounding-math -ffp-exception-behavior=ignore -munwind-tables -target-sdk-version=11.3 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-a12 -target-feature +neon -target-feature +sve -target-feature +zcm -target-feature +zcz -target-abi darwinpcs -fallow-half-arguments-and-returns -debugger-tuning=lldb -target-linker-version 650.9 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5 -dependency-file CMakeFiles/sleefsve.dir/sleefsimdsp.c.o.d -skip-unused-modulemap-deps -MT src/libm/CMakeFiles/sleefsve.dir/sleefsimdsp.c.o -sys-header-deps -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -D DORENAME=1 -D ENABLE_BUILTIN_MATH=1 -D ENABLE_SVE=1 -D SLEEF_STATIC_LIBS=1 -I /Users/jairon/Scratch/sleef/src/common -I /Users/jairon/Scratch/sleef/src/arch -I /Users/jairon/Scratch/sleef/build/src/libm/include -I /Users/jairon/Scratch/sleef/src/libm -D NDEBUG -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -O3 -Wall -Wno-unused-function -Wno-attributes -Wno-unused-result -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -std=gnu99 -fdebug-compilation-dir /Users/jairon/Scratch/sleef/build/src/libm -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcommon -fcolor-diagnostics -vectorize-loops -vectorize-slp -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -mllvm -disable-aligned-alloc-awareness=1 -o CMakeFiles/sleefsve.dir/sleefsimdsp.c.o -x c /Users/jairon/Scratch/sleef/src/libm/sleefsimdsp.c
clang -cc1 version 12.0.5 (clang-1205.0.22.9) default target arm64-apple-darwin20.5.0
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/Users/jairon/Scratch/sleef/src/common
/Users/jairon/Scratch/sleef/src/arch
/Users/jairon/Scratch/sleef/build/src/libm/include
/Users/jairon/Scratch/sleef/src/libm
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: aarch64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/3b/zy6vnsjd4jbg8rdmm18vjcbr0000gn/T/sleefsimdsp-11d45e.c
clang: note: diagnostic msg: /var/folders/3b/zy6vnsjd4jbg8rdmm18vjcbr0000gn/T/sleefsimdsp-11d45e.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/jairon/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:
********************
If this is just a clang compiler error then I'll submit a bug report - but I just want to cover the possibilities.
I don't have access to M1 mac. So, I cannot check. Cross compilation for M1 mac should work, though.
The crash seems to have been fixed with Xcode 13, but the build still fails.
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:7:2: error: Please specify -mfpu=neon.
#error Please specify -mfpu=neon.
^
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:33:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/arm_neon.h:32:2: error: "NEON support not enabled"
#error "NEON support not enabled"
^
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:38:9: error: unknown type name 'uint32x4_t'; did you mean 'uint32_t'?
typedef uint32x4_t vmask;
^~~~~~~~~~
uint32_t
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/_types/_uint32_t.h:31:22: note: 'uint32_t' declared here
typedef unsigned int uint32_t;
^
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:39:9: error: unknown type name 'uint32x4_t'; did you mean 'uint32_t'?
typedef uint32x4_t vopmask;
^~~~~~~~~~
uint32_t
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/_types/_uint32_t.h:31:22: note: 'uint32_t' declared here
typedef unsigned int uint32_t;
^
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:43:9: error: unknown type name 'float32x4_t'
typedef float32x4_t vfloat;
^
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:44:9: error: unknown type name 'int32x4_t'; did you mean 'int32_t'?
typedef int32x4_t vint2;
^~~~~~~~~
int32_t
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/_types/_int32_t.h:30:33: note: 'int32_t' declared here
typedef int int32_t;
^
cd /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm && ../../bin/addSuffix /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm/sleefPURECFMA_SCALAR.h.tmp6 /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/keywords.txt _purecfma_scalar_sleef > /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/include/sleefinline_purecfma_scalar.h
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:51:3: error: unknown type name 'uint32x2_t'; did you mean 'uint32_t'?
uint32x2_t x0 = vand_u32(vget_low_u32(g), vget_high_u32(g));
^~~~~~~~~~
uint32_t
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/_types/_uint32_t.h:31:22: note: 'uint32_t' declared here
typedef unsigned int uint32_t;
^
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:52:3: error: unknown type name 'uint32x2_t'; did you mean 'uint32_t'?
uint32x2_t x1 = vpmin_u32(x0, x0);
^~~~~~~~~~
uint32_t
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/_types/_uint32_t.h:31:22: note: 'uint32_t' declared here
typedef unsigned int uint32_t;
^
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:84:74: error: member reference base type 'int' is not a structure or union
static INLINE vopmask vcast_vo32_vo64(vopmask m) { return vuzpq_u32(m, m).val[0]; }
~~~~~~~~~~~~~~~^~~~
cd /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm && ../../bin/addSuffix /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm/sleefPURECFMA_SCALAR.h.tmp6 /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/keywords.txt _purecfma_scalar_sleef > /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/include/sleefinline_purecfma_scalar.h
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:85:74: error: member reference base type 'int' is not a structure or union
static INLINE vopmask vcast_vo64_vo32(vopmask m) { return vzipq_u32(m, m).val[0]; }
~~~~~~~~~~~~~~~^~~~
cd /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm && /usr/bin/sed -e s/%VERSION%/3.5.1/g /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefinline_header.h.org > /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm/sleefPUREC_SCALAR.h.tmp4
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:91:3: error: unknown type name 'uint32x4_t'; did you mean 'uint32_t'?
uint32x4_t t = vceqq_u32(x, y);
^~~~~~~~~~
uint32_t
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/_types/_uint32_t.h:31:22: note: 'uint32_t' declared here
typedef unsigned int uint32_t;
^
In file included from /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/sleefsimdsp.c:176:
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:100:38: error: use of undeclared identifier 'float32x4_t'
return vcvtq_s32_f32(vaddq_f32(d, (float32x4_t)vorrq_u32(vandq_u32((uint32x4_t)d, (uint32x4_t)vdupq_n_f32(-0.0f)), (uint32x4_t)vdupq_n_f32(0.5f))));
^
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:164:3: error: use of undeclared identifier 'float32x4_t'
float32x4_t x = vrecpeq_f32(d);
^
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:165:3: error: use of undeclared identifier 'x'
x = vmulq_f32(x, vrecpsq_f32(d, x));
^
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:165:17: error: use of undeclared identifier 'x'
x = vmulq_f32(x, vrecpsq_f32(d, x));
^
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:165:35: error: use of undeclared identifier 'x'
x = vmulq_f32(x, vrecpsq_f32(d, x));
^
cd /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm && ../../bin/addSuffix /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/src/libm/sleefPURECFMA_SCALAR.h.tmp6 /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/libm/keywords.txt _purecfma_scalar_sleef > /tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/build/include/sleefinline_purecfma_scalar.h
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:166:3: error: use of undeclared identifier 'float32x4_t'
float32x4_t t = vmulq_f32(n, x);
^
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:167:30: error: use of undeclared identifier 't'
return vmlsq_f32(vaddq_f32(t, t), vmulq_f32(t, x), d);
^
/tmp/sleef-20211107-6741-1f4kyvw/sleef-3.5.1/src/arch/helperneon32.h:167:33: error: use of undeclared identifier 't'
return vmlsq_f32(vaddq_f32(t, t), vmulq_f32(t, x), d);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
I'm not sure if we're just configuring the build wrong, but here's our CMake invocation for reference:
==> cmake .. -DBUILD_INLINE_HEADERS=TRUE -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/sleef/3.5.1 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DBUILD_TESTING=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
Build logs are here:
Monterey: https://github.com/Homebrew/homebrew-core/runs/4129812435?check_suite_focus=true Big Sur: https://github.com/Homebrew/homebrew-core/runs/4129812451?check_suite_focus=true
This was encountered at Homebrew/homebrew-core#88923.
Let me know if there's anything I can do to help fix this.
clang-13 from Homebrew gives this.
-
parser at end of file - Code generation
- Running pass 'Function Pass Manager' on module '/Users/conrad/conrad_code/src/sleef/src/libm/sleefsimdsp.c'.
- Running pass 'AArch64 Instruction Selection' on function '@Sleef_ilogbfx_svenofma'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var
LLVM_SYMBOLIZER_PATHto point to it): 0 libLLVM.dylib 0x00000001118e1894 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56 1 libLLVM.dylib 0x00000001118e0cdc llvm::sys::CleanupOnSignal(unsigned long) + 252 2 libLLVM.dylib 0x000000011406b474 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) + 92 3 libLLVM.dylib 0x000000011406b574 CrashRecoverySignalHandler(int) + 124 4 libsystem_platform.dylib 0x00000001b17494c4 _sigtramp + 56 5 libLLVM.dylib 0x0000000112f52800 llvm::AArch64TargetLowering::LowerFormalArguments(llvm::SDValue, unsigned int, bool, llvm::SmallVectorImplllvm::ISD::InputArg const&, llvm::SDLoc const&, llvm::SelectionDAG&, llvm::SmallVectorImplllvm::SDValue&) const + 3272 6 libLLVM.dylib 0x0000000112f52800 llvm::AArch64TargetLowering::LowerFormalArguments(llvm::SDValue, unsigned int, bool, llvm::SmallVectorImplllvm::ISD::InputArg const&, llvm::SDLoc const&, llvm::SelectionDAG&, llvm::SmallVectorImplllvm::SDValue&) const + 3272 7 libLLVM.dylib 0x0000000111f3c774 llvm::SelectionDAGISel::LowerArguments(llvm::Function const&) + 3284 8 libLLVM.dylib 0x0000000111f8be2c llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 512 9 libLLVM.dylib 0x0000000111f8b084 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1712 10 libLLVM.dylib 0x0000000111bf79e0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 304 11 libLLVM.dylib 0x0000000111a1774c llvm::FPPassManager::runOnModule(llvm::Module&) + 2600 12 libLLVM.dylib 0x0000000111a0f43c llvm::legacy::PassManagerImpl::run(llvm::Module&) + 864 13 libclang-cpp.dylib 0x0000000109022230 (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_deletellvm::raw_pwrite_stream >) + 8320 14 libclang-cpp.dylib 0x000000010901d5d0 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_deletellvm::raw_pwrite_stream >) + 624 15 libclang-cpp.dylib 0x00000001092d4074 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 812 16 libclang-cpp.dylib 0x00000001082b3e14 clang::ParseAST(clang::Sema&, bool, bool) + 504 17 libclang-cpp.dylib 0x00000001099153d0 clang::FrontendAction::Execute() + 96 18 libclang-cpp.dylib 0x0000000109896224 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 556 19 libclang-cpp.dylib 0x0000000109968a28 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1140 20 clang-13 0x0000000104822fcc cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1408 21 clang-13 0x0000000104821be4 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 800 22 libclang-cpp.dylib 0x00000001095899dc void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, bool) const::$_1>(long) + 28 23 libLLVM.dylib 0x000000011182d8ac llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 248 24 libclang-cpp.dylib 0x0000000109589548 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, bool) const + 264 25 libclang-cpp.dylib 0x000000010955a0f0 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const + 536 26 libclang-cpp.dylib 0x000000010955a504 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) const + 88 27 libclang-cpp.dylib 0x0000000109571ca0 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) + 192 28 clang-13 0x0000000104820f58 main + 11040 29 dyld 0x000000010498d088 start + 516 clang-13: error: clang frontend command failed with exit code 139 (use -v to see invocation) Homebrew clang version 13.0.1 Target: arm64-apple-darwin21.4.0 Thread model: posix InstalledDir: /opt/homebrew/Cellar/llvm/13.0.1_1/bin clang-13: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-13: note: diagnostic msg: /var/folders/f1/g7y7lrqx7md1cf2ycb3b4xd80000gn/T/sleefsimdsp-8ebd29.c clang-13: note: diagnostic msg: /var/folders/f1/g7y7lrqx7md1cf2ycb3b4xd80000gn/T/sleefsimdsp-8ebd29.sh clang-13: note: diagnostic msg: Crash backtrace is located in
Hi! This might be as simple as there is no Apple Silicon/Mac with SVE, so Darwin does not support SVE (see #474). We are about to disable SVE when on Darwin, see #512. Alternatively, you can disable it explicitly with -DSLEEF_DISABLE_SVE=ON.
I'm closing this issue, feel free to re-open if you think #512 did not fix your issue.