I want to install the latest emscripten in ubuntu for playing with WebAssembly using the following command.
sudo apt-get install emscripten
But it gives me the version 1.22.1 which is a version in 2014 and do not support WebAssembly compiling.
$ emcc --version
emcc (Emscripten GCC-like replacement) 1.22.1 ()
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Are there a simple guide for installing the latest emscripten in command line?
The installation instructions suggest: download emsdk-portable.tar.gz
Unzip it, then open a terminal and run:
see: http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#installation-instructions for more information
It is not enough to build a newer version of emscripten. You will also have to build LLVM yourself, as emscripten will complain about
I got it running by following the tutorial on building LLVM at http://llvm.org/docs/GettingStarted.html and some hints from https://github.com/kripken/emscripten/wiki/New-WebAssembly-Backend
And then following the tutorial on building emscripten at http://webassembly.org/getting-started/developers-guide/
From the emscripten's doc page [ from the ground zero ]
1. Get the emsdk repo
2. Enter that directory
3. Download and install the latest SDK tools
4. Make the "latest" SDK "active"
5. Activate PATH and other environment variables
The environment variables:
EMSDK = < path to emsdk dir >
EM_CONFIG = ~/.emscripten
EMSDK_NODE = < path to emsdk dir >/node/12.9.1_64bit/bin/node
6. Now just try it!