I tried installing Emscripten on the latest version Arch Linux but was unsuccessful. I recieved no errors during the installation process, but when I attempted to verify the installation it threw an error: "bash: ./emcc no such file or directory". To the best of my ability I followed the instrcutions at https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html.
Installation Steps:
1) Dependencies (GCC ships complete with Arch, so no need to install)
pacman -S cmake python2 nodejs git
2) Download and unzip emsdk-portable.tar.gz
mkdir emscripten && cd empscripten
tar -xvf emsdk-portable.tar.gz
3) Installation
cd emsdk-portable
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
source ./emsdk outputs:
Adding directories to PATH:
PATH += /home/myuser/emscripten/emsdk-portable
Setting environment variables:
EMSDK = /home/myuser/emscripten/emsdk-portable
EM_CONFIG = /home/myuser/.emscripten
Running echo $PATH outputs:
/home/myuser/emscripten/emsdk-portable:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
Running ./emcc -v or ./em++ -v outputs:
bash: ./emcc: No such file or directory
Any thoughts?
Here is my ~/.emscripten file:
import os
SPIDERMONKEY_ENGINE = ''
NODE_JS = 'node'
V8_ENGINE = ''
TEMP_DIR = '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
Most usually, a current directory (
.) is not added to thePATHvariable, AFAIK it is for security reasons, so don't add it yourself too. :) When someone executes./emcc, they specify the relative path to the program to be executed: "a programemccresiding precisely in the current directory".On the other hand, executing just
emcc(without the./prefix) means "iterate through the directories from thePATHvariable left-to-right and execute the first foundemccexecutable". When yousourcetheemsdk_env.shyou, among other things, adjust thePATHvariable.In comments you told that
which emcccannot find theemccexecutable. It is strange, but even when you manage to fix the installation problem, you have to most usually specifyemccon the command line without the./prefix.