Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
38.3k stars 4.75k forks source link

Facing build issue on ppc64le architecture #13226

Open Vipul-Ajmera opened 2 weeks ago

Vipul-Ajmera commented 2 weeks ago

Is there an existing issue for this?

Kong version ($ kong version)

Kong 3.7.0

Current Behavior

make build-release /bazel/output/bazel build //build:kong --verbose_failures --//:skip_webui=true --config release (07:35:56) INFO: Current date is 2024-06-18 (07:35:57) DEBUG: Rule 'atc_router_crate_index' indicated that a canonical reproducible form can be obtained by modifying arguments generator_sha256s = {"ppc64le-unknown-linux-gnu": "ba7d2bdf04bace1ead17b98950d3503a2075680616523a3e16d0877589f50b16"}, lockfile = Label("@atc_router//:cargo-bazel-lock.json") (07:35:57) DEBUG: Repository atc_router_crate_index instantiated at: /kong/WORKSPACE:49:24: in /root/.cache/bazel/_bazel_root/d5742f123fe1fc789bc2468bf73ca667/external/atc_router/build/deps.bzl:33:22: in atc_router_dependencies Repository rule crates_repository defined at: /root/.cache/bazel/_bazel_root/d5742f123fe1fc789bc2468bf73ca667/external/rules_rust/crate_universe/private/crates_repository.bzl:107:36: in (07:35:58) ERROR: /root/.cache/bazel/_bazel_root/d5742f123fe1fc789bc2468bf73ca667/external/openresty/BUILD.bazel:257:13: configurable attribute "runtime" in @openresty//:wasm_runtime doesn't match this configuration. Would a default condition help?

Conditions checked: @wasmx_config_settings//:use_wasmer_linux_x86_64 @wasmx_config_settings//:use_wasmer_linux_aarch64 @wasmx_config_settings//:use_wasmer_macos_x86_64 @wasmx_config_settings//:use_wasmer_macos_aarch64 @wasmx_config_settings//:use_v8_linux_x86_64 @wasmx_config_settings//:use_v8_linux_aarch64 @wasmx_config_settings//:use_v8_macos_x86_64 @wasmx_config_settings//:use_wasmtime_linux_x86_64 @wasmx_config_settings//:use_wasmtime_linux_aarch64 @wasmx_config_settings//:use_wasmtime_macos_x86_64 @wasmx_config_settings//:use_wasmtime_macos_aarch64

To see a condition's definition, run: bazel query --output=build

Expected Behavior

Build should run successfully.

Steps To Reproduce

No response

Anything else?

NAME="Red Hat Enterprise Linux" VERSION="9.3 (Plow)" ID="rhel" ID_LIKE="fedora" VERSION_ID="9.3" PLATFORM_ID="platform:el9" PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)" ANSI_COLOR="0;31" LOGO="fedora-logo-icon" CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos" HOME_URL="https://www.redhat.com/" DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9" BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9" REDHAT_BUGZILLA_PRODUCT_VERSION=9.3 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

StarlightIbuki commented 2 weeks ago

@fffonion Could you take a look?

fffonion commented 2 weeks ago

Also add --//:wasmx=false to the bazel build flags, as wasmx doens't have runtime support that arch yet.

Vipul-Ajmera commented 1 week ago

@fffonion Still having issues : bazel-out/ppc-opt-exec-2B5CBBC6/bin/external/rules_rust/util/process_wrapper/process_wrapper.sh -- bazel-out/ppc-opt-exec-2B5CBBC6/bin/external/rust_linux_ppc64leppc64le-unknown-linux-gnustable_tools/rust_toolchain/bin/rustc external/rules_rust_tinyjson/src/lib.rs '--crate-name=tinyjson' '--crate-type=rlib' '--error-format=human' '--codegen=metadata=-4031717389' '--codegen=extra-filename=-4031717389' '--out-dir=bazel-out/ppc-opt-exec-2B5CBBC6/bin/external/rules_rust_tinyjson' '--codegen=opt-level=3' '--codegen=debuginfo=0' '--codegen=strip=debuginfo' '--remap-path-prefix=${pwd}=' '--emit=dep-info,link' '--color=always' '--target=powerpc64le-unknown-linux-gnu' '-Cstrip=debuginfo' '--edition=2018' '--sysroot=bazel-out/ppc-opt-exec-2B5CBBC6/bin/external/rust_linux_ppc64leppc64le-unknown-linux-gnustable_tools/rust_toolchain')

Configuration: 39b5ca85e41bbc581353d30a939308258ecc5c543595bd4f11fe032d33b20106

Execution platform: @local_config_platform//:host

error[E0463]: can't find crate for std

error[E0463]: can't find crate for std --> external/rules_rust_tinyjson/src/generator.rs:2:5 Can you suggest what to do?

fffonion commented 1 week ago

You might need to register the powerpc64le-unknown-linux-gnu toolchain to https://github.com/Kong/atc-router/blob/main/build/deps.bzl#L20

Vipul-Ajmera commented 1 week ago

@fffonion but how to do while building kong? Since we are building kong it is redirecting to atc-router

fffonion commented 1 week ago

@Vipul-Ajmera you might want to fork the repo to add ppc64le support. It's not a supported architecture by kong as of today. You can use this as an example.