I was unable to install Emscripten following steps in official tutorial here: http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#sdk-download-and-install
I was getting these errors trying to run emcc
:
`WARNING:root:LLVM version appears incorrect (seeing "7.0", expected "3.7")`
`WARNING:root:could not check fastcomp: [Errno 2] No such file or directory`
`CRITICAL:root:Cannot find /usr/bin/llvm-link, check the paths in ~/.emscripten`
My setup is:
- OS X El Capitan 10.11.3 (15D21) with NodeJS under
nvm
- MacBook Pro 13" with Retina display, early 2015
- Download and untar Emscripten Portable SDK https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
- Run
./emsdk update
from the directory newly created bytar -xvf
on previous step ./emsdk list
and check that you seeclang-e1.35.0-64bit
,emscripten-1.35.0
andsdk-1.35.0-64bit
in the list./emsdk install sdk-1.35.0-64bit clang-e1.35.0-64bit emscripten-1.35.0
This will install Emscripten 1.35.0, Emscripten SDK itself 1.35.0, and Clang for Emscripten 1.35.0- Activate Emscripten's environment variables with the command:
./emsdk activate
- Run now:
./emcc emsdk_portable/emscripten/1.35.0/tests/hello_world.cpp
- Check that generated
a.out.js
appeared now in your current dir. - Run the program using NodeJS:
node a.out.js
. You will see the following:
MacBook-Pro-Vladimir:1.35.0 ignatev$ node a.out.js
hello, world!