emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.8k stars 3.31k forks source link

there is no .emcc #5636

Closed prismspecs closed 6 years ago

prismspecs commented 7 years ago

Following the install instructions, all that is available are files within a folder "emsdk-portable", none of which are emcc.

https://kripken.github.io/emscripten-site/docs/building_from_source/verify_emscripten_environment.html#verifying-the-emscripten-environment

saschanaz commented 7 years ago

Did you try ./emsdk install latest && ./emsdk activate && . ./emsdk_env.sh?

viadata commented 6 years ago

I did. Nada. I actually tried on a previous Linux install (an old Debian box) as well to make sure it wasn't my current os being screwy and had the same result.

Outputs:

./emsdk install latest && ./emsdk activate && . ./emsdk_env.sh

Installing SDK 'sdk-1.37.28-64bit'..
Done installing SDK 'sdk-1.37.28-64bit'.
Writing .emscripten configuration file to user home directory /home/xxxx/
The Emscripten configuration file /home/xxxx/.emscripten has been rewritten with the following contents:

import os
SPIDERMONKEY_ENGINE = ''
NODE_JS = '/usr/bin/nodejs'
V8_ENGINE = ''
TEMP_DIR = '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]

To conveniently access the selected set of tools from the command line, consider adding the following directories to PATH, or call 'source ./emsdk_env.sh' to do this for you.

   /home/xxxx/Downloads/emcripten/emsdk-portable
Adding directories to PATH:
PATH += /home/xxx/Downloads/emcripten/emsdk-portable

Setting environment variables:
EMSDK = /home/xxxx/Downloads/emcripten/emsdk-portable
EM_CONFIG = /home/xxxx/.emscripten

./emcc

bash: ./emcc: No such file or directory

I also tried just installing from the apt source - emcc get's installed - and then complains that the LLVM path isn't set.

NameError: name 'LLVM_ROOT' is not defined

This is despite having build-essentials installed, clang present already in my path & working fine etc. If it's necessary to build https://github.com/kripken/emscripten-fastcomp as well (in the so-called "portable" version), maybe the guide should reflect that, or maybe just ensure that the apt-get install pulls down the correct dependencies. I'm currently trying a manual build of fastcomp, and I'll try the a prebuilt docker container failing that. Or just use Cheerp I guess, my patience with this is rapidly diminishing (I just wanted to try compiling a hello_world.c ffs).

juj commented 6 years ago

The issue is with the directive ./emsdk activate. Try instead running ./emsdk activate latest.

Updated emsdk with https://github.com/juj/emsdk/commit/2314fe9db8c69c8d6cc016a41ee2e1adc2948566 to improve the error message in that case. Thanks for reporting.

viadata commented 6 years ago

Thanks, building from source ended up working fine anyway!

VictorPinas commented 4 years ago

I'm suffering the same problem, but I don't want to build from the source.

sbc100 commented 4 years ago

You should be able to use emsdk to install without building from source. If you are trying to use emsdk and having issues can you post the specific problem, the commands you ran the the output you saw?