I have installed grpc on my host machine and i have taken the source code 
of grpc and i cross compiled to arm64 architecture.

for the cross compilation i have used the cmake command as follows.

sudo cmake 
-DCMAKE_TOOLCHAIN_FILE=/home/acer/cross_compile_grpc/grpc_install/grpc/toolchain.cmake
 
\
      -DCMAKE_BUILD_TYPE=Release \
      -DBUILD_SHARED_LIBS=ON \
      
-DCMAKE_INSTALL_PREFIX=/home/acer/cross_compile_grpc/grpc_install/grpc/grpc_install_2
 
\
      ../..

sudo make -j4 install

*toolchain.cmake* file contents are

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR arm64)
#set(devel_root /tmp/raspberrypi_root)
#set(CMAKE_STAGING_PREFIX ${devel_root}/stage)
#set(tool_root ${devel_root}/raspberrypi-tools/arm-bcm2708)
#set(CMAKE_SYSROOT 
${tool_root}/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot)
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)



after cross compiling i have a *"grpc_cpp_plugin"* which is cross compled 
and the proprties as follows.

grpc_cpp_plugin: ELF 64-bit LSB shared object, *ARM aarch64*, version 1 
(SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for 
GNU/Linux 3.7.0, BuildID[sha1]=48ee1bc844c70c0c3aa7691715bdf1236f84b46f, 
not stripped.

using the above grpc_cpp_plugin  i am getting the error like  *grpc_cpp_plugin: 
program not found or is not executable*

and also the cross compiler i have used is *aarch64-linux-gnu-g++**​*.
and also if i compile in eclipse only two files that is getting generated( 
i should get total four files including grpc services) and the files are as 
follows.

*SimulatorServices.pb.cc and **SimulatorServices.pb.h**​*

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/463b512e-87db-4b04-bb6d-d885838e9d6fo%40googlegroups.com.

Reply via email to