-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
emcc command not found #5696
Comments
Hi, if you're inside emsdk folder please type:
What output do you see? |
source:
for the version I get this
when I do emcc -v outside that folder I get this
|
You always have to |
ok, that makes sense now, ty |
@gogoprog why do we need to that all the time in a new terminal session? it is so boring. |
@hon because there is nothing set magically: your default But of course you can set that up once for all by automatically calling the |
@gogoprog does't which emcc
/Users/hon/work/emsdk-portable/emscripten/incoming/emcc and the '/Users/hon/work/emsdk-portable/emscripten/incoming/emcc' is already set into $PATH (in .zshrc file) but it does't work... |
PATH contains directories instead of file paths. |
@hon yes How is it set in your |
➜ emsdk-portable echo $PATH
./node_modules/.bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/hon/work/go/bin:/usr/local/go/bin:/usr/local/nginx/sbin:/Users/hon/.cargo/bin:/Users/hon/Library/Android/sdk/build-tools/23.0.1:/Users/hon/rust/src:/Users/hon/Library/Android/sdk/tools:/Users/hon/Library/Android/sdk/platform-tools:/usr/local/bin:/usr/include/libxml2/:/Users/hon/work/emsdk-portable:/Users/hon/work/emsdk-portable/clang/fastcomp/build_incoming_64/bin:/User/hon/work/emsdk-portable/emscripten/incoming:/Users/hon/work/emsdk-portable/emscripten/incoming/emcc
➜ emsdk-portable emcc
zsh: command not found: emcc
➜ emsdk-portable the binary file is set in $PATH, but can not work. |
@hon You should add |
Also you better just do the following in your pushd path/to/emsdk
source ./emsdk_env.sh
popd So the |
@asria folder /Users/hon/work/emsdk-portable/emscripten/incoming/ is alreay in $PATH . ~/.zshrc what I wondering now is: the function of env path is make some binary file can be executed everywhere in the system, with out type the full path. since the path was in the $PATH, why |
Maybe you don't use ZSH, but the regular bash? Can you type |
➜ emscripten ps -p $$
PID TTY TIME CMD
33664 ttys001 0:00.58 -zsh |
Hm.. Interesting. Last call: in
|
Now it works, but every time in a new session, the console outputs: Last login: Tue Oct 24 17:03:49 on ttys004
~/work/emsdk-portable ~
Adding directories to PATH:
PATH += /Users/hon/work/emsdk-portable/node/4.1.1_64bit/bin
PATH += /Users/hon/work/emsdk-portable/emscripten/incoming
Setting environment variables:
EMSDK = /Users/hon/work/emsdk-portable
EM_CONFIG = /Users/hon/.emscripten
EMSCRIPTEN = /Users/hon/work/emsdk-portable/emscripten/incoming
/Users/hon/.zshrc:popd:151: directory stack empty
➜ ~ |
If you use the absolute path and |
ok, ty~ |
I have same issue, did everything but not able to fix it tonight. |
I have the same issue too. I followed this guide perfectly, it seems like it's incomplete: |
Is the issue that If that's it, I can open a PR to update their docs, but please let me know if that is indeed what's wrong. |
@kripken I tried emscripten docs too, but it seems not working. |
That's strange. To see if it's not something with how the PATH is set up, you can call emcc directly, without assuming it is in your path. If you are in the emsdk dir, you can find it with something like
And can then run it with copying that last line, in this example, |
For anyone having issues : |
I solved by adding this line to my .bash_profile file:
|
You need not to see these ugly logs every time when open a bash. The issue is because the command
Be careful, add |
Adding this to source ~/path-to-emsdk/emsdk_env.sh &> /dev/null |
add |
what worked in my case, is just login as root
|
Just a heads up for peeps. Installed via brew https://formulae.brew.sh/formula/emscripten#default and it all worked great out of the box. Worth a shot! |
emcc --version |
source ./emsdk_env.sh instead of using this try for windows |
In my case, I had not used the
|
Having a hell of a time getting emcc working on mac.
Having followed and ensured that all the requirements are installed, i can't seem to get emcc to run outside of the installed folder getting a command not found.
Are these steps correct?
http://webassembly.org/getting-started/developers-guide/
The text was updated successfully, but these errors were encountered: