Closed lolxnn closed 4 years ago
You have to run the command to state the source for emsdk
source emsdk-master/emsdk_env.sh for example. I have the folder for emsdk in the sm64 folder.
Once you run that then you can run the normal make command to build the game
It's not enough with ArchLinux/Manjaro, after installed packages emscripten from AUR repository, you have to do :
sudo ln -s /usr/lib/emscripten/emcc.py /usr/local/bin/
and
sudo ln -s /usr/lib/emscripten/emcc /usr/local/bin/
then edit ~/.emscripten and give the path of emscripten inside this file config
BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN', '')) # directory
Should be
BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN', '/usr/lib/emscripten/')) # directory
Complete file config ~/.emscripten should be like that :
Note: If you put paths relative to the home directory, do not forget
os.path.expanduser
#
Any config setting
in this file can be overridden by setting the EM_
environment variable. For example, settings EM_LLVM_ROOT override the setting in this file.
#
Note: On Windows, remember to escape backslashes! I.e. LLVM='c:\llvm\'
is not valid, but LLVM='c:\llvm\' and LLVM='c:/llvm/'
are.
import os
This is used by external projects in order to find emscripten. It is not used
by emscripten itself.
EMSCRIPTEN_ROOT = "/usr/lib/emscripten"
LLVM_ROOT = "/usr/lib/emscripten-llvm" BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN', '/usr/lib/emscripten/')) # directory
Add this if you have manually built the JS optimizer executable (in
Emscripten/tools/optimizer) and want to run it from a custom location.
Alternatively, you can set this as the environment variable
EMSCRIPTEN_NATIVE_OPTIMIZER.
EMSCRIPTEN_NATIVE_OPTIMIZER='/path/to/custom/optimizer(.exe)'
Location of the node binary to use for running the JS parts of the compiler.
This engine must exist, or nothing can be compiled.
NODE_JS = os.path.expanduser(os.getenv('NODE', '/usr/bin/node')) # executable
JAVA = 'java' # executable
################################################################################ #
Test suite options:
#
Alternative JS engines to use during testing:
#
SPIDERMONKEY_ENGINE = [os.path.expanduser(os.getenv('SPIDERMONKEY', 'js'))] # executable
V8_ENGINE = os.path.expanduser(os.getenv('V8', 'd8')) # executable
#
All JS engines to use when running the automatic tests. Not all the engines in
this list must exist (if they don't, they will be skipped in the test runner).
# JS_ENGINES = [NODE_JS] # add V8_ENGINE or SPIDERMONKEY_ENGINE if you have them installed too. #
WASMER = os.path.expanduser(os.path.join('~', '.wasmer', 'bin', 'wasmer'))
WASMTIME = os.path.expanduser(os.path.join('~', 'wasmtime'))
#
Wasm engines to use in STANDALONE_WASM tests.
#
WASM_ENGINES = [] # add WASMER or WASMTIME if you have them installed
#
Other options
#
FROZEN_CACHE = True # never clears the cache, and disallows building to the cache
But even after that, the compiler still complain the compiler complain about "src/game/main.h" file on line 76 :
extern void main(void)
Should apparently be replaced by
extern int main(void)
And again, after that, there still errors.
@lolxnn Can you retry web building using @bpvarsity and @Tikilou's instructions, the latest nightly, and the changes from #151?
A better fix than what was even in #151 got pushed to master and nightly just now. Due to this, it's safe to say that this issue is fixed. Please recheck using latest master, and if it now works for you, please close this, @lolxnn.
The relevant PR (#207) got merged, so this can be closed @lolxnn
I get an error while compiling for web, i have installed
emsdk
from AUR, but i get the following error:make: emcc: No such file or directory.
make: *** [Makefile:735: build/us_web/src/engine/behavior_script.o] Error 127