[Bug 668] New: FindComedi/UseComedi cmake logic breaks hardware/kuka component building for lxrt-target

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=668

Summary: FindComedi/UseComedi cmake logic breaks hardware/kuka
component building for lxrt-target
Product: OCL
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Hardware
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

For some reason the link libraries for comedi come through but the link library
dirs do not. Include the UseComedi in the hardware/kuka/CMakeLists.txt does not
resolve the problem. How should the FindComedi/UseComedi be used??

I get the following linking error:

Linking CXX shared library liborocos-kuka-lxrt.so
cd /home/common/orocos/ocl/build-lxrt/hardware/kuka && /usr/bin/cmake -P
CMakeFiles/orocos-kuka-lxrt.dir/cmake_clean_target.cmake
cd /home/common/orocos/ocl/build-lxrt/hardware/kuka && /usr/bin/cmake -E
cmake_link_script CMakeFiles/orocos-kuka-lxrt.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -DNDEBUG -shared
-Wl,-soname,liborocos-kuka-lxrt.so.1.6 -o liborocos-kuka-lxrt.so.1.6.99
"CMakeFiles/orocos-kuka-lxrt.dir/Kuka361Kinematics.o"
"CMakeFiles/orocos-kuka-lxrt.dir/Kuka361nAxesTorqueController.o"
"CMakeFiles/orocos-kuka-lxrt.dir/Kuka361nAxesAccelerationController.o"
"CMakeFiles/orocos-kuka-lxrt.dir/Kuka361DWH.o"
"CMakeFiles/orocos-kuka-lxrt.dir/Kuka361nAxesVelocityController.o"
"CMakeFiles/orocos-kuka-lxrt.dir/kuka361InvDynnf.o"
"CMakeFiles/orocos-kuka-lxrt.dir/kuka361FwDynnf.o"
"CMakeFiles/orocos-kuka-lxrt.dir/Kuka361DWHConvertor.o"
-L/home/common/orocos/ocl/build-lxrt/hardware/axes
-L/home/common/orocos/ocl/build-lxrt/ocl -L/usr/local/lib
-L/home/common/orocos/ocl/build-lxrt/hardware/comedi
-L/home/common/orocos/ocl/build-lxrt/hardware/apci -L/usr/local/orocos/lib
-lorocos-rtt-lxrt -lorocos-axes-lxrt -lorocos-ocl-common-lxrt -lorocos-kdl
-lorocos-comedi-lxrt -lorocos-apci-lxrt -lkcomedilxrt -lpthread
-lorocos-rtt-lxrt
-Wl,-rpath,/home/common/orocos/ocl/build-lxrt/hardware/axes:/home/common/orocos/ocl/build-lxrt/ocl:/usr/local/lib:/home/common/orocos/ocl/build-lxrt/hardware/comedi:/home/common/orocos/ocl/build-lxrt/hardware/apci:/usr/local/orocos/lib
/usr/bin/ld: cannot find -lkcomedilxrt

Ruben

[Bug 668] FindComedi/UseComedi cmake logic breaks hardware/kuka

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=668

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #2 from Peter Soetens <peter [..] ...> 2009-06-11 14:09:07 ---
Fixed in r30205. Also fixed it for gnulinux/Xenomai.

The FindComedi/UseComedi macros are still far behind cmake standards, I'll fix
them some time later.

Peter

[Bug 668] FindComedi/UseComedi cmake logic breaks hardware/kuka

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=668

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |peter [..] ...

--- Comment #1 from Peter Soetens <peter [..] ...> 2009-06-11 12:23:12 ---
Would this help for you :

diff --git a/config/UseComedi.cmake b/config/UseComedi.cmake
index 530f6f0..4250e8b 100644
--- a/config/UseComedi.cmake
+++ b/config/UseComedi.cmake
@@ -20,7 +20,7 @@ ENDIF ( OS_GNULINUX OR OS_XENOMAI )
          # Add comedi header path and lxrt comedi lib
          INCLUDE_DIRECTORIES( ${COMEDI_INSTALL}/include )
          LINK_DIRECTORIES( ${COMEDI_LINK_DIRS} )
-         LINK_LIBRARIES( kcomedilxrt pthread )
+         LINK_LIBRARIES( ${COMEDI_LIBRARY} pthread )
          # The user app does not need to link/include comedi stuff.
          #OROCOS_PKGCONFIG_INCPATH("${COMEDI_INSTALL}/include")
          # This ends up in Libs.private

?

I'm expecting that ${COMEDI_LIBRARY} contains the full path anyway and as such
works around your problem.

Peter