Need Help on Cross compilation of GRPC.

468 views
Skip to first unread message

Neeli Srinivas

unread,
Dec 11, 2017, 1:28:44 AM12/11/17
to Protocol Buffers
Hi All,

This is Srinivas.  I am new to GRPC, I am trying to compile latest grpc (v1.7.2)  version.
It's working in X86 architecture. when i am trying to compile for ARM architecture(cortex A9) it's not working.
Please guide me the steps. One more thing  i am using protobuf 3.4.0 version. I am going to explain what i followed in below.

followed steps:
------------------ 
Environment Details:
1)linux 14.04 
2)uname -a :
    Linux aaa 3.13.0-135-generic #184-Ubuntu SMP Wed Oct 18 11:55:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

steps:1
---------

-> Compiled for x86 
-> GRPC version V1.7.2
-> Protobuf 3.4.0
-> Compilation was success 

$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig # refresh shared library cache.

 
Steps:2 (Trying to compile for ARM by using cross compiler)
---------- ---------------------------------------------------------------------

- Using cross compilers 
     arm-linux-gnueabi-gcc
     arm-linux-gnueabi-g++.
-> cd grpc
-> git submodule update --init
-> ./autogen.sh
-> ./configure  --host=arm-linux --with-protoc=/home/xxxx/grpc/third_party/protobuf/COMP/bin/protoc --prefix=/home/xxxx/grpc/third_party/protobuf/build
-> make 
-> make check
-> sudo make install


In this process i am getting in errors. while doing sudo make install facing issues. 

** Here My question is ?
 - What i am following is it correct or not ?
 - If my procedure wrong . please share me the correct procedure. 
-Advanced thanks




Thanks
Srinivas Neeli



 

Adam Cozzette

unread,
Dec 11, 2017, 7:35:30 PM12/11/17
to Neeli Srinivas, Protocol Buffers
What errors are you getting? It looks to me like in your step 2 you are trying to install cross-compiled code, and I would suspect this would be a problem since you would be installing code which is not built for the machine's architecture.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Neeli Srinivas

unread,
Dec 12, 2017, 9:41:09 AM12/12/17
to Protocol Buffers
Thanks Adam for giving responce.

Today i tried same thing. i am getting error with that. I am sharing the procedure what i followed. please look at once.

- cloned grpc
- updated submodule
- exporting corss compiler  
- cd /grpc/third_party/protobuf/
- /grpc/third_party/protobuf$ ./autogen.sh
- make HAS_PKG_CONFIG=false CC=arm-linux-gcc CXX=arm-linux-g++  RANLIB=arm-linux-ranlib LD=arm-linux-ld LDXX=arm-linux-g++ AR=arm-linux-gcc-ar PROTOBUF_CONFIG_OPTS="--host=arm-linux --with-protoc=/usr/local/bin/protoc --prefix=/home/srinin3/OUT_PUT" static

I tried above things. after this my error is

[MAKE]    Generating cache.mk
[AR]      Creating /home/srinin3/grpc/libs/opt/libares.a
sorry - this program has been built without plugin support
make: *** [/home/srinin3/grpc/libs/opt/libares.a] Error 1


Could you please tell me the process for resolving this issue.

Thanks
Srinivas Neeli

 

Adam Cozzette

unread,
Dec 14, 2017, 12:22:59 PM12/14/17
to Neeli Srinivas, Protocol Buffers
It looks like the part of the build that's failing is related to gRPC and not protobuf, right? You might want to ask about this on the gRPC mailing list.

--
Reply all
Reply to author
Forward
0 new messages