emcc not found,

570 views
Skip to first unread message

David Ciro Taborda

unread,
Nov 19, 2021, 12:33:06 PM11/19/21
to emscripten-discuss
Hello people,
I am trying to install emscripten in my desktop with Ubuntu 20.04.2 LTS. I followed the package documentation in
Everything follows as expected, however after I set the environment variables using source ./emsdk_env.sh nothing happens. The compiler emcc is not found by the system and ./emcc --check returns ./emcc: No such file or directory.

I have followed the same procedure in a PopOS laptop without any problem. Do you have any suggestion to identify the problem?

Thanks!

Sam Clegg

unread,
Nov 19, 2021, 1:07:38 PM11/19/21
to emscripte...@googlegroups.com
What does `source ./emsdk_env.sh` output? 

What does `which emcc` say after you run that command?

Does the `upstream/emscripten` directory exist within `emsdk`?   Does `upstream/emscripten/emcc` exist?

If this problem persists can you open an issue in the emsdk repo?

cheers,
sam

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/dc9ef998-0e30-4015-bf2b-03531ac83ac5n%40googlegroups.com.

David Ciro Taborda

unread,
Nov 19, 2021, 1:35:11 PM11/19/21
to emscripte...@googlegroups.com
Thanks for your response:

after running source ./emsdk_env.sh in the emsdk folder I get:

Adding directories to PATH:
PATH += /home/david/WebDev/emsdk
PATH += /home/david/WebDev/emsdk/upstream/emscripten
PATH += /home/david/WebDev/emsdk/node/14.15.5_64bit/bin

Setting environment variables:
PATH = /home/david/WebDev/emsdk:/home/david/WebDev/emsdk/upstream/emscripten:/home/david/WebDev/emsdk/node/14.15.5_64bit/bin:/home/david/gopath:/home/david/gopath/bin:/home/david/anaconda3/bin:/home/david/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
EMSDK = /home/david/WebDev/emsdk
EM_CONFIG = /home/david/WebDev/emsdk/.emscripten
EMSDK_NODE = /home/david/WebDev/emsdk/node/14.15.5_64bit/bin/node


Then, the which emcc command returns the correct location of the binary:

/home/david/WebDev/emsdk/upstream/emscripten/emcc

Also, the `upstream/emscripten` directory exists within `emsdk`   and contains the binary emcc

It appears that the emsdk_env.sh script is not setting the paths globally. I opened a different terminal and the command which emcc replied with an empty line, the installation appears to be OK.

Additionally, there is a typo in https://emscripten.org/docs/building_from_source/verify_emscripten_environment.html#sanity-tests. The command does not require ./

You have pointed me in the right direction. I will figure how to set the environment globally.

David Ciro Taborda

unread,
Nov 19, 2021, 1:42:31 PM11/19/21
to emscripten-discuss
Actually the comments in source ./emsdk_env.sh are clear about setting the paths for the current terminal alone. I did not read thoroughly before running the script.

Thanks!

Reply all
Reply to author
Forward
0 new messages