Open martijneken opened 1 year ago
Something funky's going on with (updated) emsdk and platform selection:
Doesn't work here in proxy-wasm-cpp-sdk:
$ bazelisk build --toolchain_resolution_debug //example:http_wasm_example.wasm
INFO: Build option --action_env has changed, discarding analysis cache.
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host,
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host,
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @local_config_cc//:cc-compiler-armeabi-v7a; mismatching values: arm, android
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @emsdk//:platform_wasi: Rejected toolchain @local_config_cc//:cc-compiler-armeabi-v7a; mismatching values: arm, android
INFO: ToolchainResolution: Type @bazel_tools//tools/python:toolchain_type: target platform @local_config_platform//:host: execution @local_config_platform//:host: Selected toolchain @bazel_tools//tools/python:_autodetecting_py_runtime_pair
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @emsdk//:platform_wasi: Rejected toolchain @local_config_cc//:cc-compiler-k8; mismatching values: x86_64, linux
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: execution @local_config_platform//:host: Selected toolchain @local_config_cc//:cc-compiler-k8
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @emsdk//:platform_wasi: No toolchains found.
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, type @bazel_tools//tools/python:toolchain_type -> toolchain @bazel_tools//tools/python:_autodetecting_py_runtime_pair, type @bazel_tools//tools/cpp:toolchain_type -> toolchain @local_config_cc//:cc-compiler-k8
ERROR: While resolving toolchains for target //example:proxy_wasm_http_wasm_example: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
Works when rules_rust is in the workspace, seemingly via dummy_cc_toolchain:
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host,
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @emsdk//:platform_wasi: execution @local_config_platform//:host: Selected toolchain @rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm32_toolchain_cc
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @emsdk//:platform_wasi: Rejected toolchain @local_config_cc//:cc-compiler-armeabi-v7a; mismatching values: arm, android
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @emsdk//:platform_wasi: Rejected toolchain @local_config_cc//:cc-compiler-k8; mismatching values: x86_64, linux
INFO: ToolchainResolution: Target platform @emsdk//:platform_wasi: Selected execution platform @local_config_platform//:host, type @bazel_tools//tools/cpp:toolchain_type -> toolchain @rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm32_toolchain_cc
INFO: ToolchainResolution: Target platform @emsdk//:platform_wasi: Selected execution platform @local_config_platform//:host,
Ah, just needed to add register_emscripten_toolchains()
. This changed in https://github.com/emscripten-core/emsdk/pull/1036.
Looks like we need to update protobuf in order to update zlib in order to address https://github.com/madler/zlib/issues/633. I'm able to build with the latest, zlib-1.2.13.
Update: still stuck on Envoy emsdk update, which has a Cmake related build issue (https://github.com/envoyproxy/envoy/pull/32432)
npm install
patch to work with the new version