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 11 Answer
Reset to default 0Possibilities:
- you are trying to execute
protoc
as a shell script. - you are feeding an executable as an input file to
protoc
.