You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started to learn odin and followed Karl example https://github.com/karl-zylinski/odin-raylib-web to try odin and wasm,
Odin was installed with homebrew version dev-2025-01:2aae4cfd4, Mac OS version 15.2 (24C101) (air m1).
as I run build_web.sh I expect to get done and the wasm files in the web folder
Current Behavior
denistu@Deniss-MacBook-Air odin-raylib-web % ./build_web.sh
emcc: error: /opt/homebrew/Cellar/odin/2025-01/libexec//vendor/raylib/wasm/libraylib.a: No such file or directory ("/opt/homebrew/Cellar/odin/2025-01/libexec//vendor/raylib/wasm/libraylib.a" was expected to be an input file, based on the commandline arguments provided)
Web build created in build/web
so the directory of raylib/wasm is actually empty and I need to add the libraylib.a and libraygui.a(found in this repo vendors) to get it work
denistu@Deniss-MacBook-Air odin-raylib-web % ls /opt/homebrew/Cellar/odin/2025-01/libexec/vendor/raylib/wasm/
denistu@Deniss-MacBook-Air odin-raylib-web %
after this files added to the raylib/wasm directory it works fine:
./build_web.sh
cache:INFO: generating system headers: sysroot_install.stamp... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot_install.stamp"for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libGL-getprocaddr.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libGL-getprocaddr.a"for subsequent builds)
system_libs:INFO: compiled 4 inputs in 0.13s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libal.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libal.a"for subsequent builds)
system_libs:INFO: compiled 1 inputs in 0.13s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libhtml5.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libhtml5.a"for subsequent builds)
system_libs:INFO: compiled 5 inputs in 0.13s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libstubs-debug.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libstubs-debug.a"for subsequent builds)
system_libs:INFO: compiled 2 inputs in 0.13s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libnoexit.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libnoexit.a"for subsequent builds)
system_libs:INFO: compiled 1 inputs in 0.13s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libc-debug.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libc-debug.a"for subsequent builds)
system_libs:INFO: compiled 1043 inputs in 3.82s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libdlmalloc-debug.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libdlmalloc-debug.a"for subsequent builds)
system_libs:INFO: compiled 2 inputs in 0.28s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libcompiler_rt.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libcompiler_rt.a"for subsequent builds)
system_libs:INFO: compiled 162 inputs in 0.85s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libc++-noexcept.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libc++-noexcept.a"for subsequent builds)
system_libs:INFO: compiled 57 inputs in 5.06s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libc++abi-debug-noexcept.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libc++abi-debug-noexcept.a"for subsequent builds)
system_libs:INFO: compiled 16 inputs in 1.43s
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libsockets.a... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/sysroot/lib/wasm32-emscripten/libsockets.a"for subsequent builds)
system_libs:INFO: compiled 27 inputs in 0.56s
cache:INFO: - ok
cache:INFO: generating system asset: symbol_lists/11a5a1540fc944aa58cd667d65e4086f6089e816.json... (this will be cached in"/opt/homebrew/Cellar/emscripten/4.0.1/libexec/cache/symbol_lists/11a5a1540fc944aa58cd667d65e4086f6089e816.json"for subsequent builds)
cache:INFO: - ok
and the server and the app works fine.
The text was updated successfully, but these errors were encountered:
Not an issue with Odin in the first place, but an "issue" with homebrew. In homebrew's CI we have to build everything from scratch, and can't use the precompiled libraries.
Somebody would need to make a PR or issue there to ask if it's even allowed to use emscripten there to build a bunch of things, I don't think they will allow that, the version of raylib from brew also only ships the libraries for native, nothing for wasm/emscripten.
Alternatively that template should contain the libraries, instead of the Odin repo, seems a bit weird to me that it's here when we don't actually want anything to do with emscripten directly here, but I've voiced that concern before.
Another option is adding a script, or readme with steps to build the library, and doing the when !#exists(RAYLIB_WASM_LIB) { #panic("go to blah/blah to build the library / follow steps in readme") }
Just had a talk with @karl-zylinski and he will try to make a PR when he has time that adds the when statement, and instructions for downloading to point to.
Context
I started to learn odin and followed Karl example https://github.com/karl-zylinski/odin-raylib-web to try odin and wasm,
Odin was installed with homebrew version dev-2025-01:2aae4cfd4, Mac OS version 15.2 (24C101) (air m1).
Expected Behavior
as I run build_web.sh I expect to get done and the wasm files in the web folder
Current Behavior
so the directory of raylib/wasm is actually empty and I need to add the libraylib.a and libraygui.a(found in this repo vendors) to get it work
after this files added to the raylib/wasm directory it works fine:
and the server and the app works fine.
The text was updated successfully, but these errors were encountered: