Hi, I have a cpp program which uses opencv modules and I have successfully compiled it to webassembly using emscripten. It works very well on chrome in my macbook. However when I tried to load the page through localhost in my phone using android chrome it threw the following error.
Uncaught (in promise) RuntimeError: abort(CompileError: WebAssembly.instantiate(): Compiling function #21 failed: Invalid opcode 0xfe (enable with --experimental-wasm-threads) @+5378). Build with -s ASSERTIONS=1 for more info. So I tried to figure out what was causing this and understood that it only happens after I have used a static library from opencv to build my wasm app using the following command. emcc -O3 -o hello.js -s -I/Users/user1/MyDocuments/work/new/emscripten_playground/playground libopencv_core.a hello.cpp -s WASM=1 -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' -s SINGLE_FILE=1 if I take out the libopencv_core.a and remove the lines that use stuff from that module, the wasm loads without any warnings in the android chrome. But I need to use those modules. Please tell me if you got any idea about how to solve this problem. Also if I enable the experimental webassembly flag in the android chrome it works without any problems. But I don't think I can do that through code so I need to find a way to fix this without the experimental flag. There has to be a way because opencv.js(wasm embedded) that is available from the opencv documentation runs without any errors on the android chrome . -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/9bbea4b2-072d-490d-b3d5-eaa4065d8252n%40googlegroups.com.
