No rule to make target /opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2问题解决

编译autoware过程中遇到下面问题,在网上找了好长时间没有找到。

问题错误日志:

--- stderr: map_file                                                                                                                                     
make[2]: *** No rule to make target '/opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2', needed by 'devel/lib/map_file/points_map_loader'.  Stop.
make[1]: *** [CMakeFiles/points_map_loader.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target '/opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2', needed by 'devel/lib/map_file/points_map_filter'.  Stop.
make[1]: *** [CMakeFiles/points_map_filter.dir/all] Error 2
make[2]: *** No rule to make target '/opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2', needed by 'devel/lib/map_file/vector_map_loader'.  Stop.
make[1]: *** [CMakeFiles/vector_map_loader.dir/all] Error 2

问题解决办法:

根据以上错误日志提醒,很明显这里是找不到/opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2这个文件。

1)看了下该路径下的文件:

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ ll /opt/ros/kinetic/lib/liboro*
lrwxrwxrwx 1 root root     20 6月   8  2019 /opt/ros/kinetic/lib/liborocos-kdl.so -> liborocos-kdl.so.1.3
lrwxrwxrwx 1 root root     43 5月  29 10:52 /opt/ros/kinetic/lib/liborocos-kdl.so.1.3 -> /opt/ros/kinetic/lib/liborocos-kdl.so.1.3.0
-rw-r--r-- 1 root root 554208 6月   8  2019 /opt/ros/kinetic/lib/liborocos-kdl.so.1.3.0

日志中提醒需要的是/opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2,这里是/opt/ros/kinetic/lib/liborocos-kdl.so.1.3.0,说明版本不匹配。

于是将相应的错误提示在网上各种搜,也看到好多人遇到这个问题,但就是没有看到靠谱的解决方案。

折腾了半天没解决问题……突然见,恍然大悟,我可以更新版本啊。下载了源码自己编译不就完了,于是又在网上找该lib文件对应的源码,功夫不负有心人,终于找到了。代码链接如下:

https://github.com/orocos/orocos_kinematics_dynamics

2)下载代码:

zhuwsh@zhuwsh-TM1705:~/work_space$ git clone https://github.com/orocos/orocos_kinematics_dynamics.git
Cloning into 'orocos_kinematics_dynamics'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5825 (delta 0), reused 0 (delta 0), pack-reused 5821
Receiving objects: 100% (5825/5825), 1.66 MiB | 6.00 KiB/s, done.
Resolving deltas: 100% (3785/3785), done.
Checking connectivity... done.
zhuwsh@zhuwsh-TM1705:~/work_space$

