Closed yushijinhun closed 4 months ago
What Ubuntu version and what ROS distro are you running where you see this issue?
I'm using ROS Noetic on Ubuntu 20.04. The problem only occurs when I'm using LLVM toolchain. Here's my CMake arguments:
- -DCMAKE_C_COMPILER=clang-18
- -DCMAKE_CXX_COMPILER=clang++-18
- -DCMAKE_CXX_FLAGS=-Wno-enum-constexpr-conversion -fuse-ld=lld-18
- -DCMAKE_C_FLAGS=-fuse-ld=lld-18
The reason of the error is that libinterbotix_xs_sdk
does not have libyaml-cpp.so
as its dependency, although it uses libyaml-cpp. You can check this with ldd devel/lib/libinterbotix_xs_sdk.so
. It works because the program using libinterbotix_xs_sdk
happens to depend on libyaml-cpp, but this is not guaranteed. I think it's better to fix this dependency problem, even only few people would encounter this issue.
We do not have the LLVM toolchain installed here so I am unable to reproduce your issue. However, this change does not seem to affect the build or functionality of the xs_sdk. I'll approve this PR for your edge use case.
I'm getting
ld.lld: error: undefined reference: YAML::...
error when compiling packages that depend oninterbotix_xs_sdk
such asinterbotix_xsarm_joy
:This PR fixes the linker error.