[ros-users] Rosmake depends problem with flann

Brian Gerkey gerkey at willowgarage.com
Thu Nov 4 11:35:58 UTC 2010


hi Garratt,

Package dependencies in the manifest are not meant to be ordered, and
you shouldn't rely on ordering to produce a particular behavior.  In
this case, as Radu says, the problem is that the ROS packages opencv2
and flann conflict with each other.  That conflict should be resolved.

	brian.

On Thu, Nov 4, 2010 at 11:36 AM, Radu Bogdan Rusu <rusu at willowgarage.com> wrote:
> Garratt,
>
> This is a nasty problem, and we should fix the way FLANN is exposed from within OpenCV (I would argue that it shouldn't
> really be exposed from within OpenCV in ROS, as long as we have a ROS package for FLANN). In general, this practice of
> just "eating up libraries" -- that is, include a library (FLANN) into another library (OpenCV) should be avoided for
> many reasons. As long as FLANN remains standalone, it should be included as a dependency through the normal
> rosdep/depend mechanisms.
>
> The OpenCV case is a bit different though, because OpenCV itself is not a ROS package but an external "3rd party
> dependency", wrapped in a ROS meta-package (opencv2). That means that it was easier for OpenCV to just copy FLANN inside
> it rather than using some CMake/Makefile logic to search for it on the system. The latter is even more complicated as we
> wouldn't really install FLANN on our systems globally, but use a ROS meta-package for it, so OpenCV would need to be
> able to search through other ROS meta-packages...
>
>
> Cheers,
> Radu.
>
>
> On 11/03/2010 10:44 PM, garratt wrote:
>> Hi all,
>>
>> I'm using the flann library in PCL.  I recently came across a rather
>> annoying phenomenon:  opencv also includes a version of flann that is
>> similar enough to not generate compile errors, but causes segfaults when
>> I run code compiled with it.  When tracking down how I started using the
>> wrong flann, I realized that the cmake voodoo that is rosmake seems to
>> include a library by it's _last_ mention, rather than the first:
>>
>> in my manifest file:
>>
>> <depend package="pcl"/>
>> <depend package="depends_on_opencv"/>
>> <depend package="pcl"/>
>>
>> fails, whereas:
>>
>> <depend package="pcl"/>
>> <depend package="pcl"/>
>> <depend package="depends_on_opencv"/>
>>
>> does not.
>>
>> I could solve this problem in my case, because I owned all the manifest
>> files.  However, I can image a scenario where I need to include a
>> package that, through the dependency ordering causes my package to
>> include the wrong library.
>>
>> Is my perception of the rosmake dependency inclusion process correct? If
>> so, maybe changing to a 'first inclusion' paradigm might be appropriate.
>>
>> thanks,
>> Garratt
>>
>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list