Hi everyone
I am just starting to use Emscripten to explore the world of WebAssembly.
For a project at my university I am trying to port an application to
WebAssembly, that uses OpenMP for multithreading. The compilation of the
software works without a problem but during linking I get the following
undefined symbol errors.
error: undefined symbol: __kmpc_end_reduce_nowait
warning: To disable errors for undefined symbols use `-s
ERROR_ON_UNDEFINED_SYMBOLS=0`
error: undefined symbol: __kmpc_for_static_fini
error: undefined symbol: __kmpc_for_static_init_4u
error: undefined symbol: __kmpc_fork_call
error: undefined symbol: __kmpc_global_thread_num
error: undefined symbol: __kmpc_push_num_threads
error: undefined symbol: __kmpc_reduce_nowait
So I think I would have to compile the llvm's OpenMP source to llvm bitcode
to be able to link it with my application.
My first question is: Does someone know if such a port already exists?
My second question would be if I would be able to compile the OpenMP source
code to WASM so I can link the output binaries to my project.
I am using the following makefile to build my project:
#CXX = g++
CXXFLAGS = -std=c++11 -Wall -Wextra -pedantic -fopenmp -pthread
LDFLAGS = -lpthread
SRC = $(shell find ./ -name '*.cpp' -or -name '*.c')
DEPS = $(shell find ./ -name '*.hpp' -or -name '*.h')
OBJS = $(SRC:.cpp=.o)
MAIN = main
all: $(MAIN)
debug: CXXFLAGS += -DDEBUG -g
debug: $(MAIN)
web: CXX = em++
web: CXXFLAGS += -s USE_PTHREADS=1
web: $(MAIN)
$(MAIN): $(OBJS)
$(CXX) $(CXXFLAGS) -o $(MAIN) $(OBJS) $(LDFLAGS) $(LDLIBS)
clean:
$(RM) $(OBJS) *.o
--
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/65c561c3-05d4-4540-b545-d2c5130c6d20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.