ros / urdf

Repository for URDF parsing code
63 stars 41 forks source link

cmake error, persists even with rostest installed #41

Closed yuri2078 closed 1 year ago

yuri2078 commented 1 year ago
/opt/boost1.69/include/boost/algorithm/string/split.hpp:146:50:   required from ‘SequenceSequenceT& boost::algorithm::split(SequenceSequenceT&, RangeT&, PredicateT, token_compress_mode_type) [with SequenceSequenceT = std::vector<std::__cxx11::basic_string<char> >; RangeT = const std::__cxx11::basic_string<char>; PredicateT = detail::is_any_ofF<char>]’
/opt/ros/melodic/include/pluginlib/./class_loader_imp.hpp:485:15:   required from ‘std::string pluginlib::ClassLoader<T>::getName(const std::string&) [with T = urdf::URDFParser; std::string = std::__cxx11::basic_string<char>]’
/opt/ros/melodic/include/pluginlib/./class_loader_imp.hpp:480:13:   required from here
/opt/boost1.69/include/boost/concept/usage.hpp:16:48: 警告:‘this’ pointer is null [-Wnonnull]
   16 |     ~usage_requirements() { ((Model*)0)->~Model(); }
      |                             ~~~~~~~~~~~~~~~~~~~^~
/opt/boost1.69/include/boost/concept/usage.hpp:30:7: 附注:in a call to non-static member function ‘boost::SinglePassRangeConcept<T>::~SinglePassRangeConcept() [with T = const boost::iterator_range<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > >]’
   30 |       ~model()
      |       ^
/opt/boost1.69/include/boost/range/concepts.hpp:284:9: 附注:in expansion of macro ‘BOOST_CONCEPT_USAGE’
  284 |         BOOST_CONCEPT_USAGE(SinglePassRangeConcept)
      |         ^~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/urdf.dir/build.make:76:CMakeFiles/urdf.dir/src/model.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:677:CMakeFiles/urdf.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2
==> 错误: 在 build() 中发生一个错误。    正在放弃...
 -> 生成时出错: ros-melodic-urdf

OS: Arch Linux x86_64

yuri2078 commented 1 year ago

Found a solution, if arch users use aur to build, go directly to~/.cache/yay/ros-melodic-urdf/src/urdf-1.13.2/urdf and change the c++ version of CMakeLists to 17. Then use makepkg --noextractto rebuild and continue the installation

yuri2078 commented 1 year ago

I'm sorry for asking the question and solving it so quickly afterwards. I really struggled for a long time and only came to ask for help as a last resort. If I have caused any inconvenience, I apologize sincerely.