桐城58网站在那里做,张家界市建设局网站,网站建设公司有哪些方面,企业宣传册封面素材8种机械键盘轴体对比本人程序员#xff0c;要买一个写代码的键盘#xff0c;请问红轴和茶轴怎么选#xff1f;This post will tell you how to cross compile gPRC static lib for ARM.前段时间尝试交叉编译gRPC遇到了不少的麻烦#xff0c;写篇post记录一下。gRPCPreparat…8种机械键盘轴体对比本人程序员要买一个写代码的键盘请问红轴和茶轴怎么选This post will tell you how to cross compile gPRC static lib for ARM.前段时间尝试交叉编译gRPC遇到了不少的麻烦写篇post记录一下。gRPCPreparationFirst of all, you should have gRPC source code. git clone it from github. Then update submodules:12cd grpcgit submodule update --initInstall zlib for your arm compiler[Optional]libz is one of gRPC dependencies. If you haven’t installed it for your arm compiler yet, you may need to install it. You can get zlib at zlib Home Site. After download and unzip it, set cross compiler and build it:1234export CCarm-linux-gnueabihf-gccexport ARarm-linux-gnueabihf-ar./configuremake -j4then install it if build succeed:1make install prefix/usr/arm-linux-gnueabihfCompile and install protobuf gRPC for HOSTprotobuf:1234cd grpc/third_party/protobuf./autogen.sh ./configure make -j4sudo make install -j4sudo ldconfiggRPC:12cd ..make -j4 sudo make install -j4 sudo ldconfigCross compile static lib for ARMmake plugins first:12make cleanmake plugins CCarm-linux-gnueabihf-gcc -j4Cross compile gRPC:12345678910export GRPC_CROSS_COMPILEtrueexport GRPC_CROSS_AROPTScr --targetelf32-littlemake -j4 HAS_PKG_CONFIGfalseCCarm-linux-gnueabihf-gccCXXarm-linux-gnueabihf-gRANLIBarm-linux-gnueabihf-ranlibLDarm-linux-gnueabihf-ldLDXXarm-linux-gnueabihf-gARarm-linux-gnueabihf-arPROTOBUF_CONFIG_OPTS--hostarm-linux-gnueabihf --with-protoc/usr/local/bin/protoc staticstatic is important. I tried to build shared lib but there will be a lot of errors because arm-linux-gnueabihf-ld doesn’t take “-Wl” as a parameter. If build succeed, you can find your static lib at “grpc/libs/opt”.