Skip to content
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

protobuf MIPS port #29

Open
geffzhang opened this issue Sep 7, 2020 · 4 comments
Open

protobuf MIPS port #29

geffzhang opened this issue Sep 7, 2020 · 4 comments

Comments

@geffzhang
Copy link

dotnet new grpc's run is wrong. may be should port Protobuf MIPS: https://github.com/grpc/grpc

geffzhang@geffzhang-PC2:~/workshop/grpc$ dotnet new grpc
The template "ASP.NET Core gRPC Service" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /home/geffzhang/workshop/grpc/grpc.csproj...
Restore completed in 9.94 sec for /home/geffzhang/workshop/grpc/grpc.csproj.

Restore succeeded.

geffzhang@geffzhang-PC2:/workshop/grpc$ ls
appsettings.Development.json grpc.csproj Program.cs Protos Startup.cs
appsettings.json obj Properties Services
geffzhang@geffzhang-PC2:/workshop/grpc$ dotnet run
/home/geffzhang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : Google.Protobuf.Tools cannot determine host OS and CPU. [/home/geffzhang/workshop/grpc/grpc.csproj]
/home/geffzhang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : Use environment variables PROTOBUF_TOOLS_OS={linux|macosx|windows} and PROTOBUF_TOOLS_CPU={x86|x64} to try the closest match to your system. [/home/geffzhang/workshop/grpc/grpc.csproj]
/home/geffzhang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : You may also set PROTOBUF_PROTOC to specify full path to the host-provided compiler (v3.5+ is required). [/home/geffzhang/workshop/grpc/grpc.csproj]

The build failed. Fix the build errors and run again.
geffzhang@geffzhang-PC2:~/workshop/grpc$

@xiangzhai
Copy link

Hi @geffzhang

Thanks for your bug report!

I am on it.

Thanks,
Leslie Zhai

@xiangzhai
Copy link

Workaround: dotnet run under Linux X64, then scp the grpc project folder to Loongson machine:

[loongson@localhost HelloGRPC]$ ~/zhaixiang/to_ship_sdk/dotnet bin/Debug/netcoreapp3.1/HelloGRPC.dll --urls http://10.2.5.91:5001
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://10.2.5.91:5001
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /home/loongson/zhaixiang/HelloGRPC

Thanks,
Leslie Zhai

@xiangzhai
Copy link

xiangzhai commented Sep 7, 2020

Linux ARM64 repros:

zhaixiang@aarch64:~/HelloGRPC$ ~/dotnet-sdk-3.1.107-linux-arm64/dotnet build
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 291.13 ms for /home/zhaixiang/HelloGRPC/HelloGRPC.csproj.
/home/zhaixiang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : Google.Protobuf.Tools cannot determine host OS and CPU. [/home/zhaixiang/HelloGRPC/HelloGRPC.csproj]
/home/zhaixiang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : Use environment variables PROTOBUF_TOOLS_OS={linux|macosx|windows} and PROTOBUF_TOOLS_CPU={x86|x64} to try the closest match to your system. [/home/zhaixiang/HelloGRPC/HelloGRPC.csproj]
/home/zhaixiang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : You may also set PROTOBUF_PROTOC to specify full path to the host-provided compiler (v3.5+ is required). [/home/zhaixiang/HelloGRPC/HelloGRPC.csproj]

Build FAILED.

/home/zhaixiang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : Google.Protobuf.Tools cannot determine host OS and CPU. [/home/zhaixiang/HelloGRPC/HelloGRPC.csproj]
/home/zhaixiang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : Use environment variables PROTOBUF_TOOLS_OS={linux|macosx|windows} and PROTOBUF_TOOLS_CPU={x86|x64} to try the closest match to your system. [/home/zhaixiang/HelloGRPC/HelloGRPC.csproj]
/home/zhaixiang/.nuget/packages/grpc.tools/2.27.0/build/_protobuf/Google.Protobuf.Tools.targets(84,5): error : You may also set PROTOBUF_PROTOC to specify full path to the host-provided compiler (v3.5+ is required). [/home/zhaixiang/HelloGRPC/HelloGRPC.csproj]
    0 Warning(s)
    1 Error(s)

@xiangzhai
Copy link

Reported to upstream: grpc/grpc#24105

Waiting for review: grpc/grpc#24068

Thanks,
Leslie Zhai

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

No branches or pull requests

2 participants