Open FederAndInk opened 2 years ago
Error message comes from:
It looks like the catkin
template for a projectConfig.cmake
file is making sure the library exists before adding it to urdf_LIBRARIES
in the urdfConfig.cmake
, but doesn't know what to do with a library inside of a generator expression. Probably a good fix is to make catkin
add the library to the variable anyways when it looks like a generator expression (contains $<
might be a good heuristic)
Simply deleting the generator expressions from line 119 of /opt/ros/noetic/share/urdf/cmake/urdfConfig.cmake
seems to have fixed the problem for me -- or at least ros-noetic-desktop-full
installed without errors from AUR.
I don't know much about Cmake so I don't know what kind of implications it might have in the long run, but it might work as a quick fix until a proper solution is found.
Removing line 119 does not work for me: ros-noetic-kdl-parser-1.14.1
cannot be build correctly without it.
The encountered error when trying it is:
/usr/bin/ld: devel/lib/libkdl_parser.so: undefined reference to `urdf::Model::initParam(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
I had the same error today. The libraries set in the cmake file do exist in my /usr/lib
. Seems like the generator expressions are just not working. After removing them, installation is progressing normal.
In conclusion, replacing line 119 with
set(libraries "urdf;/usr/lib/liburdfdom_sensor.so;/usr/lib/liburdfdom_model_state.so;/usr/lib/liburdfdom_model.so;/usr/lib/liburdfdom_world.so;/usr/lib/libconsole_bridge.so.1.0;/usr/lib/libboost_thread.so.1.76.0;/usr/lib/libtinyxml.so;/usr/lib/libtinyxml2.so")
works for me.
I had the same error today. The libraries set in the cmake file do exist in my
/usr/lib
. Seems like the generator expressions are just not working. After removing them, installation is progressing normal.In conclusion, replacing line 119 with
set(libraries "urdf;/usr/lib/liburdfdom_sensor.so;/usr/lib/liburdfdom_model_state.so;/usr/lib/liburdfdom_model.so;/usr/lib/liburdfdom_world.so;/usr/lib/libconsole_bridge.so.1.0;/usr/lib/libboost_thread.so.1.76.0;/usr/lib/libtinyxml.so;/usr/lib/libtinyxml2.so")
works for me.
That fix also worked for me. I just replaced line 119 with the proposal of @felixkol
Hello! I'm trying to reproduce the problem but I failed. I've created a workspace with urdfdom (master branch) and urdf (melodic-devel branch) and I was not able to trigger the problem. Removing urdfdom from the colcon workspace did not help either. May I ask: which kind of installation are you using? Thanks!
@j-rivero I'm running arch linux. The error occured using this AUR package. I think the error occured installing this or this dependencie. Since the build is running for hours now I can't verify it.
@j-rivero I think I ran into the same situation as @felixkol because I'm also using Arch Linux and the error occurred during the AUR package installation with the command yay -S ros-noetic-desktop-full
. Unfortunately my build is still running so I cannot verify anything yet.
I'm on Archlinux too. My fix is to checkout urdfdom
to version 1.0.4 and packages stated by @felixkol compile correctly.
Could anyone point me to a full build log in Arch or other failing platform? I'm unable to reproduce it in Ubuntu Focal using colcon or catkin compiling the sources: urdfdom (master branch), urdf (melodic-devel branch) and joint_limits_interface (noetic-devel).
Well, I already posted the whole build output, what's your CMake version? Maybe it's coming from there?
There is also the pkgbuild that's worth checking: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ros-noetic-joint-limits-interface
Ok, I just have a question, are you sure generator expression are allowed in find_library
? I don't know for sure, I think they are allowed only in target_*
and other few functions
Edit: Ok, I'm just tired, that's in the comment above, the catkin template should just ignore generator expression
AUR's ros-noetic-urdf now patched with
sed -i '119s@\$<\$<\(NOT:\$<\)*CONFIG:Debug>*>:@@g' urdfConfig.cmake
and package which depend on it can be compiled with urdfdom 3.0.0
how to fix this ugly judgement permanently? if I upgrade some depend lib and rebuild ros, this error occurs again.
hi, @AchmadFathoni , your sed command just remove the prefix of lib regex expression and leave suffix ">" there. I manage to add some extra filter in cmake files to remove those expression automatic if exist. please ref here
I'm unable to reproduce it in Ubuntu Focal using colcon or catkin
@j-rivero, the issue is triggered only if both release and debug versions of the liburdfdom_*.so libraries are found:
https://github.com/ros/urdfdom/blob/master/cmake/urdfdom-config.cmake.in#L20-L22
Thus, creating a symlink e.g. from liburdfdom_model.so
to liburdfdom_modeld.so
triggers the problem in Focal as well.
I filed a PR to fix this issue: https://github.com/ros/catkin/pull/1181
With the latest version of urdfdom (3.0.0) I get this CMake error when trying to compile joint-limits-interface: