proxy-wasm / proxy-wasm-cpp-sdk

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

Fix Bazel build with emsdk 3.1.7 #149

Closed martijneken closed 1 year ago

martijneken commented 1 year ago

Errors about failure to find @emscripten_npm_linux.

Envoy has a patch that fixes it for me: https://github.com/envoyproxy/envoy/blob/main/bazel/emsdk.patch

I can send the PR to apply this patch. An upgrade of emsdk might be another fix, since there have been some changes:

PiotrSikora commented 1 year ago

Under what conditions do you see this? I've never seen this on our CI, and I believe it was a transient issue in Envoy.

Anyway, we really should upgrade Emscripten (Enovy would benefit from this as well, since they've been chasing Emscripten issues for a while... cc @phlax).

martijneken commented 1 year ago

Under what conditions do you see this?

Looks like any proxy_wasm_cc_binary build (Bazel + GCC):

$ bazel build @proxy_wasm_cpp_host//test/test_data:canary_check.wasm
... spew of similar errors ...
ERROR: /usr/local/google/home/mstevenson/.cache/bazel/_bazel_mstevenson/556330a676aedc6ff4205aef0ecbb4b0/external/proxy_wasm_cpp_sdk/BUILD:32:11: Compiling proxy_wasm_intrinsics.cc failed: missing input file '@emscripten_npm_linux//:node_modules/rxjs/src/util/toSubscriber.ts'
ERROR: /usr/local/google/home/mstevenson/.cache/bazel/_bazel_mstevenson/556330a676aedc6ff4205aef0ecbb4b0/external/proxy_wasm_cpp_sdk/BUILD:32:11: Compiling proxy_wasm_intrinsics.cc failed: missing input file '@emscripten_npm_linux//:node_modules/rxjs/src/util/tryCatch.ts'
Target @proxy_wasm_cpp_host//test/test_data:canary_check.wasm failed to build