我正在尝试为Arm-android交叉编译GRPC C ++,在链接一些库时我从ld得到了这些错误:
arm-linux-androideabi-ld: error: /grpc/objs/opt/src/cpp/client/client_context.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
arm-linux-androideabi-ld: error: /grpc/objs/opt/src/cpp/server/server.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
arm-linux-androideabi-ld: error: /grpc/objs/opt/src/cpp/util/status.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
src/cpp/client/client_context.cc:55: error: undefined reference to '__dso_handle'
include/grpc++/impl/codegen/status.h:53: error: undefined reference to '__dso_handle'
include/grpc++/impl/grpc_library.h:61: error: undefined reference to '__dso_handle'
有谁知道这个错误的原因是什么? .cc文件都使用-fPIC
标志进行编译。