Reputation: 31810
I am trying to install Emscripten on Ubuntu, but the official installation guide for Emscripten doesn't offer any instructions for installing Emscripten on Linux. The only advice that the installation guide has to offer is:
If you are on Linux, things should be very simple for you and there is no need for any additional guide.
I have read the README.md file in the Emscripten repository as well, and it doesn't offer any instructions for Ubuntu either. What steps will I need to follow in order to set up Emscripten on Ubuntu?
Upvotes: 11
Views: 9949
Reputation: 54879
Emscripten is a complex system of software tools with support for multiple platforms. As is typical for such systems, the getting-started instructions can be a bit cryptic. A first sad note is that just installing emscripten from the Ubuntu repos probably isn't your best bet, at least for now.
I got much of what I needed by downloading Portable Emscripten SDK for Linux and OS X, and following these steps from the included README.md file:
/emsdk update
. This will fetch the latest registry of available tools../emsdk install latest
. This will download and install the latest SDK tools../emsdk activate latest
. This will set up ~/.emscripten to point to the SDK.Note that the initial download is tiny, but running the steps above takes a while (on the order of an hour, but probably depends on Internet speeds) and uses about 13G of disk space.
I found that I also needed to install (on Ubuntu 14.04 LTS):
apt-get install nodejs-legacy
There may be other dependencies required, which will hopefully be easy to track down based on the error messages that you see.
Here's a simple example of how you might build and run a C++ program:
emsdk_portable/emscripten/tag-1.34.8/em++ hello.cpp -o temp.html
chromium-browser --new-window temp.html
Upvotes: 3
Reputation: 14052
For getting started with clang 3.2 I assume you are running Ubuntu 12.10. 13.04 already has clang 3.2 packaged, so I would recommend using these package(s).
There are two ways of getting them:
Installing/Upgrading selected packages of Ubuntu 13.04 (minor intrusive)
deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse
to your sources.sudo apt-get update
)sudo apt-get install clang-3.2
)Upgrade/Install Ubuntu to 13.04+
EDIT:
Update to current situation.
Upvotes: 7
Reputation: 1275
For Ubuntu 12.04 it is also very easy.
~/opt/dev/llvm
PATH="$PATH:/home/[your_profile]/opt/dev/llvm/clang3.2/bin"
thats all
if you get /usr/include/features.h:324:10: fatal error: 'bits/predefs.h' file not found
simply install sudo apt-get install libc6-dev-i386
Upvotes: 8