sevagh / pitchlite

realtime pitch tracking in WebAssembly with AudioWorklet
MIT License
2 stars 0 forks source link

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

Open ttqftech opened 6 months ago

ttqftech commented 6 months ago

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:

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 commented 4 months ago

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 commented 1 month ago

✅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?