#198·eShop

Apple ARM Processors Require Rosetta 2 to Build for gRPC Build Tools Support

Author: tebecoCreated Feb 17, 2024Updated Jul 29, 2026
Labelsquestion

I don't think this repository can be build on MacOs / Apple Sillicon

  • NO GOAL: depends on Rosetta
  • GOAL: Having the tooling "just works"
$ git clone https://github.com/dotnet/eShop

$ dotnet tool restore
# this repo is missing dotnet tool manifest for ef
$ dotnet new tool-manifest
$ dotnet tool install dotnet-ef
$ git add ./.config
$ git commit -m "Add required file for dotnet tool to avoid relying on a global computer state"

$ sudo dotnet workload restore
# dotnet workload is still bugged and require sudo on non-windows
# https://github.com/dotnet/sdk/issues/18585

$ dotnet restore eShop.Web.slnf
$ dotnet build eShop.Web.slnf
# should work

Current Result: This repo depends on a package that is yet to be Apple ARM compliant:

dotnet build eShop.Web.slnf
MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.

  Restore operation started

  4 libraries restored in 0,07 seconds

  EventBus -> ~/dev/github/eshop/src/EventBus/bin/Debug/net8.0/EventBus.dll
  Ordering.Domain -> ~/dev/github/eshop/src/Ordering.Domain/bin/Debug/net8.0/Ordering.Domain.dll
  eShop.ServiceDefaults -> ~/dev/github/eshop/src/eShop.ServiceDefaults/bin/Debug/net8.0/eShop.ServiceDefaults.dll
  WebAppComponents -> ~/dev/github/eshop/src/WebAppComponents/bin/Debug/net8.0/WebAppComponents.dll
  IntegrationEventLogEF -> ~/dev/github/eshop/src/IntegrationEventLogEF/bin/Debug/net8.0/IntegrationEventLogEF.dll
  Mobile.Bff.Shopping -> ~/dev/github/eshop/src/Mobile.Bff.Shopping/bin/Debug/net8.0/Mobile.Bff.Shopping.dll
  Ordering.Infrastructure -> ~/dev/github/eshop/src/Ordering.Infrastructure/bin/Debug/net8.0/Ordering.Infrastructure.dll
  EventBusRabbitMQ -> ~/dev/github/eshop/src/EventBusRabbitMQ/bin/Debug/net8.0/EventBusRabbitMQ.dll
  WebhookClient -> ~/dev/github/eshop/src/WebhookClient/bin/Debug/net8.0/WebhookClient.dll
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003: The specified task executable "~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc" could not be run. System.ComponentModel.Win32Exception (86): An error occurred trying to start process '~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc' with working directory '~/dev/github/eshop/src/Basket.API'. Bad CPU type in executable [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003: The specified task executable "~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc" could not be run. System.ComponentModel.Win32Exception (86): An error occurred trying to start process '~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc' with working directory '~/dev/github/eshop/src/WebApp'. Bad CPU type in executable [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [~/dev/github/eshop/src/WebApp/WebApp.csproj]
  Identity.API -> ~/dev/github/eshop/src/Identity.API/bin/Debug/net8.0/Identity.API.dll
  PaymentProcessor -> ~/dev/github/eshop/src/PaymentProcessor/bin/Debug/net8.0/PaymentProcessor.dll
  OrderProcessor -> ~/dev/github/eshop/src/OrderProcessor/bin/Debug/net8.0/OrderProcessor.dll
  Webhooks.API -> ~/dev/github/eshop/src/Webhooks.API/bin/Debug/net8.0/Webhooks.API.dll
  Ordering.API -> ~/dev/github/eshop/src/Ordering.API/bin/Debug/net8.0/Ordering.API.dll
  Catalog.API -> ~/dev/github/eshop/src/Catalog.API/bin/Debug/net8.0/Catalog.API.dll
  Ordering.UnitTests -> ~/dev/github/eshop/tests/Ordering.UnitTests/bin/Debug/net8.0/Ordering.UnitTests.dll
  Catalog.FunctionalTests -> ~/dev/github/eshop/tests/Catalog.FunctionalTests/bin/Debug/net8.0/Catalog.FunctionalTests.dll
  Ordering.FunctionalTests -> ~/dev/github/eshop/tests/Ordering.FunctionalTests/bin/Debug/net8.0/Ordering.FunctionalTests.dll

Build FAILED.

~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003: The specified task executable "~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc" could not be run. System.ComponentModel.Win32Exception (86): An error occurred trying to start process '~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc' with working directory '~/dev/github/eshop/src/Basket.API'. Bad CPU type in executable [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [~/dev/github/eshop/src/Basket.API/Basket.API.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003: The specified task executable "~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc" could not be run. System.ComponentModel.Win32Exception (86): An error occurred trying to start process '~/.nuget/packages/grpc.tools/2.59.0/tools/macosx_x64/protoc' with working directory '~/dev/github/eshop/src/WebApp'. Bad CPU type in executable [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [~/dev/github/eshop/src/WebApp/WebApp.csproj]
~/.nuget/packages/grpc.tools/2.59.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [~/dev/github/eshop/src/WebApp/WebApp.csproj]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:02.14

Grpc.Tools only ship for macos x64 apparently, until Google actually update their package for Apple Silicon, should this repo offer an alternative way of using GRPC like for example protobuff-net ?