Skip to content
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

Unable to Build WASM Locally on macOS #945

Closed
DeanBDean opened this issue Sep 11, 2024 · 3 comments
Closed

Unable to Build WASM Locally on macOS #945

DeanBDean opened this issue Sep 11, 2024 · 3 comments

Comments

@DeanBDean
Copy link

Hello, I am currently unable to build the wasm library locally on macOS 14.5. Here are the steps I have tried

Run

./scripts/build_wasm_docker.sh

And

# install emscripten via instructions from BUILDING.md
emcmake cmake -B build-web-debug . -D CMAKE_BUILD_TYPE=Debug
cmake --build build-web-debug --config Debug

And

emcmake cmake -B build-web .
cmake --build build-web

All of these give the same error message

[  0%] Building CXX object external/astc-encoder/Source/CMakeFiles/astcenc-none-static.dir/astcenc_averages_and_directions.cpp.o
clang++: error: overriding '-ffp-model=precise' option with '-ffp-contract=off' [-Werror,-Woverriding-option]
make[2]: *** [external/astc-encoder/Source/CMakeFiles/astcenc-none-static.dir/astcenc_averages_and_directions.cpp.o] Error 1
make[1]: *** [external/astc-encoder/Source/CMakeFiles/astcenc-none-static.dir/all] Error 2
make: *** [all] Error 2

I have been able to do the build on Ubuntu in WSL. I also confirmed this same error on a coworker's Macbook with the same OS version. Please let me know if I can provide any more information

@MarkCallow
Copy link
Collaborator

This was fixed by PR #933 5 days ago. You need to pull the latest main. It is clang 20-related. The Emscripten docker image was updated to that version recently. Presumably you do not have the latest Emscripten Docker image installed on your WSL Ubuntu system.

@DeanBDean
Copy link
Author

Ah, thank you so much, sorry for the bad report. I can confirm I hadn't pulled in that latest commit. When I did that, it just worked. Just FYI, on the WSL side, I actually installed emscripten manually and didn't use the Docker image.

@MarkCallow
Copy link
Collaborator

Thank you for the update. Glad it's working again.

Emscripten is actually based on clang. It was updated to a clang 20 recently. Most likely you haven't updated your WSL Ubuntu to the latest Emscripten SDK. The Docker image was updated though. Sorry for my misleading description earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants