Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscripten errors on installing #17

Open
MongoCaleb opened this issue Sep 7, 2018 · 7 comments
Open

Emscripten errors on installing #17

MongoCaleb opened this issue Sep 7, 2018 · 7 comments

Comments

@MongoCaleb
Copy link

Following the readme, I did brew install emscripten. When it was complete, I tried the make xwsolve.js and receive the following:

third_party/glucose-3.0/simp  master ✔                                                                                                                   156d
➢ make xwsolve.js
Compiling: /Users/caleb/Documents/git/thompsch/Phil/third_party/glucose-3.0/simp/Main.o
WARNING:root:LLVM version appears incorrect (seeing "9.1", expected "6.0")
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================
(no targets could be identified: [Errno 2] No such file or directory)
===========================================================================
CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
ERROR:root:Cannot find /usr/bin/llvm-link, check the paths in ~/.emscripten
make: *** [/Users/caleb/Documents/git/thompsch/Phil/third_party/glucose-3.0/simp/Main.o] Error 1
@legion80
Copy link

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

@szeidman
Copy link

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.

@lothan
Copy link

lothan commented Nov 2, 2019

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

@szeidman
Copy link

szeidman commented Nov 4, 2019

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

@dalanmiller
Copy link

dalanmiller commented Jun 23, 2020

./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

@chloearianne
Copy link

Running into this same error. Find any fixes, @dalanmiller ?

@FaritaTasnim
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants