As described here, there were several more that needed links from -3.2 to normal.
Emscriptem fails to build sample, wants /usr/bin/opt
-
06-10-2022 - |
Domanda
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
Soluzione
Altri suggerimenti
Check /usr/bin installed files from llvm-3.2 package:
dpkg -L llvm-3.2 | grep /usr/bin/ | sort
Create sym-links without version number
sudo ln -s /usr/bin/llvm-ar-3.2 /usr/bin/llvm-ar ... sudo ln -s /usr/bin/opt-3.2 /usr/bin/opt
Note: Don't forget 5 files named no include "llvm-". ( bugpoint, c-index-test, llc, macho-dump, opt)
Check /usr/bin installed files from llvm-3.2-runtime package:
dpkg -L llvm-3.2-runtime | grep /usr/bin/ | sort
Create sym-link without version number:
sudo ln -s /usr/bin/lli-3.2 /usr/bin/lli
Run Emscripten:
emcc
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow