Universal_Robots_ROS_Driver icon indicating copy to clipboard operation
Universal_Robots_ROS_Driver copied to clipboard

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

Open pkoprov opened this issue 2 years ago • 4 comments

Same issue is persistent. When the line 26 in src/universal_robot/ur_kinematics/CMakeLists.txt contains include_directories(SYSTEM ${Boost_INCLUDE_DIR}) instead of `include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) I created a pull request that adds S to DIR https://github.com/ros-industrial/universal_robot/pull/635

          Thanks @FinnLinxxx for trying the suggestions and your detailed output. It's probably two issues. The first one being the obscure `/include` whose origin we need to clarify and the second being the unset `Boost_INCLUDE_DIR` that cmake is complaining about.

Concerning the second issue, from your build output, I get that Boost is found via

/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake

which only defines Boost_INCLUDE_DIRS via get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES) but not Boost_INCLUDE_DIR. Note the additional S.

I'm not sure right now, but I could imagine that this line dates back to older Boost versions. Inside your fmauch_universal_robot/ur_kinematics/CMakeLists.txt, try replacing the include (line 26) with this:

include_directories(SYSTEM ${Boost_INCLUDE_DIRS})

to see if this fixes the build issue.

Originally posted by @stefanscherzinger in https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/issues/432#issuecomment-895387436

pkoprov avatar Apr 29 '23 16:04 pkoprov

Update: The issue does not persist with Nvidia Jetson Xavier DevKit on Jetpack 5.1.1 Tegra R35.3.1 "20.04.6 LTS (Focal Fossa)" The package builds without problems, even though line 26 in CMakeListsts.txt of ur_kinematics package contains include_directories(SYSTEM ${Boost_INCLUDE_DIR})

pkoprov avatar May 02 '23 01:05 pkoprov

This issue has not been updated for a long time. If no further updates are added, this will be closed automatically. Comment on the issue to prevent automatic closing.

github-actions[bot] avatar Jul 31 '23 22:07 github-actions[bot]

Copying my comment over from Issue https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/issues/432#issuecomment-2005011899:

I have noticed that if I do a clean catkin_make (without build and devel folders present) right from the computer or through SSH, then it fully compiles and the errors are absent. However, if I catkin_make from through RDP (specifically, xRPD), then both of these errors arise.

If catkin_make does compile, then I am also able to compile it without errors thereafter using RDP as long as I don't delete the build and devel folders.

Solution:

  • If possible, try and catkin_make right from the computer or SSH, and not through RDP.

  • (Not recommended) If accessing the computer directly or through SSH is not possible for your situation, then running the following commands in your catkin_ws root will fix or "bypass" these errors:

    sudo mkdir /include
    sed -i "s/Boost_INCLUDE_DIR/Boost_INCLUDE_DIRS/" src/universal_robot/ur_kinematics/CMakeLists.txt
    

ct-jkhamanishi avatar Mar 18 '24 21:03 ct-jkhamanishi

We have now fixed the incorrect cmake variable in https://github.com/ros-industrial/universal_robot/pull/675. Please let us know if this fixes your issue.

RobertWilbrandt avatar Mar 21 '24 08:03 RobertWilbrandt