Skip to content

Webasm simd128 support error #184

@oziphantom

Description

@oziphantom

First I built in windows, I downloaded the 4.10.0 code, added a module that is normally disabled and build windows libs with MSVC 2022, no issues.

But the real goal was to get WebAsm working. So I download and install the latest Emscripten, follow the tutorial, make sure it is working as expected. Then work on getting opencv-mobile working, few bumps as I had to install Ninja and get that working, and work out the correct way to call the "em" versions of things on windows, but get it going. Then I get a bunch of errors. Googling them I see a few other people have also had this in the past here and there with no response or solutions but a trend of "I'm on Windows". So I fire up the Lubuntu VM, update it etc and start from scratch so I can follow the instructions 1 for 1.

I install Emscripten on it as per their instructions and verify it as per their instructions. I then follow your instructions in the How-to-build your custom package section of your readme. replacing cmake with emcmake and make with emmake as per normal. This time I left it 100% stock no changes, the options text is the options text. And it runs into the same errors

modules/core/include/opencv2/core/hal/intrin_wasm_hpp:419:21: error: always_inline function 'wasm_i16x8_splat' requires target feature 'simd128', but would be inlined into function 'v_pack' that is compiled without support for 'simd128' etc

On the windows build I modified CMakeLists.txt to include -msimd128 on the CXX and C FLAGS and got the same result. I also tried with -mrelaxed-simd flags to no avail.

Any ideas? Do I need to roll back the emscripten version? I'm on
emcc 4.0.4
clang 21.0.0git
Target : wasm32-unknown-emscripten
Thread Model: posix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions