proxy-wasm / proxy-wasm-cpp-sdk

WebAssembly for Proxies (C++ SDK)
Apache License 2.0
139 stars 67 forks source link

Build failing in `envoyproxy/envoy-build-ubuntu:49aaeb8f5473f09b4ab37ef3233a5e8afb7f9ed8-arm64` #136

Open NomadXD opened 2 years ago

NomadXD commented 2 years ago

I have written a WASM filter and use envoyproxy/envoy-build-ubuntu docker image to build the WASM module as a proxy_wasm_cc_binary(mount the source files into the container, build inside and mount back the WASM module to the host). The build works fine in my linux machine with envoyproxy/envoy-build-ubuntu. In MacBook Pro M1 machine, I use this envoyproxy/envoy-build-ubuntu:49aaeb8f5473f09b4ab37ef3233a5e8afb7f9ed8-arm64 image but the build fails with the following error.

ERROR: /build/.cache/bazel/_bazel_envoybuild/ac6b95f765ecc3e5ca8ed36bf09bfca3/external/proxy_wasm_cpp_sdk/BUILD:32:11: Compiling proxy_wasm_intrinsics.cc failed: (Exit 2): emcc.sh failed: error executing command external/emsdk/emscripten_toolchain/emcc.sh '--sysroot=external/emsdk/emscripten/cache/sysroot' -fdiagnostics-color -fno-exceptions -fno-strict-aliasing -funsigned-char -no-canonical-prefixes ... (remaining 30 arguments skipped)

According to that logs, it seems like proxy_wasm_intrinsics compilation fails inside the above mentioned docker container. Any way to fix this ? Thanks

cc @PiotrSikora