3)编译:
 

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ cmake .
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Orocos KDL version  (1.4.0)
-- Setting build type to 'Release'
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
-- Performing Test HAVE_STL_CONTAINER_INCOMPLETE_TYPES
-- Performing Test HAVE_STL_CONTAINER_INCOMPLETE_TYPES - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zhuwsh/work_space/orocos_kinematics_dynamics/orocos_kdl
zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ make
Scanning dependencies of target orocos-kdl
[  1%] Building CXX object src/CMakeFiles/orocos-kdl.dir/trajectory_composite.cpp.o
[  3%] Building CXX object src/CMakeFiles/orocos-kdl.dir/rigidbodyinertia.cpp.o
[  4%] Building CXX object src/CMakeFiles/orocos-kdl.dir/utilities/ldl_solver_eigen.cpp.o
[  6%] Building CXX object src/CMakeFiles/orocos-kdl.dir/utilities/svd_eigen_Macie.cpp.o
[  7%] Building CXX object src/CMakeFiles/orocos-kdl.dir/utilities/svd_HH.cpp.o
[  9%] Building CXX object src/CMakeFiles/orocos-kdl.dir/utilities/svd_eigen_HH.cpp.o
[ 10%] Building CXX object src/CMakeFiles/orocos-kdl.dir/segment.cpp.o
[ 12%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolverpos_nr.cpp.o
[ 13%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainfdsolver_recursive_newton_euler.cpp.o
[ 15%] Building CXX object src/CMakeFiles/orocos-kdl.dir/path_point.cpp.o
[ 16%] Building CXX object src/CMakeFiles/orocos-kdl.dir/jntarrayacc.cpp.o
[ 18%] Building CXX object src/CMakeFiles/orocos-kdl.dir/treejnttojacsolver.cpp.o
[ 20%] Building CXX object src/CMakeFiles/orocos-kdl.dir/joint.cpp.o
[ 21%] Building CXX object src/CMakeFiles/orocos-kdl.dir/treeidsolver_recursive_newton_euler.cpp.o
[ 23%] Building CXX object src/CMakeFiles/orocos-kdl.dir/jntarray.cpp.o
[ 24%] Building CXX object src/CMakeFiles/orocos-kdl.dir/velocityprofile_traphalf.cpp.o
[ 26%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainidsolver_vereshchagin.cpp.o
[ 27%] Building CXX object src/CMakeFiles/orocos-kdl.dir/path_roundedcomposite.cpp.o
[ 29%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolverpos_nr_jl.cpp.o
[ 30%] Building CXX object src/CMakeFiles/orocos-kdl.dir/path.cpp.o
[ 32%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainidsolver_recursive_newton_euler.cpp.o
[ 33%] Building CXX object src/CMakeFiles/orocos-kdl.dir/trajectory.cpp.o
[ 35%] Building CXX object src/CMakeFiles/orocos-kdl.dir/frames_io.cpp.o
[ 36%] Building CXX object src/CMakeFiles/orocos-kdl.dir/treefksolverpos_recursive.cpp.o
[ 38%] Building CXX object src/CMakeFiles/orocos-kdl.dir/tree.cpp.o
[ 40%] Building CXX object src/CMakeFiles/orocos-kdl.dir/frameacc.cpp.o
[ 41%] Building CXX object src/CMakeFiles/orocos-kdl.dir/rotationalinertia.cpp.o
[ 43%] Building CXX object src/CMakeFiles/orocos-kdl.dir/frames.cpp.o
[ 44%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainfksolverpos_recursive.cpp.o
[ 46%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_givens.cpp.o
[ 47%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_nso.cpp.o
[ 49%] Building CXX object src/CMakeFiles/orocos-kdl.dir/trajectory_segment.cpp.o
[ 50%] Building CXX object src/CMakeFiles/orocos-kdl.dir/trajectory_stationary.cpp.o
[ 52%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolverpos_lma.cpp.o
[ 53%] Building CXX object src/CMakeFiles/orocos-kdl.dir/treeiksolverpos_online.cpp.o
[ 55%] Building CXX object src/CMakeFiles/orocos-kdl.dir/framevel.cpp.o
[ 56%] Building CXX object src/CMakeFiles/orocos-kdl.dir/rotational_interpolation_sa.cpp.o
[ 58%] Building CXX object src/CMakeFiles/orocos-kdl.dir/velocityprofile_spline.cpp.o
[ 60%] Building CXX object src/CMakeFiles/orocos-kdl.dir/articulatedbodyinertia.cpp.o
[ 61%] Building CXX object src/CMakeFiles/orocos-kdl.dir/treeiksolvervel_wdls.cpp.o
[ 63%] Building CXX object src/CMakeFiles/orocos-kdl.dir/path_composite.cpp.o
[ 64%] Building CXX object src/CMakeFiles/orocos-kdl.dir/path_line.cpp.o
[ 66%] Building CXX object src/CMakeFiles/orocos-kdl.dir/rotational_interpolation.cpp.o
[ 67%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chaindynparam.cpp.o
[ 69%] Building CXX object src/CMakeFiles/orocos-kdl.dir/jntarrayvel.cpp.o
[ 70%] Building CXX object src/CMakeFiles/orocos-kdl.dir/velocityprofile_rect.cpp.o
[ 72%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainjnttojacdotsolver.cpp.o
[ 73%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolvervel_wdls.cpp.o
[ 75%] Building CXX object src/CMakeFiles/orocos-kdl.dir/path_cyclic_closed.cpp.o
[ 76%] Building CXX object src/CMakeFiles/orocos-kdl.dir/path_circle.cpp.o
[ 78%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainjnttojacsolver.cpp.o
[ 80%] Building CXX object src/CMakeFiles/orocos-kdl.dir/velocityprofile_dirac.cpp.o
[ 81%] Building CXX object src/CMakeFiles/orocos-kdl.dir/treeiksolverpos_nr_jl.cpp.o
[ 83%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv.cpp.o
[ 84%] Building CXX object src/CMakeFiles/orocos-kdl.dir/kinfam_io.cpp.o
[ 86%] Building CXX object src/CMakeFiles/orocos-kdl.dir/jacobian.cpp.o
[ 87%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chainfksolvervel_recursive.cpp.o
[ 89%] Building CXX object src/CMakeFiles/orocos-kdl.dir/chain.cpp.o
[ 90%] Building CXX object src/CMakeFiles/orocos-kdl.dir/velocityprofile.cpp.o
[ 92%] Building CXX object src/CMakeFiles/orocos-kdl.dir/jntspaceinertiamatrix.cpp.o
[ 93%] Building CXX object src/CMakeFiles/orocos-kdl.dir/velocityprofile_trap.cpp.o
[ 95%] Building CXX object src/CMakeFiles/orocos-kdl.dir/utilities/error_stack.cxx.o
[ 96%] Building CXX object src/CMakeFiles/orocos-kdl.dir/utilities/utility_io.cxx.o
[ 98%] Building CXX object src/CMakeFiles/orocos-kdl.dir/utilities/utility.cxx.o
[100%] Linking CXX shared library liborocos-kdl.so
[100%] Built target orocos-kdl

4)安装:

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ sudo make install
[sudo] password for zhuwsh:
[100%] Built target orocos-kdl
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/share/orocos_kdl/cmake/orocos_kdl-config.cmake
-- Installing: /usr/local/share/orocos_kdl/cmake/orocos_kdl-config-version.cmake
-- Installing: /usr/local/share/orocos_kdl/cmake/OrocosKDLTargets.cmake
-- Installing: /usr/local/share/orocos_kdl/cmake/OrocosKDLTargets-release.cmake
-- Installing: /usr/local/share/orocos_kdl/package.xml
-- Installing: /usr/local/lib/liborocos-kdl.so.1.4.0
-- Installing: /usr/local/lib/liborocos-kdl.so.1.4
-- Installing: /usr/local/lib/liborocos-kdl.so
-- Set runtime path of "/usr/local/lib/liborocos-kdl.so.1.4.0" to "$ORIGIN/../lib"
-- Installing: /usr/local/include/kdl/chainfdsolver.hpp
-- Installing: /usr/local/include/kdl/velocityprofile_traphalf.hpp
-- Installing: /usr/local/include/kdl/chainiksolvervel_pinv_givens.hpp
-- Installing: /usr/local/include/kdl/stiffness.hpp
-- Installing: /usr/local/include/kdl/treefksolverpos_recursive.hpp
-- Installing: /usr/local/include/kdl/path_roundedcomposite.hpp
-- Installing: /usr/local/include/kdl/chainfdsolver_recursive_newton_euler.hpp
-- Installing: /usr/local/include/kdl/chainiksolvervel_pinv_nso.hpp
-- Installing: /usr/local/include/kdl/treeidsolver.hpp
-- Installing: /usr/local/include/kdl/chainjnttojacdotsolver.hpp
-- Installing: /usr/local/include/kdl/velocityprofile_rect.hpp
-- Installing: /usr/local/include/kdl/trajectory_segment.hpp
-- Installing: /usr/local/include/kdl/framevel.hpp
-- Installing: /usr/local/include/kdl/frameacc.hpp
-- Installing: /usr/local/include/kdl/frames_io.hpp
-- Installing: /usr/local/include/kdl/chainfksolver.hpp
-- Installing: /usr/local/include/kdl/jntarrayvel.hpp
-- Installing: /usr/local/include/kdl/chain.hpp
-- Installing: /usr/local/include/kdl/kinfam_io.hpp
-- Installing: /usr/local/include/kdl/trajectory.hpp
-- Installing: /usr/local/include/kdl/jacobian.hpp
-- Installing: /usr/local/include/kdl/treejnttojacsolver.hpp
-- Installing: /usr/local/include/kdl/treefksolver.hpp
-- Installing: /usr/local/include/kdl/path_composite.hpp
-- Installing: /usr/local/include/kdl/chainjnttojacsolver.hpp
-- Installing: /usr/local/include/kdl/chainfksolvervel_recursive.hpp
-- Installing: /usr/local/include/kdl/jntarrayacc.hpp
-- Installing: /usr/local/include/kdl/framevel_io.hpp
-- Installing: /usr/local/include/kdl/treeidsolver_recursive_newton_euler.hpp
-- Installing: /usr/local/include/kdl/kinfam.hpp
-- Installing: /usr/local/include/kdl/path_point.hpp
-- Installing: /usr/local/include/kdl/rotationalinertia.hpp
-- Installing: /usr/local/include/kdl/chainiksolverpos_nr_jl.hpp
-- Installing: /usr/local/include/kdl/velocityprofile_spline.hpp
-- Installing: /usr/local/include/kdl/velocityprofile_trap.hpp
-- Installing: /usr/local/include/kdl/treeiksolverpos_nr_jl.hpp
-- Installing: /usr/local/include/kdl/chaindynparam.hpp
-- Installing: /usr/local/include/kdl/treeiksolvervel_wdls.hpp
-- Installing: /usr/local/include/kdl/rigidbodyinertia.hpp
-- Installing: /usr/local/include/kdl/path_cyclic_closed.hpp
-- Installing: /usr/local/include/kdl/frames.hpp
-- Installing: /usr/local/include/kdl/velocityprofile_dirac.hpp
-- Installing: /usr/local/include/kdl/chainiksolvervel_wdls.hpp
-- Installing: /usr/local/include/kdl/tree.hpp
-- Installing: /usr/local/include/kdl/motion.hpp
-- Installing: /usr/local/include/kdl/chainidsolver_vereshchagin.hpp
-- Installing: /usr/local/include/kdl/chainiksolver.hpp
-- Installing: /usr/local/include/kdl/frameacc_io.hpp
-- Installing: /usr/local/include/kdl/trajectory_stationary.hpp
-- Installing: /usr/local/include/kdl/jntspaceinertiamatrix.hpp
-- Installing: /usr/local/include/kdl/treeiksolverpos_online.hpp
-- Installing: /usr/local/include/kdl/articulatedbodyinertia.hpp
-- Installing: /usr/local/include/kdl/chainidsolver_recursive_newton_euler.hpp
-- Installing: /usr/local/include/kdl/solveri.hpp
-- Installing: /usr/local/include/kdl/chainiksolverpos_nr.hpp
-- Installing: /usr/local/include/kdl/path.hpp
-- Installing: /usr/local/include/kdl/chainidsolver.hpp
-- Installing: /usr/local/include/kdl/jntarray.hpp
-- Installing: /usr/local/include/kdl/chainfksolverpos_recursive.hpp
-- Installing: /usr/local/include/kdl/rotational_interpolation_sa.hpp
-- Installing: /usr/local/include/kdl/kdl.hpp
-- Installing: /usr/local/include/kdl/treeiksolver.hpp
-- Installing: /usr/local/include/kdl/rotational_interpolation.hpp
-- Installing: /usr/local/include/kdl/segment.hpp
-- Installing: /usr/local/include/kdl/path_line.hpp
-- Installing: /usr/local/include/kdl/joint.hpp
-- Installing: /usr/local/include/kdl/chainiksolverpos_lma.hpp
-- Installing: /usr/local/include/kdl/chainiksolvervel_pinv.hpp
-- Installing: /usr/local/include/kdl/trajectory_composite.hpp
-- Installing: /usr/local/include/kdl/velocityprofile.hpp
-- Installing: /usr/local/include/kdl/path_circle.hpp
-- Installing: /usr/local/include/kdl/frames.inl
-- Installing: /usr/local/include/kdl/framevel.inl
-- Installing: /usr/local/include/kdl/frameacc.inl
-- Installing: /usr/local/include/kdl/config.h
-- Installing: /usr/local/include/kdl/utilities/rall2d.h
-- Installing: /usr/local/include/kdl/utilities/rall1d.h
-- Installing: /usr/local/include/kdl/utilities/utility_io.h
-- Installing: /usr/local/include/kdl/utilities/error.h
-- Installing: /usr/local/include/kdl/utilities/rall1d_io.h
-- Installing: /usr/local/include/kdl/utilities/utility.h
-- Installing: /usr/local/include/kdl/utilities/kdl-config.h
-- Installing: /usr/local/include/kdl/utilities/error_stack.h
-- Installing: /usr/local/include/kdl/utilities/traits.h
-- Installing: /usr/local/include/kdl/utilities/rallNd.h
-- Installing: /usr/local/include/kdl/utilities/rall2d_io.h
-- Installing: /usr/local/include/kdl/utilities/svd_eigen_HH.hpp
-- Installing: /usr/local/include/kdl/utilities/ldl_solver_eigen.hpp
-- Installing: /usr/local/include/kdl/utilities/scoped_ptr.hpp
-- Installing: /usr/local/include/kdl/utilities/svd_HH.hpp
-- Installing: /usr/local/include/kdl/utilities/svd_eigen_Macie.hpp
-- Installing: /usr/local/lib/pkgconfig/orocos-kdl.pc
-- Installing: /usr/local/lib/pkgconfig/orocos_kdl.pc

5)查看安装结果:

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ ll /usr/local/lib/liboro*
lrwxrwxrwx 1 root root       20 5月  29 10:42 /usr/local/lib/liborocos-kdl.so -> liborocos-kdl.so.1.4
lrwxrwxrwx 1 root root       22 5月  29 10:42 /usr/local/lib/liborocos-kdl.so.1.4 -> liborocos-kdl.so.1.4.0
-rw-r--r-- 1 root root   886848 5月  29 10:40 /usr/local/lib/liborocos-kdl.so.1.4.0

看到没有,新的版本已经出现了,不过这个版本是1.4.0的,比我们想要的要新一些。这个也解决不了问题啊。

怎么办?看一下有没有1.3的分支版本吧。

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/fix/pykdl-build_depend
  remotes/origin/fix/python-osx-el-capitan
  remotes/origin/fix/python3-joint-none
  remotes/origin/kinfam_refactored
  remotes/origin/master
  remotes/origin/refactor/travis-include-osx
  remotes/origin/release-1.3
  remotes/origin/simplify-add-delta-for-rotations

果然有1.3的分支版本。

6)于是更新代码,获取问题对应的1.3的版本:

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ git checkout release-1.3
Branch release-1.3 set up to track remote branch release-1.3 from origin.
Switched to a new branch 'release-1.3'


7)按照上边的步骤进行编译、安装。这次编译完成后,再查看:

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ ll /usr/local/lib/liborocos-kdl.so*
lrwxrwxrwx 1 root root     20 5月  29 10:45 /usr/local/lib/liborocos-kdl.so -> liborocos-kdl.so.1.3
lrwxrwxrwx 1 root root     22 5月  29 10:45 /usr/local/lib/liborocos-kdl.so.1.3 -> liborocos-kdl.so.1.3.2
-rw-r--r-- 1 root root 719816 5月  29 10:45 /usr/local/lib/liborocos-kdl.so.1.3.2
lrwxrwxrwx 1 root root     22 5月  29 10:42 /usr/local/lib/liborocos-kdl.so.1.4 -> liborocos-kdl.so.1.4.0
-rw-r--r-- 1 root root 886848 5月  29 10:40 /usr/local/lib/liborocos-kdl.so.1.4.0
zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$

果然有1.3.2的版本了。

8)链接:

zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ sudo rm -rf /opt/ros/kinetic/lib/liborocos-kdl.so.1.3
zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ sudo ln -s /opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2 /opt/ros/kinetic/lib/liborocos-kdl.so.1.3
zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$ ll /opt/ros/kinetic/lib/liboro*
lrwxrwxrwx 1 root root     20 6月   8  2019 /opt/ros/kinetic/lib/liborocos-kdl.so -> liborocos-kdl.so.1.3
lrwxrwxrwx 1 root root     43 5月  29 10:52 /opt/ros/kinetic/lib/liborocos-kdl.so.1.3 -> /opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2
-rw-r--r-- 1 root root 554208 6月   8  2019 /opt/ros/kinetic/lib/liborocos-kdl.so.1.3.0
-rw-r--r-- 1 root root 719816 5月  29 10:50 /opt/ros/kinetic/lib/liborocos-kdl.so.1.3.2
zhuwsh@zhuwsh-TM1705:~/work_space/orocos_kinematics_dynamics/orocos_kdl$

 

再编译的时候,果然解决了该问题,大功告成。

 

 

 

你可能感兴趣的:(编译相关)