WebAssembly / wasm-c-api

Wasm C API prototype
Apache License 2.0
537 stars 77 forks source link

Docker build running error #139

Closed leonwanghui closed 4 years ago

leonwanghui commented 4 years ago

Hi all, when I try to build the docker image, some errors occurred at the last step:

==== C++ hello ====
Initializing...
Loading binary...
Compiling module...
Creating callback...
Instantiating module...
Extracting export...
Calling export...
Calling back...
> Hello world!
Shutting down...
Done.
==95==LeakSanitizer has encountered a fatal error.
==95==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==95==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Makefile:122: recipe for target 'run-hello-cc' failed
make: *** [run-hello-cc] Error 1

Any clue on it? Thanks!

leonwanghui commented 4 years ago

Some catch-up on this issue is that when I retried it on Ubuntu 18.04, everything works fine. is that something missing or out-of-date in Dockerfile

rossberg commented 4 years ago

Interesting. By default, the examples build with WASM_API_DEBUG. Maybe try turning that off?

leonwanghui commented 4 years ago

@rossberg Thanks for the quick reply. I have found the reason that the container should be started with --privileged flag, then the example can be built successfully.