Receiving an assembly compilation error when trying to build cfd-js. Shown below. The error has to do with libwally, but I can successfully build libwally directly with the same environment. Any ideas?
FAILED: libwally-core/build/CMakeFiles/wally.dir/src/secp256k1/src/secp256k1.c.o
/usr/local/bin/ccache /usr/local/bin/ccache /usr/local/bin/ccache /usr/local/opt/ccache/libexec/cc -DBUILD_ELEMENTS -DHAVE_CONFIG_H -DSECP256K1_BUILD -DWALLY_CORE_BUILD -Dwally_EXPORTS -I/Users/user/Proj/dlc/cfd-js/external/libwally-core/include -I/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/include -I/Users/user/Proj/dlc/cfd-js/build/libwally-core/build -I/Users/user/Proj/dlc/cfd-js/external/libwally-core/. -I/Users/user/Proj/dlc/cfd-js/external/libwally-core/src -I/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/ccan -I/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1 -I/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -Wall -Wextra -Wno-unused-function -MD -MT libwally-core/build/CMakeFiles/wally.dir/src/secp256k1/src/secp256k1.c.o -MF libwally-core/build/CMakeFiles/wally.dir/src/secp256k1/src/secp256k1.c.o.d -o libwally-core/build/CMakeFiles/wally.dir/src/secp256k1/src/secp256k1.c.o -c /Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/secp256k1.c
/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/secp256k1.c:7:9: warning: 'SECP256K1_BUILD' macro redefined [-Wmacro-redefined]
#define SECP256K1_BUILD
^
<command line>:3:9: note: previous definition is here
#define SECP256K1_BUILD 1
^
In file included from /Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/secp256k1.c:14:
In file included from /Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/field_impl.h:17:
In file included from /Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/field_5x52_impl.h:19:
/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/field_5x52_asm_impl.h:282:3: error: invalid input constraint 'b' in asm
: "b"(b), "D"(r)
^
/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/field_5x52_asm_impl.h:497:3: error: invalid input constraint 'D' in asm
: "D"(r)
^
In file included from /Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/secp256k1.c:15:
In file included from /Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/scalar_impl.h:24:
/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/scalar_4x64_impl.h:370:7: error: unknown register name 'rax' in asm
: "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc");
^
/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/scalar_4x64_impl.h:449:7: error: unknown register name 'rax' in asm
: "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "cc");
^
/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/scalar_4x64_impl.h:494:52: error: invalid input constraint 'D' in asm
: "g"(p0), "g"(p1), "g"(p2), "g"(p3), "g"(p4), "D"(r), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
^
/Users/user/Proj/dlc/cfd-js/external/libwally-core/src/secp256k1/src/scalar_4x64_impl.h:699:7: error: invalid output constraint '+d' in asm
: "+d"(pb)
^
1 warning and 6 errors generated.
[48/212] Building CXX object googletest/build/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
ninja: build stopped: subcommand failed.
ERR! OMG Process terminated: 1
ERROR: "cmake_compile" exited with 1.
ERROR: "install_cmake" exited with 1.
npm ERR! code 1
npm ERR! path /Users/user/Proj/dlc/cfd-js
npm ERR! command failed
npm ERR! command sh -c prebuild-install --runtime napi --verbose || run-s install_cmake
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2022-07-25T13_32_31_534Z-debug-0.log
Overview
Receiving an assembly compilation error when trying to build cfd-js. Shown below. The error has to do with libwally, but I can successfully build libwally directly with the same environment. Any ideas?
System Details
OS: OSX
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
LLVM Version: 13.0.0