Emscripten paths [Kinda Solved]


I'm trying to run the Gotham.rs example but I'm having this error occur:

error: could not exec the linker cc: No such file or directory (os error 2)

This isn't a Gotham issue, but I'm not sure of the problem having looked around for other questions. I'm running MacOS and installed rust as per the book:

Installing on Linux or Mac
If you’re on Linux or a Mac, all you need to do is open a terminal and type this:

$ curl https://sh.rustup.rs -sSf | sh
This will download a script and start the installation. You may be prompted for your password. If it all goes well, you’ll see this appear:

Rust is installed now. Great!

The only thing I've done recently to my Mac installation is set it up to use YEW. Which is:

$ cargo install cargo-web

$ rustup target add asmjs-unknown-emscripten

I also installed emscripten:

// will need cmake to build emsdk emscripten
$ brew install cmake

// download, install, activate emsdk
$ curl https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
// naviagte to the directory
$ source ./emsdk_env.sh

$ emsdk update
$ emsdk install sdk-incoming-64bit
$ emsdk activate sdk-incoming-64bit

I also added these paths to my profile, so I didn't have to activate emscripten each new terminal window I opened:


I'm not sure if this will have had any effect on my installtion, but it's the only thing I can think of and I've never come across this error before. Apologies, my knowledge of the Rust ecosystem isn't amazing yet, but it's getting there, with help from the community! :slight_smile:

This ended up being the paths I added in to my profile.

So this seems to be a style choice based on this github ticket

either: You always have to source ./emsdk_env.sh first in a new terminal session

or add the paths to your profile, but this might have adverse side effects. Not sure of the correct implementation. But hopefully it helps someone at least get their stuff to compile/run