Yes, it's definitely doable to cross compile for ARM - in fact we do it regularly for some of our prebuilt binaries.
Now each environment and case is different. What steps are you following exactly? On Thu, Aug 30, 2018 at 9:05 AM Mark Fine <[email protected]> wrote: > Hi! > > We're having issues cross compiling gRPC in buildroot. There's been some > prior work on getting gRPC into buildroot: > > https://gfiber.googlesource.com/buildroot/+/refs/heads/master/package/grpc > http://lists.busybox.net/pipermail/buildroot/2017-April/189714.html > https://patchwork.ozlabs.org/patch/917779/ > > but nothing seems to have made it to upstream. In particular, we're > running into issues around host compiling having target libraries included > and linked against. Here's an example of host linking against target > libraries: > > c++ > -L/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr//lib > > -Wl,-rpath,/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr//lib > -flto -flto -g -fPIC -Llibs/opt -pthread > > -L/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib > > -L/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib > > /piksi_buildroot/buildroot/output/build/grpc_custom-v1.12.0/objs/opt/src/compiler/cpp_plugin.o > /piksi_buildroot/buildroot/output/build/grpc_custom-v1.12.0/libs/opt/libgrpc_plugin_support.a > -lprotoc -lprotobuf -ldl -lrt -lm -lpthread -lz -lcares -lprotoc > -lprotobuf -o > /piksi_buildroot/buildroot/output/build/grpc_custom-v1.12.0/bins/opt/grpc_cpp_plugin > > Here's an example of host including target libraries: > > /usr/bin/g++ -std=c++11 > > -I/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/include > -pthread -Ithird_party/googletest/googletest/include > -Ithird_party/googletest/googlemock/include > -I/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/include > -Ithird_party/address_sorting/include -g -Wall -Wextra -Werror > -Wno-long-long -Wno-unused-parameter -DOSATOMIC_USE_INLINED=1 > -Wno-deprecated-declarations -O2 -Wframe-larger-than=16384 -fPIC -I. > -Iinclude > -I/piksi_buildroot/buildroot/output/build/grpc_custom-v1.12.0/gens > -DPB_FIELD_16BIT -DNDEBUG -DINSTALL_PREFIX=\"/usr/local\" > > -I/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/include > > -I/piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/include > -MMD -MF > /piksi_buildroot/buildroot/output/build/grpc_custom-v1.12.0/objs/opt/src/compiler/cpp_generator.dep > -c -o > /piksi_buildroot/buildroot/output/build/grpc_custom-v1.12.0/objs/opt/src/compiler/cpp_generator.o > src/compiler/cpp_generator.cc > In file included from > /piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/include/features.h:447:0, > from > /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39, > from > /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507, > from /usr/include/c++/6/bits/stl_algobase.h:59, > from /usr/include/c++/6/bits/stl_tree.h:63, > from /usr/include/c++/6/map:60, > from src/compiler/cpp_generator.cc:19: > /piksi_buildroot/buildroot/output/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/include/gnu/stubs.h:7:29: > fatal error: gnu/stubs-soft.h: No such file or directory > # include <gnu/stubs-soft.h> > ^ > > Has anyone had success cross compiling gRPC on buildroot? Or just cross > compiling gRPC on ARM? The interactions between the host and target > compiling with and without the GRPC_CROSS_COMPILE flag are causing us > issues, especially around the host plugins. Thanks for any help! > > Mark > > -- > 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 post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/grpc-io. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/6ef7f44c-60f9-4afe-92ff-2ba139febf12%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/6ef7f44c-60f9-4afe-92ff-2ba139febf12%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAOWnRi8Hk%2Bo%2BVgoP5fU9kd-3Czf6bo1bxOM0J-X5vn_6_MPvvg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
smime.p7s
Description: S/MIME Cryptographic Signature
