Skip to content

Conversation

jgeorge300
Copy link

@jgeorge300 jgeorge300 commented Aug 24, 2025

Background

Build fails on an Apple MacBook Air (M2) with the following error:

 => [builder 4/6] RUN dotnet restore cartservice.csproj     -a arm64                                                                                                         5.6s
 => [builder 5/6] COPY . .                                                                                                                                                   0.0s 
 => ERROR [builder 6/6] RUN dotnet publish cartservice.csproj     -p:PublishSingleFile=true     -a arm64     --self-contained true     -p:PublishTrimmed=true     -p:TrimMo  3.9s 
------                                                                                                                                                                            
 > [builder 6/6] RUN dotnet publish cartservice.csproj     -p:PublishSingleFile=true     -a arm64     --self-contained true     -p:PublishTrimmed=true     -p:TrimMode=full     -c release     -o /cartservice:                                                                                                                                                     
0.419   Determining projects to restore...                                                                                                                                        
3.371   Restored /app/cartservice.csproj (in 2.77 sec).
3.695 /root/.nuget/packages/grpc.tools/2.71.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6006: "/root/.nuget/packages/grpc.tools/2.71.0/tools/linux_arm64/protoc" exited with code 139. [/app/cartservice.csproj]
------
Dockerfile:23
--------------------
  22 |     COPY . .
  23 | >>> RUN dotnet publish cartservice.csproj \
  24 | >>>     -p:PublishSingleFile=true \
  25 | >>>     -a $TARGETARCH \
  26 | >>>     --self-contained true \
  27 | >>>     -p:PublishTrimmed=true \
  28 | >>>     -p:TrimMode=full \
  29 | >>>     -c release \
  30 | >>>     -o /cartservice
  31 |     
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c dotnet publish cartservice.csproj     -p:PublishSingleFile=true     -a $TARGETARCH     --self-contained true     -p:PublishTrimmed=true     -p:TrimMode=full     -c release     -o /cartservice" did not complete successfully: exit code: 1

This has been reported to grpc/grpc issues

Fixes

Change Summary

Downgrade grpc to version 2.67

Additional Notes

Testing Procedure

Successfully built on an Apple MacBook Air (M2). Deployed and running on my local Raspberry Pi 5 Kubernetes cluster.

Related PRs or Issues

Regression against 2.68.1 - Grpc.Tools 2.69.0 stops working on ARM64

@jgeorge300 jgeorge300 requested review from yoshi-approver and a team as code owners August 24, 2025 16:36
Copy link

google-cla bot commented Aug 24, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@bourgeoisor
Copy link
Member

@jgeorge300 is it that that particular version of gRPC doesn't support the ARM chip or the architecture you're using?

@jgeorge300
Copy link
Author

@bourgeoisor yes, the latest version of grpc doesn't work on the arm platform. There's an open issue in the grpc repo about this. I downgraded to the version prior to the issue being reported.

@bourgeoisor
Copy link
Member

Would you mind sending me the URL to the issue please? Thank you!

@jgeorge300
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants