I got many undefine error when I compile libtorch

I use this libtorch in Leveldb:

I use C++17 for libtorch:

# C++ standard can be overridden when this is used as a sub-project.
if(NOT CMAKE_CXX_STANDARD)
  # This project requires C++11.
  set(CMAKE_CXX_STANDARD 17)
  set(CMAKE_CUDA_STANDARD 14)
  set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
  set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
  set(CMAKE_CXX_EXTENSIONS OFF)
endif(NOT CMAKE_CXX_STANDARD)

and leveldb can be built and all unit test and db_bench is passed

But when I linked leveldb to ycsb-cpp, I got a lots of undefine error just like this:

/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(times_collecter.cc.o): in function `leveldb::TimesCollecter::~TimesCollecter()':
times_collecter.cc:(.text+0x2e9): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: times_collecter.cc:(.text+0x3cc): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: times_collecter.cc:(.text+0x518): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: times_collecter.cc:(.text+0x541): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: times_collecter.cc:(.text+0x595): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(times_collecter.cc.o):times_collecter.cc:(.text+0x5bd): more undefined references to `c10::UndefinedTensorImpl::_singleton' follow
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `leveldb::Module::Module(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
module.cc:(.text+0x181): undefined reference to `torch::cuda::is_available()'
/usr/bin/ld: module.cc:(.text+0x1b5): undefined reference to `torch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::optional<c10::Device>, bool)'
/usr/bin/ld: module.cc:(.text+0x2a8): undefined reference to `torch::jit::Module::to(c10::Device, bool)'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `leveldb::Module::forward(std::deque<float, std::allocator<float> >)':
module.cc:(.text+0x730): undefined reference to `c10::impl::ExcludeDispatchKeyGuard::ExcludeDispatchKeyGuard(c10::DispatchKeySet)'
/usr/bin/ld: module.cc:(.text+0x7d3): undefined reference to `at::_ops::ones::call(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>)'
/usr/bin/ld: module.cc:(.text+0x817): undefined reference to `c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()'
/usr/bin/ld: module.cc:(.text+0x88d): undefined reference to `at::_ops::mean::call(at::Tensor const&, std::optional<c10::ScalarType>)'
/usr/bin/ld: module.cc:(.text+0x8d3): undefined reference to `at::_ops::std_correction::call(at::Tensor const&, c10::OptionalArrayRef<long>, std::optional<c10::Scalar> const&, bool)'
/usr/bin/ld: module.cc:(.text+0x90f): undefined reference to `at::_ops::sub__Tensor::call(at::Tensor&, at::Tensor const&, c10::Scalar const&)'
/usr/bin/ld: module.cc:(.text+0x91e): undefined reference to `at::_ops::div__Tensor::call(at::Tensor&, at::Tensor const&)'
/usr/bin/ld: module.cc:(.text+0x942): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: module.cc:(.text+0xb59): undefined reference to `torch::jit::Object::find_method(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: module.cc:(.text+0xbb7): undefined reference to `vtable for torch::jit::Method'
/usr/bin/ld: module.cc:(.text+0xc41): undefined reference to `torch::jit::Method::operator()(std::vector<c10::IValue, std::allocator<c10::IValue> >, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, c10::IValue, 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, c10::IValue> > > const&) const'
/usr/bin/ld: module.cc:(.text+0xf0f): undefined reference to `at::_ops::mul__Tensor::call(at::Tensor&, at::Tensor const&)'
/usr/bin/ld: module.cc:(.text+0xf36): undefined reference to `at::_ops::add__Tensor::call(at::Tensor&, at::Tensor const&, c10::Scalar const&)'
/usr/bin/ld: module.cc:(.text+0xf99): undefined reference to `at::_ops::mean::call(at::Tensor const&, std::optional<c10::ScalarType>)'
/usr/bin/ld: module.cc:(.text+0xfea): undefined reference to `at::_ops::item::call(at::Tensor const&)'
/usr/bin/ld: module.cc:(.text+0x1054): undefined reference to `c10::SymBool::guard_bool(char const*, long) const'
/usr/bin/ld: module.cc:(.text+0x108a): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text+0x10eb): undefined reference to `at::_ops::select_int::call(at::Tensor const&, long, c10::SymInt)'
/usr/bin/ld: module.cc:(.text+0x112a): undefined reference to `at::_ops::select_int::call(at::Tensor const&, long, c10::SymInt)'
/usr/bin/ld: module.cc:(.text+0x114f): undefined reference to `at::_ops::fill__Scalar::call(at::Tensor&, c10::Scalar const&)'
/usr/bin/ld: module.cc:(.text+0x115d): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: module.cc:(.text+0x117c): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: module.cc:(.text+0x13cc): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: module.cc:(.text+0x16f5): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text+0x1b1f): undefined reference to `c10::SymInt::guard_int(char const*, long) const'
/usr/bin/ld: module.cc:(.text+0x1b52): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text+0x1ba1): undefined reference to `c10::IValue::reportToTensorTypeError() const'
/usr/bin/ld: module.cc:(.text+0x1c29): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text+0x1c83): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text+0x1cae): undefined reference to `c10::SymFloat::guard_float(char const*, long) const'
/usr/bin/ld: module.cc:(.text+0x1cea): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text+0x1d55): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: module.cc:(.text+0x1dc6): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::IValue::destroy()':
module.cc:(.text._ZN3c106IValue7destroyEv[_ZN3c106IValue7destroyEv]+0x26): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::IValue::IValue(c10::IValue::Payload const&, c10::IValue::Tag)':
module.cc:(.text._ZN3c106IValueC2ERKNS0_7PayloadENS0_3TagE[_ZN3c106IValueC5ERKNS0_7PayloadENS0_3TagE]+0x23): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::IValue::IValue(c10::IValue const&)':
module.cc:(.text._ZN3c106IValueC2ERKS0_[_ZN3c106IValueC5ERKS0_]+0x27): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `ska_ordered::detailv3::sherwood_v3_table<std::pair<c10::IValue, c10::IValue>, c10::IValue, c10::detail::DictKeyHash, ska_ordered::detailv3::KeyOrValueHasher<c10::IValue, std::pair<c10::IValue, c10::IValue>, c10::detail::DictKeyHash>, c10::detail::DictKeyEqualTo, ska_ordered::detailv3::KeyOrValueEquality<c10::IValue, std::pair<c10::IValue, c10::IValue>, c10::detail::DictKeyEqualTo>, std::allocator<std::pair<c10::IValue, c10::IValue> >, std::allocator<ska_ordered::detailv3::sherwood_v3_entry<std::pair<c10::IValue, c10::IValue> > > >::~sherwood_v3_table()':
module.cc:(.text._ZN11ska_ordered8detailv317sherwood_v3_tableISt4pairIN3c106IValueES4_ES4_NS3_6detail11DictKeyHashENS0_16KeyOrValueHasherIS4_S5_S7_EENS6_14DictKeyEqualToENS0_18KeyOrValueEqualityIS4_S5_SA_EESaIS5_ESaINS0_17sherwood_v3_entryIS5_EEEED2Ev[_ZN11ska_ordered8detailv317sherwood_v3_tableISt4pairIN3c106IValueES4_ES4_NS3_6detail11DictKeyHashENS0_16KeyOrValueHasherIS4_S5_S7_EENS6_14DictKeyEqualToENS0_18KeyOrValueEqualityIS4_S5_SA_EESaIS5_ESaINS0_17sherwood_v3_entryIS5_EEEED5Ev]+0x3c): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `std::vector<c10::IValue, std::allocator<c10::IValue> >::~vector()':
module.cc:(.text._ZNSt6vectorIN3c106IValueESaIS1_EED2Ev[_ZNSt6vectorIN3c106IValueESaIS1_EED5Ev]+0x24): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o):module.cc:(.text._ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3c106IValueEESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev[_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3c106IValueEESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEED5Ev]+0x21): more undefined references to `c10::UndefinedTensorImpl::_singleton' follow
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::Scalar::toSymFloat() const':
module.cc:(.text._ZNK3c106Scalar10toSymFloatEv[_ZNK3c106Scalar10toSymFloatEv]+0xd5): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar10toSymFloatEv[_ZNK3c106Scalar10toSymFloatEv]+0x142): undefined reference to `c10::SymBool::guard_bool(char const*, long) const'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar10toSymFloatEv[_ZNK3c106Scalar10toSymFloatEv]+0x172): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar10toSymFloatEv[_ZNK3c106Scalar10toSymFloatEv]+0x1a3): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar10toSymFloatEv[_ZNK3c106Scalar10toSymFloatEv]+0x2cd): undefined reference to `c10::SymInt::guard_int(char const*, long) const'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar10toSymFloatEv[_ZNK3c106Scalar10toSymFloatEv]+0x300): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar10toSymFloatEv[_ZNK3c106Scalar10toSymFloatEv]+0x367): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::Scalar::toSymInt() const':
module.cc:(.text._ZNK3c106Scalar8toSymIntEv[_ZNK3c106Scalar8toSymIntEv]+0x46): undefined reference to `c10::SymInt::SymInt(c10::intrusive_ptr<c10::SymNodeImpl, c10::detail::intrusive_target_default_null_type<c10::SymNodeImpl> >)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar8toSymIntEv[_ZNK3c106Scalar8toSymIntEv]+0xb6): undefined reference to `c10::report_overflow(char const*)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar8toSymIntEv[_ZNK3c106Scalar8toSymIntEv]+0xe0): undefined reference to `c10::SymInt::promote_to_negative()'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar8toSymIntEv[_ZNK3c106Scalar8toSymIntEv]+0x132): undefined reference to `c10::SymBool::guard_bool(char const*, long) const'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar8toSymIntEv[_ZNK3c106Scalar8toSymIntEv]+0x215): undefined reference to `c10::SymFloat::guard_float(char const*, long) const'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar8toSymIntEv[_ZNK3c106Scalar8toSymIntEv]+0x24d): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::Scalar::toSymBool() const':
module.cc:(.text._ZNK3c106Scalar9toSymBoolEv[_ZNK3c106Scalar9toSymBoolEv]+0xcc): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar9toSymBoolEv[_ZNK3c106Scalar9toSymBoolEv]+0x11b): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar9toSymBoolEv[_ZNK3c106Scalar9toSymBoolEv]+0x14d): undefined reference to `c10::SymFloat::guard_float(char const*, long) const'
/usr/bin/ld: module.cc:(.text._ZNK3c106Scalar9toSymBoolEv[_ZNK3c106Scalar9toSymBoolEv]+0x18d): undefined reference to `c10::SymInt::guard_int(char const*, long) const'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::intrusive_ptr<c10::TensorImpl, c10::UndefinedTensorImpl>::reset_()':
module.cc:(.text._ZN3c1013intrusive_ptrINS_10TensorImplENS_19UndefinedTensorImplEE6reset_Ev[_ZN3c1013intrusive_ptrINS_10TensorImplENS_19UndefinedTensorImplEE6reset_Ev]+0xa): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `std::_MakeUniq<torch::autograd::AutogradMeta>::__single_object std::make_unique<torch::autograd::AutogradMeta, c10::TensorImpl*, bool&>(c10::TensorImpl*&&, bool&)':
module.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x29): undefined reference to `vtable for torch::autograd::AutogradMeta'
/usr/bin/ld: module.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x34): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: module.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x153): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: module.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x17b): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)'
/usr/bin/ld: module.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x180): undefined reference to `caffe2::TypeMeta::error_unsupported_typemeta(caffe2::TypeMeta)'
/usr/bin/ld: module.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x20e): undefined reference to `c10::AutogradMetaInterface::~AutogradMetaInterface()'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `std::_Optional_payload_base<torch::jit::Method>::_M_reset()':
module.cc:(.text._ZNSt22_Optional_payload_baseIN5torch3jit6MethodEE8_M_resetEv[_ZNSt22_Optional_payload_baseIN5torch3jit6MethodEE8_M_resetEv]+0x13): undefined reference to `vtable for torch::jit::Method'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `torch::autograd::make_variable(at::Tensor, bool, bool)':
module.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x14): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: module.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0xbf): undefined reference to `c10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete<c10::AutogradMetaInterface> >)'
/usr/bin/ld: module.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x183): undefined reference to `c10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete<c10::AutogradMetaInterface> >)'
/usr/bin/ld: module.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x29e): undefined reference to `c10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete<c10::AutogradMetaInterface> >)'
/usr/bin/ld: module.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x2dd): undefined reference to `c10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete<c10::AutogradMetaInterface> >)'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `c10::Dict<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, c10::List<c10::IValue> >::Dict()':
module.cc:(.text._ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC2Ev[_ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC5Ev]+0x2c): undefined reference to `c10::StringType::get()'
/usr/bin/ld: module.cc:(.text._ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC2Ev[_ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC5Ev]+0x513): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: module.cc:(.text._ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC2Ev[_ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC5Ev]+0x613): undefined reference to `c10::UndefinedTensorImpl::_singleton'
/usr/bin/ld: module.cc:(.text._ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC2Ev[_ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC5Ev]+0x7d1): undefined reference to `c10::ListType::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::Type::SingletonOrSharedTypePtr<c10::Type>)'
/usr/bin/ld: module.cc:(.text._ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC2Ev[_ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ListINS_6IValueEEEEC5Ev]+0x9d1): undefined reference to `c10::AnyType::get()'
/usr/bin/ld: /home/wangtingzheng_21/system/RallyDB/build/libleveldb.a(module.cc.o): in function `leveldb::Module::forward(std::deque<float, std::allocator<float> >) [clone .cold]':
module.cc:(.text.unlikely+0xff): undefined reference to `c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()'
collect2: error: ld returned 1 exit status
make: *** [Makefile:88: ycsb] Error 1

I try to use pre_cxx11 abi version, and add

CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0 -g

to ycsb-cpp

add

set(CMAKE_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=1")

to leveldb, but still build failed, why? And How can I passed the build?