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

clang++: error: unsupported option '-march=' / '-mfma' for target 'wasm32-unknown-emscripten' when executing make #1

Open
ttqftech opened this issue Mar 11, 2024 · 3 comments

Comments

@ttqftech
Copy link

I've follow the instructions in README to compile myself. But when I execute cmake in the last step, error occurs.
It happens both on two environments:

  • Ubuntu on Windows Subsystem for Linux (22.04.3 LTS)
  • macOS (14.3.1)

Screenshot_20240312_001500
截屏2024-03-11 22 23 58_去除名称

I'm a js developer and don't know much things about C/C++. Hope to solve this problem so that I can continue my little discovery :-)

@sevagh
Copy link
Owner

sevagh commented Jun 3, 2024

I'm not sure I can figure out this clang error, but maybe as a workaround you can download the pre-compiled pitchlite.js and pitchlite.wasm files: https://github.com/sevagh/pitchlite/tree/main/web

@ttqftech
Copy link
Author

ttqftech commented Sep 4, 2024

✅I've founded the following solution:
Removing -march=native -mfma in CMAKE_CXX_FLAGS_RELEASE line.

I guess wasm32-unknown-emscripten is Emscripten's default unconfigurable target, and there is not something native in unknown architecture?

@sevagh
Copy link
Owner

sevagh commented Nov 23, 2024

Glad to hear it! If you want to submit a fix, go ahead and I'll merge it.

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