diff --git a/proposer/op/Dockerfile.op_proposer b/proposer/op/Dockerfile.op_proposer index 647fc38b..cee3b226 100644 --- a/proposer/op/Dockerfile.op_proposer +++ b/proposer/op/Dockerfile.op_proposer @@ -9,12 +9,19 @@ ARG TARGETOS ARG TARGETARCH ENV GOOS=$TARGETOS ENV GOARCH=$TARGETARCH +ENV CGO_ENABLED=1 -# Install cross-compilation tools for ARM64 +# Install cross-compilation tools for ARM64 and set MUSL flags RUN if [ "$TARGETARCH" = "arm64" ]; then \ apk add --no-cache gcc-aarch64-none-elf musl-dev; \ + export CC=aarch64-none-elf-gcc; \ + export CXX=aarch64-none-elf-g++; \ + export LDFLAGS="-static"; \ fi +# Fix SQLite compilation for ARM64 +ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE" + WORKDIR /optimism # Cache go modules