Open AHaliq opened 2 years ago
I've made some progress investigating this issue,
in zm2.cpp
line 8, Xbyak
is only included if MIE_USE_X64ASM
is set
in zm.h
line 68, MIE_USE_X64ASM
is unset when __x86_64__
is unset
In emscripten's faq site it says
Emscripten automatically unsets the following #define values, as these are commonly set in projects to enable platform dependent code (inline assembly):
#undef __i386__
#undef __x86_64__
in zm.h
since there is a case for without __x86_64__
does that mean there is an alternative ways to build the project or is that case unhandled and cannot build the project?
I'm having the same problem. My machine:
macOS Monterey -- version 12.1 (21C52)
Apple M1 Max
@AHaliq Have you managed to figure out a solution to this? Are you using an Apple Silicon machine?
@malturki libff uses ate-pairing and xbyak which contains inline assembly thus cant be compiled by emscripten. You should look for alternatives or fork this project and use other dependencies such as mcl
I havent tried it myself. The project i was working on has been handed over to someone else.
Thanks @AHaliq for the prompt response. I will probably look into alternatives.
It would have been helpful to have a list of supported (or unsupported) architectures given up front in the README.
My machine:
I'm compiling libff with emscripten targetting webassembly and I'm getting the following error upon running
make
Inspecting
zm2.cpp
, we can see this only happens ifMIE_USE_X64ASM
is set to falseyou can view my full project here to reproduce the issue: https://github.com/AHaliq/WebAssemblyReact emscripten call starts at
scripts/cryptoutils.sh
line 49 cryptoutils adds libff atdeps/cryptoutils/src/CMakeLists.txt
line 14