Search code examples
compilationubuntu-13.10emscriptenasm.js

Emscriptem fails to build sample, wants /usr/bin/opt


I installed Emscripten using the instructions here, with a few differences for 13.10:

Instead of compiling and setting up clang 3.2, installed from the repository since it's 3.2. (clang --version shows expected output)

Linked the llvm since the compiler didn't find it:

sudo ln -s /usr/bin/llvm-link-3.2 /usr/bin/llvm-link
sudo ln -s /usr/bin/llvm-ar-3.2 /usr/bin/llvm-ar

But now I get an error about the nonexistence of /usr/bin/opt, even though ~/.emscripten has no mention of that directory:

$ ./em++ tests/hello_world.cpp
WARNING  root: LLVM version appears incorrect (seeing "version", expected "3.2")
INFO     root: (Emscripten: Running sanity checks)
CRITICAL root: Cannot find /usr/bin/opt, check the paths in ~/.emscripten

Solution

  • As described here, there were several more that needed links from -3.2 to normal.