Open MongoCaleb opened 5 years ago
This is probably because it's using a clang++ version already on your system.
I had to change the LLVM path in ~/.emscripten to:
LLVM_ROOT = os.path.expanduser(os.getenv('LLVM', '/usr/local/Cellar/emscripten/1.38.22/libexec/llvm/bin/')) # directory
The homebrew install fails to compile make xwsolve.js for me for lack of Asyncify support:
Compiling: /Users/sam/developer/phil/third_party/glucose-3.0/simp/Main.o
shared:ERROR: ASYNCIFY has been removed from fastcomp. There is a new implementation which can be used in the upstream wasm backend.
The upstream Emscripten build also fails to compile with:
Fatal: local.get of unknown in arg0 of call to $emscripten_asm_const_int (used by EM_ASM* macros) in function $main.
This might be caused by aggressive compiler transformations. Consider using EM_JS instead.
I had your second error (and I'm not on a mac), but fixed it by installing an older version of Emscripten (sdk-1.37.20-64bit, the most recent version at this project's last commit). Building from the source I did
$ ./emsdk install sdk-1.37.20-64bit
$ ./emsdk activate sdk-1.37.20-64bit
$ source ./emsdk_env.sh
I had your second error (and I'm not on a mac), but fixed it by installing an older version of Emscripten (sdk-1.37.20-64bit, the most recent version at this project's last commit). Building from the source I did
$ ./emsdk install sdk-1.37.20-64bit $ ./emsdk activate sdk-1.37.20-64bit $ source ./emsdk_env.sh
That worked well, thanks @lothan
./emsdk install sdk-1.37.20-64bit
This version no longer seems to be available. Attempted to make xwsolve.js
but fails on the following versions I tried: latest
, 1.39.1
, and releases-upstream-048cf9424790cc525a7ea6da340820aae226f3b9-64bit
.
❯ make xwsolve.js ✔ 2925 19:46:37
Linking: xwsolve.js ( /Users/dalanmiller/repos/Phil/third_party/glucose-3.0/simp/Main.o /Users/dalanmiller/repos/Phil/third_party/glucose-3.0/simp/SimpSolver.o utils/Options.o utils/System.o core/Solver.o )
cache:INFO: generating system library: libc.a... (this will be cached in "/Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libc.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libc-wasm.a... (this will be cached in "/Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libc-wasm.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libdlmalloc.a... (this will be cached in "/Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libdlmalloc.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libpthreads_stub.a... (this will be cached in "/Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libpthreads_stub.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libcompiler_rt_wasm.a... (this will be cached in "/Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libcompiler_rt_wasm.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libc_rt_wasm.a... (this will be cached in "/Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libc_rt_wasm.a" for subsequent builds)
cache:INFO: - ok
wasm-ld: error: Bad relocation type:
shared:ERROR: '/Users/dalanmiller/repos/emsdk/upstream/bin/wasm-ld -o /tmp/emscripten_temp_5FbJON/xwsolve.wasm --allow-undefined --import-memory --import-table --lto-O0 /Users/dalanmiller/repos/Phil/third_party/glucose-3.0/simp/Main.o /Users/dalanmiller/repos/Phil/third_party/glucose-3.0/simp/SimpSolver.o /Users/dalanmiller/repos/Phil/third_party/glucose-3.0/simp/../utils/Options.o /Users/dalanmiller/repos/Phil/third_party/glucose-3.0/simp/../utils/System.o /Users/dalanmiller/repos/Phil/third_party/glucose-3.0/simp/../core/Solver.o /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libz.a /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libcompiler_rt.a /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libc.a /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libc-wasm.a /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libdlmalloc.a /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libpthreads_stub.a /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libcompiler_rt_wasm.a /Users/dalanmiller/repos/emsdk/upstream/emscripten/cache/wasm-obj/libc_rt_wasm.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export cancel --export main --export malloc --export free --export setThrew --export __errno_location -z stack-size=5242880 --initial-memory=16777216 --no-entry --global-base=1024' failed (1)
make: *** [xwsolve.js] Error 1
Running into this same error. Find any fixes, @dalanmiller ?
I'm also running into this same error as @lothan but any SDK previous to 1.39.1 is not installable for me. I tried the sdk's @dalanmiller mentioned but getting the same erros he posted. Anyone have any idea how to move forward?
Following the readme, I did
brew install emscripten
. When it was complete, I tried themake xwsolve.js
and receive the following: