OctoMap / octomap

An Efficient Probabilistic 3D Mapping Framework Based on Octrees. Contains the main OctoMap library, the viewer octovis, and dynamicEDT3D.
http://octomap.github.io
1.87k stars 652 forks source link

cmake error during installation #402

Closed felixf4xu closed 9 months ago

felixf4xu commented 11 months ago

Hi,

I am compiling octomap in an autoware.auto workspace using colcon but I got this error:

Starting >>> octomap-distribution
[  4%] Built target octomath-static
[  7%] Built target octomath
[ 17%] Built target octomap-static
[ 27%] Built target octomap
[ 36%] Built target graph2tree
[ 36%] Built target dynamicedt3d-static
[ 36%] Built target compare_octrees
[ 37%] Built target edit_octree
[ 39%] Built target bt2vrml
[ 46%] Built target octovis-static
[ 36%] Built target eval_octree_accuracy
[ 50%] Built target binvox2bt
[ 48%] Built target octree2pointcloud
[ 51%] Built target convert_octree
[ 53%] Built target simple_example
[ 55%] Built target normals_example
[ 57%] Built target intersection_example
[ 59%] Built target log2graph
[ 61%] Built target dynamicedt3d
[ 68%] Built target octovis-shared
[ 72%] Built target exampleEDTOctomapStamped
[ 72%] Built target exampleEDT3D
[ 74%] Built target exampleEDTOctomap
[100%] Built target octovis
-- Install configuration: "RelWithDebInfo"
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/AbstractOcTree.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/AbstractOccupancyOcTree.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/ColorOcTree.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/CountingOcTree.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/MCTables.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/MapCollection.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/MapCollection.hxx
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/MapNode.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/MapNode.hxx
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTree.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeBase.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeBaseImpl.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeBaseImpl.hxx
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeDataNode.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeDataNode.hxx
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeIterator.hxx
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeKey.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeNode.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OcTreeStamped.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OccupancyOcTreeBase.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/OccupancyOcTreeBase.hxx
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/Pointcloud.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/ScanGraph.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/octomap.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/octomap_deprecated.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/octomap_timing.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/octomap_types.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/octomap_utils.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/math/Pose6D.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/math/Quaternion.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/math/Utils.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/include/octomap/math/Vector3.h
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/share/octomap/package.xml
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/share/ament_index/resource_index/packages/octomap
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/share/octomap/octomap-config.cmake
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/share/octomap/octomap-config-version.cmake
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/lib/pkgconfig/octomap.pc
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/lib/liboctomath.so.1.9.8
-- Installing: /home/ccccc/github/autoware/install/octomap-distribution/lib/liboctomath.so.1.9
CMake Error at octomap/src/math/cmake_install.cmake:67 (file):
  file RPATH_CHANGE could not write new RPATH:

    /home/ccccc/github/autoware/install/octomap-distribution/lib

  to the file:

    /home/ccccc/github/autoware/install/octomap-distribution/lib/liboctomath.so.1.9.8

  The current RUNPATH is:

    ::::::::::::::::::::::::::::::::::::::::::::

  which does not contain:

    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

  as was expected.
Call Stack (most recent call first):
  octomap/cmake_install.cmake:108 (include)
  cmake_install.cmake:47 (include)

octomap/src/math/cmake_install.cmake is at /home/ccccc/github/autoware/build/octomap-distribution/octomap/src and its line 67 is:

file(RPATH_CHANGE
           FILE "${file}"
           OLD_RPATH "/home/ccccc/github/autoware/src/gitdeps/octomap/lib:::::::::"
           NEW_RPATH "/home/ccccc/github/autoware/install/octomap-distribution/lib")

I'm not sure where does the RUNPATH of :::::::::::::::::::::::::::::::::::::::::::: comes from.

felixf4xu commented 11 months ago

in my case, I need to set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) to fix the error.