martmists
07/19/2024, 11:42 AM> Task :cinteropSimdMacosArm64
Error: Exception in thread "main" org.jetbrains.kotlin.konan.KonanExternalToolFailure: The /Users/runner/.konan/dependencies/apple-llvm-20200714-macos-x64-essentials/bin/clang++ command returned non-zero exit code: 1.
output:
In file included from /Users/runner/work/ndarray.simd/ndarray.simd/src/lib/cpp/compare.cpp:1:
In file included from /Users/runner/work/ndarray.simd/ndarray.simd/src/lib/cpp/common.h:3:
In file included from /Users/runner/work/ndarray.simd/ndarray.simd/xsimd/include/xsimd/xsimd.hpp:56:
In file included from /Users/runner/work/ndarray.simd/ndarray.simd/xsimd/include/xsimd/arch/xsimd_scalar.hpp:16:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:321:5: error: <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
# error <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. \
^
I tried adding the following the the relevant cinterops but it also didn't work:
if (target.name.startsWith("macos")) {
extraOpts("-Xsource-compiler-option", "-isystem~/.konan/dependencies/apple-llvm-20200714-macos-${if (System.getProperty("os.arch") in arrayOf("amd64", "x86_64")) "x64" else "aarch64"}-essentials/lib/clang/11.1.0/include")
extraOpts("-Xsource-compiler-option", "-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk")
}