You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmake "file RELATIVE_PATH must be passed a full path to the directory" error #96
I tried compiling ros2_rolling from source based on the official tutorial, but I got this error:
CMake Error at CMakeLists.txt:39 (file):
file RELATIVE_PATH must be passed a full path to the directory:
lib/urdfdom_headers/cmake
CMake Error at CMakeLists.txt:40 (file):
file RELATIVE_PATH must be passed a full path to the directory: lib
I was able to compile this project before, and I think that the issue is related to pull request #90. I not completely sure if this happens only on my machine or not. here are the value for related variables:
I think the problem was with the assumption that CMAKE_INSTALL_LIBDIR is absolute. I was able to resolve this by changing the following piece of code in cmake:
Based on this, it's not recommended to concatenate CMAKE_INSTALL_<dir> to CMAKE_INSTALL_PREFIX manually. So i think the following solution would be better:
-- urdfdom_headers version 2.1.0
CMake Error at CMakeLists.txt:39 (file):
file RELATIVE_PATH must be passed a full path to the directory:
lib/x86_64-linux-gnu/urdfdom_headers/cmake
CMake Error at CMakeLists.txt:40 (file):
file RELATIVE_PATH must be passed a full path to the directory:
lib/x86_64-linux-gnu
I think these two lines should only be applied if the path variables actually are absolute:
Activity
armaho commentedon Feb 7, 2026
I think the problem was with the assumption that
CMAKE_INSTALL_LIBDIRis absolute. I was able to resolve this by changing the following piece of code in cmake:to:
I'm not sure if this is the right solution though.
armaho commentedon Feb 7, 2026
Based on this, it's not recommended to concatenate
CMAKE_INSTALL_<dir>toCMAKE_INSTALL_PREFIXmanually. So i think the following solution would be better:rhaschke commentedon Feb 7, 2026
I'm running into the same issue:
I think these two lines should only be applied if the path variables actually are absolute:
urdfdom_headers/CMakeLists.txt
Lines 39 to 40 in 3a1ae72