From 93ea5e735528370b860cd2337eb98867385103e4 Mon Sep 17 00:00:00 2001 From: hongzhouzi <36416216+hongzhouzi@users.noreply.github.com> Date: Wed, 30 Jul 2025 13:42:31 +0800 Subject: [PATCH] fix: Error compiling golang-filter.so on arm64 machine (#2494) (#2507) Signed-off-by: hongzhouzi --- plugins/golang-filter/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/golang-filter/Dockerfile b/plugins/golang-filter/Dockerfile index eeace7fcf..266bdb80b 100644 --- a/plugins/golang-filter/Dockerfile +++ b/plugins/golang-filter/Dockerfile @@ -17,7 +17,7 @@ RUN if [ "$GOARCH" = "arm64" ]; then \ else \ echo "Installing AMD64 toolchain" && \ apt-get update && \ - apt-get install -y gcc binutils; \ + apt-get install -y gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu; \ fi WORKDIR /workspace @@ -30,7 +30,7 @@ RUN go mod tidy RUN if [ "$GOARCH" = "arm64" ]; then \ CC=aarch64-linux-gnu-gcc AS=aarch64-linux-gnu-as go build -o /$GO_FILTER_NAME.so -buildmode=c-shared .; \ else \ - go build -o /$GO_FILTER_NAME.so -buildmode=c-shared .; \ + CC=x86_64-linux-gnu-gcc AS=x86_64-linux-gnu-as go build -o /$GO_FILTER_NAME.so -buildmode=c-shared .; \ fi FROM scratch AS output