Closed chancila closed 4 months ago
I was able to work around this issue by building my own jq arm64 binary and registering a toolchain within my workspace locally:
on a mac arm64 host:
docker run --rm -it ubuntu:18.04
apt update
apt upgrade
apt install git build-essential make libtool autoconf
git clone https://github.com/jqlang/jq
git submodule update --init --recursive
autoreconf -fi
./configure --with-oniguruma=builtin
make -j8
load("@aspect_bazel_lib//lib/private:jq_toolchain.bzl", "jq_toolchain")
jq_toolchain(
name = "jq_linux_arm64_tools",
bin = ":jq", # binary copied from above result
)
toolchain(
name = "jq_linux_arm64_toolchain",
exec_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:arm64",
],
toolchain = ":jq_linux_arm64_tools",
toolchain_type = "@aspect_bazel_lib//lib:jq_toolchain_type",
)
FYI: This can soon be resolved using yq since stamping support is coming.
if anyone is looking for a quick patch-around, this works for my own usecases but I make no guarantees that it works with all: https://github.com/archen/rules_oci/pull/1
Tested out your above patch and although it looks like it might break something else based on the tests it did let me keep developing on my linux/arm64 machine. I don't think I will ever purchase another arm machine 😞
@michaeljs1990 yeah I haven't had time to replace all of the filtration in the image.sh.tpl with yq-compat. It's funny... ARM hasn't been as painful as I thought it would be, but I sure am glad I'm using bazel to compile tools from code as needed for my dev corps instead of relying on prebuilds.
Will be fixed by #386
When will we upgrade to bazel-lib 2.0? Is there a definite schedule? This hinders some tests (all my personal machines are arm64, linux/mac).
fixed by https://github.com/bazel-contrib/rules_oci/pull/386
When will we upgrade to bazel-lib 2.0
That will happen with the 2.x version of rules_oci, which we are already landing PRs to.
//bin/services/external_proxy:image
being aoci_image
targetif this is a known issue perhaps stating compatible architectures might be handy