最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

toolchain - cross-compiling proto files in Bazel - Stack Overflow

programmeradmin2浏览0评论

I'm using a ubuntu 22.04 and trying to compile .proto file to arm64. When I provide the platform with proper toolchains for the arm and try to build on my x86_64 pc, I get the following error.

I did check the type of the protoc binary in the mentioned bazel-out folder and it is of time arm64 which I understand is the cause of the problem. Is there some toolchain configuration for protoc that needs to be mentioned that I missed so that I compiles with the host machine architecture not the target machine?

Thanks.

bazel-out/k8-opt-exec-ST-cad1535d3526/bin/external/protobuf~/protoc: 1: ELF��@��I@8: not found bazel-out/k8-opt-exec-ST-cad1535d3526/bin/external/protobuf~/protoc: 2: Syntax error: word unexpected (expecting ")")

Trying to cross-compile my .proto code on Bazel and was expecting an output file instead running into the error.

I'm using a ubuntu 22.04 and trying to compile .proto file to arm64. When I provide the platform with proper toolchains for the arm and try to build on my x86_64 pc, I get the following error.

I did check the type of the protoc binary in the mentioned bazel-out folder and it is of time arm64 which I understand is the cause of the problem. Is there some toolchain configuration for protoc that needs to be mentioned that I missed so that I compiles with the host machine architecture not the target machine?

Thanks.

bazel-out/k8-opt-exec-ST-cad1535d3526/bin/external/protobuf~/protoc: 1: ELF��@��I@8: not found bazel-out/k8-opt-exec-ST-cad1535d3526/bin/external/protobuf~/protoc: 2: Syntax error: word unexpected (expecting ")")

Trying to cross-compile my .proto code on Bazel and was expecting an output file instead running into the error.

Share Improve this question asked Mar 14 at 15:50 rahul naraharirahul narahari 1
Add a comment  | 

1 Answer 1

Reset to default 0

Possibilities:

  • you are trying to execute protoc as a shell script.
  • you are feeding an executable as an input file to protoc.
发布评论

评论列表(0)

  1. 暂无评论