Reputation:
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]
Upvotes: 2
Views: 5343
Reputation: 754
Most usually, a current directory (.
) is not added to the PATH
variable, 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 program emcc
residing precisely in the current directory".
On the other hand, executing just emcc
(without the ./
prefix) means "iterate through the directories from the PATH
variable left-to-right and execute the first found emcc
executable". When you source
the emsdk_env.sh
you, among other things, adjust the PATH
variable.
In comments you told that which emcc
cannot find the emcc
executable. It is strange, but even when you manage to fix the installation problem, you have to most usually specify emcc
on the command line without the ./
prefix.
Upvotes: 5