I met error as following using libtorch binary with new ABI:
In function `c10::tensorTypeIdToBackend(c10::TensorTypeId)':
ocr.cpp:(.text+0x35d): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::backendToDeviceType(c10::Backend)':
ocr.cpp:(.text+0x5c3): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ocr.cpp:(.text+0x6e8): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::typeMetaToScalarType(caffe2::TypeMeta)':
ocr.cpp:(.text+0xdd5): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `LoadModels(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, torch::jit::script::Module&, torch::jit::script::Module&, torch::jit::script::Module)':
ocr.cpp:(.text+0x135f): undefined reference to `torch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<c10::Device>, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)'
ocr.cpp:(.text+0x13af): undefined reference to `torch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<c10::Device>, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)'
ocr.cpp:(.text+0x13fe): undefined reference to `torch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<c10::Device>, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::Device::validate()':
ocr.cpp:(.text._ZN3c106Device8validateEv[_ZN3c106Device8validateEv]+0x10f): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ocr.cpp:(.text._ZN3c106Device8validateEv[_ZN3c106Device8validateEv]+0x256): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::operator<<(std::ostream&, c10::Layout)':
ocr.cpp:(.text._ZN3c10lsERSoNS_6LayoutE[_ZN3c10lsERSoNS_6LayoutE]+0x155): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::intrusive_ptr_target::~intrusive_ptr_target()':
ocr.cpp:(.text._ZN3c1020intrusive_ptr_targetD2Ev[_ZN3c1020intrusive_ptr_targetD5Ev]+0x12b): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ocr.cpp:(.text._ZN3c1020intrusive_ptr_targetD2Ev[_ZN3c1020intrusive_ptr_targetD5Ev]+0x259): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o:ocr.cpp:(.text._ZN3c1011StorageImplC2EN6caffe28TypeMetaElNS_7DataPtrEPNS_9AllocatorEb[_ZN3c1011StorageImplC5EN6caffe28TypeMetaElNS_7DataPtrEPNS_9AllocatorEb]+0x1bf): more undefined references to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::Symbol::dimname(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ocr.cpp:(.text._ZN3c106Symbol7dimnameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN3c106Symbol7dimnameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x3b): undefined reference to `c10::Symbol::fromQualString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::IValue::toTensor() &&':
ocr.cpp:(.text._ZNO3c106IValue8toTensorEv[_ZNO3c106IValue8toTensorEv]+0x11d): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `at::ATenDispatch::getOpTable(char const*) const':
ocr.cpp:(.text._ZNK2at12ATenDispatch10getOpTableEPKc[_ZNK2at12ATenDispatch10getOpTableEPKc]+0x180): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `at::Context::getDeviceFromPtr(void*, c10::DeviceType)':
ocr.cpp:(.text._ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE[_ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE]+0x113): undefined reference to `c10::DeviceTypeName[abi:cxx11](c10::DeviceType, bool)'
ocr.cpp:(.text._ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE[_ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE]+0x1ab): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `at::from_blob(void*, c10::ArrayRef<long>, c10::ArrayRef<long>, std::function<void (void*)> const&, c10::TensorOptions const&)':
ocr.cpp:(.text._ZN2at9from_blobEPvN3c108ArrayRefIlEES3_RKSt8functionIFvS0_EERKNS1_13TensorOptionsE[_ZN2at9from_blobEPvN3c108ArrayRefIlEES3_RKSt8functionIFvS0_EERKNS1_13TensorOptionsE]+0x1e5): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `torch::autograd::make_variable(at::Tensor, bool, bool)':
ocr.cpp:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x108): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::intrusive_ptr<c10::intrusive_ptr_target, c10::detail::intrusive_target_default_null_type<c10::intrusive_ptr_target> >::reclaim(c10::intrusive_ptr_target*)':
ocr.cpp:(.text._ZN3c1013intrusive_ptrINS_20intrusive_ptr_targetENS_6detail34intrusive_target_default_null_typeIS1_EEE7reclaimEPS1_[_ZN3c1013intrusive_ptrINS_20intrusive_ptr_targetENS_6detail34intrusive_target_default_null_typeIS1_EEE7reclaimEPS1_]+0x145): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::KernelFunction const& c10::DispatchTable::lookup_<c10::DispatchTable::lookup(c10::TensorTypeId) const::{lambda()#1}>(c10::DispatchTable::lookup(c10::TensorTypeId) const::{lambda()#1} const&) const':
ocr.cpp:(.text._ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_[_ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_]+0x1e2): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o:ocr.cpp:(.text._ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_[_ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_]+0x3a4): more undefined references to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow
tools/libtools.so: undefined reference to `torch::jit::parseSchemaOrName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'