Paddle2ONNX
Paddle2ONNX copied to clipboard
Cannot build on Jetson Xavier AGX with JetPack 5.1
I have followed the instructions found here: https://github.com/PaddlePaddle/Paddle2ONNX/blob/develop/docs/zh/compile.md
I get below error when I try to: python setup.py install
[100%] Linking CXX shared module paddle2onnx_cpp2py_export.cpython-38-aarch64-linux-gnu.so
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): in function
google::protobuf::EnumDescriptor::CopyTo(google::protobuf::EnumDescriptorProto*) const':
(.text+0x390c): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): in function
google::protobuf::Descriptor::CopyTo(google::protobuf::DescriptorProto*) const':
(.text+0xdf9c): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): in function
google::protobuf::FileDescriptor::CopyTo(google::protobuf::FileDescriptorProto*) const':
(.text+0xe1fc): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.o): in function
google::protobuf::internal::ArenaStringPtr::CreateInstance(google::protobuf::Arena*, std::__cxx11::basic_string<char, std::char_traits_ZNKSt5ctypeIcE8do_widenEc' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/lib/aarch64-linux-gnu/libprotobuf.a(int128.o): in function
google::protobuf::operator<<(std::ostream&, google::protobuf::uint128 const&)':
(.text+0xadc): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(int128.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZNKSt5ctypeIcE8do_widenEc' which may bind externally can not be used when making a shared object; recompile with -fPIC (.text+0xb14): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(int128.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZNKSt5ctypeIcE8do_widenEc' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text+0xb4c): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(int128.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZNKSt5ctypeIcE8do_widenEc' which may bind externally can not be used when making a shared object; recompile with -fPIC (.text+0xb78): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): in function google::protobuf::EnumDescriptorProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)': (.text+0x1d934): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): in function google::protobuf::DescriptorProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)': (.text+0x1ff5c): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): in function google::protobuf::SourceCodeInfo_Location::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)': (.text+0x209e4): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(descriptor.pb.o): in function google::protobuf::FileDescriptorProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)': (.text+0x21650): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(generated_message_reflection.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(generated_message_reflection.o): in function google::protobuf::internal::GeneratedMessageReflection::AddString(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const': (.text+0xc854): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(generated_message_reflection.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(generated_message_reflection.o): in function void google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::internal::GenericTypeHandler<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(void**, void**, int, int)': (.text._ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS1_18GenericTypeHandlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEvPPvSD_ii[_ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS1_18GenericTypeHandlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEvPPvSD_ii]+0x7c): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(message.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(message.o): in function void google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedSlowWithCopy<google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::TypeHandler>(google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::TypeHandler::Type*, google::protobuf::Arena*, google::protobuf::Arena*)': (.text._ZN6google8protobuf8internal20RepeatedPtrFieldBase24AddAllocatedSlowWithCopyINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerEEEvPNT_4TypeEPNS0_5ArenaESH_[_ZN6google8protobuf8internal20RepeatedPtrFieldBase24AddAllocatedSlowWithCopyINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerEEEvPNT_4TypeEPNS0_5ArenaESH_]+0x1e4): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(extension_set.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(extension_set.o): in function google::protobuf::internal::ExtensionSet::MutableString[abi:cxx11](int, unsigned char, google::protobuf::FieldDescriptor const*)': (.text+0xd40c): dangerous relocation: unsupported relocation /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libprotobuf.a(extension_set.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libprotobuf.a(extension_set.o): in function `google::protobuf::internal::ExtensionSet::AddString[abi:cxx11](int, unsigned char, google::protobuf::FieldDescriptor const*)':
(.text+0xd7a0): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/paddle2onnx_cpp2py_export.dir/build.make:1910: paddle2onnx_cpp2py_export.cpython-38-aarch64-linux-gnu.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:206: CMakeFiles/paddle2onnx_cpp2py_export.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Traceback (most recent call last):
File "setup.py", line 299, in