c++clangemscripten

Emscripten can't find clang


I installed Emscripten from the site (See https://emscripten.org/), followed the steps, however when I try run it with emcc ./Desktop/cpp/test.cpp -o test.html, it gives me the error

emcc: error: '/home/kit/emsdk/upstream/bin/clang --version' failed: [Errno 2] No such file or directory:
'/home/kit/emsdk/upstream/bin/clang'

I've checked in this directory, the clang executable is there. I tried running /home/kit/emsdk/upstream/bin/clang in the terminal, however bash says the file cannot be found. I am using a raspberry pi 400. Can anyone explain why this is, and any possible fixes? Thanks.


Solution

  • The problem is that Emscripten isn't built to work on ARM32, which is the system I was using. There is no way to fix this without a ridiculous amount of time and effort of modifying the source code.