ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Contributing to ROS - System Dependency

asked 2014-03-11 06:13:42 -0500

atp gravatar image

I'm trying to contribute a package to ROS. This is the error that jenkins.ros.org gave back:

/usr/bin/ld: cannot find -llapack collect2: ld returned 1 exit status

I'm assuming that this is a dependency that needs to be added with a rosdep rule in the manifest. So, I've added the following line to package.xml:

<rosdep name="liblapack-dev"/>

Is this correct?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-03-11 17:32:25 -0500

fergs gravatar image

updated 2014-03-11 17:32:58 -0500

If you have a package.xml, then you have a package using catkin. In this case, there is no "rosdep" key for the package.xml. You need to do

 <build_depend>liblapack-dev</build_depend>

This will make sure the package is installed when you go to build on the farm -- however, to actually get the linker flags, etc, you will need to probably add the following in your CMakeLists.txt, near the find_package(catkin):

find_package(LAPACK REQUIRED)

Then, when linking any executable, you'll probably need:

target_link_libraries(name_of_target ${catkin_LIBRARIES} ${LAPACK_LIBRARIES})

(Note: I've not used LAPACK with catkin, so the actual CMAKE may be a bit different, a quick google search shows the find_package call is probably right, but I'm guessing at the name of the _LIBRARIES portion actually exported by LAPACK... I'd check their documentation if things still don't link)

edit flag offensive delete link more

Comments

Cool. Thanks! That's what I was looking for. I already had the target_link_libraries in my CMakeLists file. This clarified it for me. Let's see how the building goes now on jenkins.

atp gravatar image atp  ( 2014-03-12 05:53:20 -0500 )edit
1

answered 2014-03-11 06:40:19 -0500

dornhege gravatar image

There is a rosdep rule for a package with that exact name, so you should be fine.

edit flag offensive delete link more

Comments

Thanks! Where do I put that line? If I put it inside of "<package>", then catkin_make shows: The manifest must not contain the following tags: rosdep. If it is put outside, catkin_make gives: junk after document element: line 37, column 0.

atp gravatar image atp  ( 2014-03-11 11:40:01 -0500 )edit

http://www.ros.org/reps/rep-0127.html indicates that: <build_depend> (multiple) Declares a rosdep key or ROS package name that this package requires at build-time. (And it shows the same for run_depend). Is this the right way to go? I'm somewhat confused right now ...

atp gravatar image atp  ( 2014-03-11 15:55:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-11 06:13:42 -0500

Seen: 376 times

Last updated: Mar 11 '14