Skip to content

OpenMP support (omp.h file not found) #17637

@johannesmols

Description

@johannesmols

I want to compile this C++ project to WASM using Emscripten. For this, I am following the documentation on building projects.

The project only has a Makefile, no Configure or CMake. From what I can tell, the only necessary change to the Makefile is to change the CC flag from g++ to em++ (in the flags.mk file).

Running emmake make gives this error: em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -msse4, -mavx, -mfpu=neon flags also requires passing -msimd128 (or -mrelaxed-simd)!

So, adding -msimd128 to the flags.mk file, I now an error that the header omp.h can't be found in one of the source files. This is a header file for OpenMP, and it seems that this is not supported by WASM at the moment (found this thread on SO).

There is also this issue, but adding the simpleomp code didn#t work either.

So, is there any way to compile this project without removing OpenMP?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions