Cross compile for ARM

52 views
Skip to first unread message

sachin chadha

unread,
Jul 19, 2019, 4:41:02 AM7/19/19
to Protocol Buffers
Hi,

I am trying to cross compile protocol buffers for ARM on a docker container (x86 Linux). I have a pre-compiled version of protoc and the container has only cross build tools installed with no host g++ / gcc available. During ./configure i see the following error:

checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `protocol_buffer_3.3.0_arm_cross_compile/protobuf':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details

Why do protocol buffer needs Host g++ ? Is it for gmock ? And can this be disabled somehow ?

Sachin

Adam Cozzette

unread,
Jul 19, 2019, 12:25:24 PM7/19/19
to sachin chadha, Protocol Buffers
The build ordinarily relies on the host g++ to build protoc. I believe you can work around this problem by running "./configure --with-protoc=<path to your prebuilt protoc>" and then the build will use the provided protoc and not attempt to build a new one.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/b8ba1df8-64d8-4dc8-9be3-b75872fc2538%40googlegroups.com.

sachin chadha

unread,
Jul 23, 2019, 4:33:42 AM7/23/19
to Protocol Buffers
No. That's not it. I was using a precompiled protoc but still it requires g++. Any other pointers ?


On Friday, 19 July 2019 18:25:24 UTC+2, Adam Cozzette wrote:
The build ordinarily relies on the host g++ to build protoc. I believe you can work around this problem by running "./configure --with-protoc=<path to your prebuilt protoc>" and then the build will use the provided protoc and not attempt to build a new one.

On Fri, Jul 19, 2019 at 1:41 AM sachin chadha <sachin...@gmail.com> wrote:
Hi,

I am trying to cross compile protocol buffers for ARM on a docker container (x86 Linux). I have a pre-compiled version of protoc and the container has only cross build tools installed with no host g++ / gcc available. During ./configure i see the following error:

checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `protocol_buffer_3.3.0_arm_cross_compile/protobuf':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details

Why do protocol buffer needs Host g++ ? Is it for gmock ? And can this be disabled somehow ?

Sachin

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prot...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages