-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure Emscripten for jsartoolkit5 #11
Comments
plain clone of the fixing-nft branch macos (10.15.2 (19C57)) zsh
running locally with Errors: examples/nft_threejs_wasm.html |
Falling back to 1.38.44-fastcomp
Restarted all active Terminals
Errors: examples/nft_improved_worker/nft_pinball_video.html |
Conclusion: I think it is safe to assume it doesn't build with NFT on macOS |
@ThorstenBux that Is weird! And It looks very strange, i will think about it. Thank you for testing |
I'm setting up docker now. How do you install libJPEG on your linux box? I need it for the includes |
My libjpeg includes are in emscripten/libjpeg folder. |
did you put them there? I can't find them in my emscripten installation |
never mind. I think I've got a docker setup working. Will test in details tomorrow and push to a branch |
@kalwalt Happy New Year :) plz have a look if that works for you. The instructions on how to build with Docker are in the readme If you say it is working I'll open a PR. |
@ThorstenBux Happy New Year!! Sorry was very late, i will test your branch. |
About libjpeg includes i take them from https://github.com/kalwalt/libjpeg-for-jsartoolkit5 |
@ThorstenBux i tested your branch https://github.com/ThorstenBux/jsartoolkit5/tree/build-with-docker and it works pefectly for me 🎉💥🙌🍾😀. If you open a PR i will review you. |
It is recommended to use the Docker setup see in the Readme.md https://github.com/kalwalt/jsartoolkit5/tree/fixing-nft#recommended-build-using-docker as written at the top. |
I think we can close this, right? |
Emscripten for jsartoolkit5
In this issue i want to explain how to setup Emscripten for jsartoolkit5. Because we had a certain number of issue compiling in different OS and sharing the code, compiled with different Emscripten versions.
Be aware that now Emscripten may use two different backends for emitting WASM code as described here https://emscripten.org/docs/compiling/WebAssembly.html#backends read carefully this because using a different backends lead to errors if you want to recompile it with a different backend.
If you want change the WASM backend or the Emscripten version consider that the makem.js
jsartoolkit5/tools/makem.js
Line 19 in fa15cb1
Setting the paths
Infact they are separate folder for upstream the path should looks like:
/path/to/emsdk/upstream/emscripten/
for fastcomp:
/path/to/emsdk/fastcomp/emscripten
and so the environment variable should be (for fastcomp):
export EMSCRIPTEN=/home/walter/emsdk/fastcomp/emscripten
while changing version/backend remember to clear the Emscripten cache:
emcc --clear-cache
Final summary
Use the Emscripten version recommended in the #1 (comment) if you have a different one make these steps:
./emsdk install 1.xx.xx-fastcomp
./emsdk activate 1.xx.xx-fastcomp
source ./emsdk_env.sh
change your emescripten var as explained above !!
clear the emscripten cache:
emcc --clear-cache
Anyway hopefully soon we will setup a Docker environment to solve most of these issues.
Update
We strongly suggest to use Docker to build the project as written in the README.md https://github.com/kalwalt/jsartoolkit5/tree/fixing-nft#recommended-build-using-docker
The text was updated successfully, but these errors were encountered: