# Has anybody got OpenCV to build with Emscripten 3.1.\* without SIMD128 enabled?

**URL:** <https://forum.opencv.org/t/has-anybody-got-opencv-to-build-with-emscripten-3-1-without-simd128-enabled/13660>\
**Category:** C++\
**Tags:** opencvjs, build\
**Created:** [June 25, 2023, 11:20am UTC](https://forum.opencv.org/t/has-anybody-got-opencv-to-build-with-emscripten-3-1-without-simd128-enabled/13660 "2023-06-25T11:20:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Forrest](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/john_forrest/32/8160_2.png) [@John\_Forrest](https://forum.opencv.org/u/John_Forrest)\
**Post date:** [June 25, 2023, 11:20am UTC](https://forum.opencv.org/t/has-anybody-got-opencv-to-build-with-emscripten-3-1-without-simd128-enabled/13660/1 "2023-06-25T11:20:12Z")

</div>

I am trying to build OpenCV with an up to date version of emscripten (3.1.41) using OpenCV4.7.0. If I add a simple mod to `intrin_wasm.hpp`:

```auto
#include <emscripten/version.h>

```

in the includes near the top, I can get this to compile if (and only if)  
I build with the `-msimd128` flag. (The extra include is required because  
the emscripten version defines are no longer present by default. I also  
have a section in that file to rename some of the function calls to what  
clang itself supports, but that just stops lots of warnings and is not I think absolutely necessary).

Issue I have is that this code runs find on Chrome but I am having problems on Safari - on Safari the support for simd128 is recent many iphone devices don’t support it. (Let alone I am getting different results compared to not only Chrome but running the same code native). I thought it would be a good idea to try to compile without the flag, but if I do that I get a lot of errors about `wasm_v128_load` etc being only supported with simd128 enabled. I find this odd because there are protection in the header file in some places for:

```auto
#ifdef __wasm_unimplemented_simd128__

```

in some places to protect for this, but not in all. Did older versions of emscripten not throw up an error until (say) linkage or use?

Anyway, what do others do?
