-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build-protobuf crashes with segmentation fault on Apple M1 #42
Comments
I don't have an M1 so hard to test, but I can review a PR :) |
This isn't really a solution yet, but for documentation sake: When I apply the following changes and rebuild the Docker image it works on Apple M1: diff --git a/protobuf/Dockerfile b/protobuf/Dockerfile
index 14b92c9..73be1fd 100644
--- a/protobuf/Dockerfile
+++ b/protobuf/Dockerfile
@@ -99,7 +99,7 @@ RUN cd / && \
mkdir -p /protoc-gen-lint-out && \
cd /protoc-gen-lint-out && \
unzip -q /protoc-gen-lint_linux_amd64.zip && \
- install -Ds /protoc-gen-lint-out/protoc-gen-lint /out/usr/bin/protoc-gen-lint
+ install -D /protoc-gen-lint-out/protoc-gen-lint /out/usr/bin/protoc-gen-lint
ARG GRPC_GATEWAY_VERSION
RUN mkdir -p ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway && \
@@ -121,7 +121,7 @@ FROM alpine:${ALPINE_VERSION} as packer
RUN apk add --no-cache curl
ARG UPX_VERSION
-RUN mkdir -p /upx && curl -sSL https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz | tar xJ --strip 1 -C /upx && \
+RUN mkdir -p /upx && curl -sSL https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-arm64_linux.tar.xz | tar xJ --strip 1 -C /upx && \
install -D /upx/upx /usr/local/bin/upx
# Use all output including headers and protoc from protoc_builder I am not sure why only UPX needs that arm64 version, the amd64 version causes a segmentation fault 🤷🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! We use the
otel/build-protobuf
image in Tempo, it is run as part ofmake vendor-check
:https://github.com/grafana/tempo/blob/055573362709a02e2ca6aa98400a3de38c91c4a1/Makefile#L123
I'm the first person on the team using the Apple M1 and using this image results in an error (full log at the end):
The recommended way to solve this is by providing multi-arch Docker images. Similar work was done in Tempo itself: this requires the pipeline to be adapted so it builds both amd64 and arm64 images and the Dockerfile is parameterised to accept a target arch.
Is this work you would consider accepting?
Full log:
The text was updated successfully, but these errors were encountered: