<div dir="ltr">Hi Austin,<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 10, 2013 at 11:55 PM, Austin Hendrix <span dir="ltr"><<a href="mailto:ahendrix@willowgarage.com" target="_blank">ahendrix@willowgarage.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm having the same problem with one of the PR2 packages that depends<br>
on orocos_kdl; my take is that the CMake find_package infrastructure<br>
and/or the pkgconfig files for orocos_kdl are broken.<br>
<br>
I consider this a bug: <a href="http://bugs.orocos.org/show_bug.cgi?id=1035" target="_blank">http://bugs.orocos.org/show_bug.cgi?id=1035</a><br>
<br></blockquote><div style><br></div><div style>I agree we should fix it at the level of the orocos_kdl-config.cmake file.</div><div style><br></div><div style>I forgot to mention, providing a patch would of course speed up resolving the bug ;)</div>

<div style><br></div><div style>Ruben</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-Austin<br>
<div><div class="h5"><br>
On Wed, Jul 10, 2013 at 5:04 AM, Ruben Smits<br>
<<a href="mailto:ruben.smits@intermodalics.eu">ruben.smits@intermodalics.eu</a>> wrote:<br>
> Hi Marcus,<br>
><br>
><br>
> On Wed, Jul 10, 2013 at 12:59 PM, Marcus Liebhardt<br>
> <<a href="mailto:marcus.liebhardt@yujinrobot.com">marcus.liebhardt@yujinrobot.com</a>> wrote:<br>
>><br>
>><br>
>> On Wed, Jul 10, 2013 at 6:39 PM, Marcus Liebhardt<br>
>> <<a href="mailto:marcus.liebhardt@yujinrobot.com">marcus.liebhardt@yujinrobot.com</a>> wrote:<br>
>>><br>
>>> Hey guys,<br>
>>> It's me again. Sorry for the high traffic.<br>
>>><br>
>>> I released the openni_tracker and the source build works fine. However,<br>
>>> when building the deb, orocos-kdl can't be found.<br>
>>><br>
>>> CMake Error at /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:72<br>
>>> (find_package):<br>
>>>   Could not find a configuration file for package orocos_kdl.<br>
>>><br>
>>>   Set orocos_kdl_DIR to the directory containing a CMake configuration<br>
>>> file<br>
>>>   for orocos_kdl.  The file will have one of the following names:<br>
>>><br>
>>>     orocos_kdlConfig.cmake<br>
>>>     orocos_kdl-config.cmake<br>
>>><br>
>>> Call Stack (most recent call first):<br>
>>>   CMakeLists.txt:3 (find_package)<br>
>>><br>
>>><br>
>>> So, I started looking for the cause of this and found this seemingly<br>
>>> related issue involving the geometry stack:<br>
>>> <a href="https://github.com/ros/geometry/issues/11" target="_blank">https://github.com/ros/geometry/issues/11</a>. The respective fix treats<br>
>>> orocos-kdl as a plain Cmake package instead of a catkin package.<br>
>>> Unfortunately, when applying this patch to the openni_tracker, my local<br>
>>> source build can't find the orocos-kdl library it tries to link to:<br>
>>><br>
>>> Linking CXX executable<br>
>>> /opt/sandbox_workspace/devel/lib/openni_tracker/openni_tracker<br>
>>> /usr/bin/ld: cannot find -lorocos-kdl<br>
>>> collect2: ld returned 1 exit status<br>
>>> make[2]: ***<br>
>>> [/opt/sandbox_workspace/devel/lib/openni_tracker/openni_tracker] Error 1<br>
>>><br>
>>> Again I started off to find hints for the cause of this. I took a look at<br>
>>> orocos_kdl-config.cmake and even the package config file, but nothing seems<br>
>>> suspicious to me. However, I must say that I don't have lots of CMake<br>
>>> experience. So this is harder for me than Korean. 0o<br>
>>><br>
>>> One thing I noticed though is that the CMake log output about orocos-kdl<br>
>>> doesn't show any linker flags:<br>
>>><br>
>>> Looking for KDL in: /opt/ros/hydro<br>
>>> -- checking for one of the modules 'orocos_kdl'<br>
>>>    Includes in: /opt/ros/hydro/include;/usr/include/eigen3<br>
>>> Compiler flags: -I/opt/ros/hydro/include;-I/usr/include/eigen3<br>
>>>    Libraries: orocos-kdl<br>
>>>    Libraries in: /opt/ros/hydro/lib<br>
>>>    Linker flags :<br>
>>>    Defines:<br>
>>><br>
>>> I will keep looking further into this. But any hints, tips and help is<br>
>>> highly appreciated!<br>
>><br>
>><br>
>> Joder! I think, I have found the missing piece - it's called<br>
>> "link_directories()". I shouldn't have looked only at that pull request, but<br>
>> at the newest version of the mentioned CMakeLists example.<br>
>><br>
>> I'm still a bit confused though. I can't remember needing this<br>
>> "link_directories" addition so far. Furthermore, the ROS wiki even<br>
>> recommends not to use it, since target_link_libraries() should suffice for<br>
>> catkin and plain cmake packages - which is the case here<br>
>> (<a href="http://ros.org/wiki/catkin/CMakeLists.txt#Include_Paths_and_Library_Paths" target="_blank">http://ros.org/wiki/catkin/CMakeLists.txt#Include_Paths_and_Library_Paths</a>).<br>
>><br>
>> Could someone shed some light on this please?<br>
>><br>
><br>
> AFAIK:<br>
><br>
> In most cases find_package(package_name) will fill ${package_name_LIBRARIES)<br>
> with the full path of the libraries in which case you do not need the<br>
> link_directories statement. Although in some cases this might not be true,<br>
> and ${packag_name_LIBRARIES} only contains the libnames without any path<br>
> which seems to be the case with orocos-kdl:<br>
><br>
> taken from the orocos_kdl-config.cmake:<br>
><br>
> message("   Includes in: ${orocos_kdl_INCLUDE_DIRS}")<br>
> message(    "Compiler flags: ${orocos_kdl_CFLAGS}")<br>
> message("   Libraries: ${orocos_kdl_LIBRARIES}")<br>
> message("   Libraries in: ${orocos_kdl_LIBRARY_DIRS}")<br>
> message("   Linker flags : ${orocos_kdl_LD_FLAGS}")<br>
> message("   Defines: ${orocos_kdl_DEFINES}")<br>
><br>
> This is the result of the use of pkgconfig in the orocos_kdl-config.cmake<br>
> to fill in these flags. If this is considered as a bug by someone please<br>
> file a bug report on <a href="http://bugs.orocos.org" target="_blank">bugs.orocos.org</a> to have it resolved ;)<br>
><br>
>><br>
>> Thanks again and sorry for the spam,<br>
>> Marcus<br>
>><br>
><br>
> Ruben<br>
><br>
><br>
>><br>
>><br>
>>><br>
>>><br>
>>> Thanks for reading,<br>
>>> Marcus<br>
>>><br>
>>><br>
><br>
><br>
><br>
> --<br>
> Ruben Smits, Phd<br>
> Chief Technology Officer<br>
> Intermodalics BVBA<br>
> +32479511786<br>
> <a href="http://www.intermodalics.eu" target="_blank">www.intermodalics.eu</a><br>
><br>
</div></div>> _______________________________________________<br>
> Ros-release mailing list<br>
> <a href="mailto:Ros-release@code.ros.org">Ros-release@code.ros.org</a><br>
> <a href="https://code.ros.org/mailman/listinfo/ros-release" target="_blank">https://code.ros.org/mailman/listinfo/ros-release</a><br>
><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Ruben Smits, Phd<br>Chief Technology Officer<br>Intermodalics BVBA<br>+32479511786<br><a href="http://www.intermodalics.eu" target="_blank">www.intermodalics.eu</a>
</div></div>