proxy-wasm / proxy-wasm-cpp-sdk

WebAssembly for Proxies (C++ SDK)
Apache License 2.0
144 stars 68 forks source link

Failed to load Wasm module #92

Open liuqi-sun opened 3 years ago

liuqi-sun commented 3 years ago

[source/extensions/common/wasm/wasm_vm.cc:39] Failed to load Wasm module due to a missing import: env.pthread_rwlock_init

bianpengyuan commented 3 years ago

Any more info? How do you build the Wasm module, and what is the version of envoy?

PiotrSikora commented 3 years ago

Sounds like your C++ code is multi-threaded, and that's not currently supported in Wasm.

liuqi-sun commented 3 years ago

Any more info? How do you build the Wasm module, and what is the version of envoy?

./bazel-bin/source/exe/envoy-static --version

./bazel-bin/source/exe/envoy-static version: 5c801b25cae04f06bf48248c90e87d623d7a6283/1.17.0/Modified/DEBUG/BoringSSL

liuqi-sun commented 3 years ago

Sounds like your C++ code is multi-threaded, and that's not currently supported in Wasm. I use gflag library that may be is multi-threaded. it is ok after I delete gflag library