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

Generate deb from dependent ros package locally

asked 2018-04-12 05:15:10 -0600

billyDong gravatar image

updated 2018-04-17 03:53:38 -0600

This is related to the question #280235 where there's a dependency problem using bloom to generate a .deb file locally. I've added the key to rosdep in order to solve that problem but now I've other problem.

After using bloom generate to create the debian files, I try to run fakeroot to create the binary .deb file and it fails as you can see in the bash file: fakeroot bash

$ fakeroot  debian/rules binary 
 ...
Project 'qt_ros_interface' tried to find library 'robis_math_utilities'.
The library is neither a target nor built/installed properly.  Did you
compile project 'robis_math_utilities'? Did you find_package() it before
the subdirectory containing its code is included?
...

This library is one of the dependencies of my package that I've previously installed in opt/ros/kinetic (also available in catkin)

EDIT 1

Using dpkg-buildpackage as suggested by @nuclearsandwich gave me a similar problem:

$ dpkg-buildpackage -b -uc
dpkg-buildpackage: source package ros-kinetic-qt-ros-interface
dpkg-buildpackage: source version 0.0.0-0xenial
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by user <user@user.com>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build qt_ros_interface
dpkg-source: info: using options from qt_ros_interface/debian/source/options: --auto-commit 
dpkg-source: warning: can't parse dependency ros-kinetic-robis_math_utilities
dpkg-source: error: error occurred while parsing Build-Depends
dpkg-buildpackage: error: dpkg-source --before-build qt_ros_interface gave error exit status 255

This package also depends on another package that was installed in using the same method, but only this library is giving me troubles..

EDIT 2

The issue with dpkg-buildpackage is solved, my rosdep file had ros-kinetic-robis_math_utilities instead of ros-kinetic-robis-math-utilities but the original issue is not solved yet..

edit retag flag offensive close merge delete

Comments

The linked fakeroot bash file appears to be a mix of commands run and their output. If that's a separate bash script that you're using in your release process can you provide a link that is just the bash source?

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 07:53:04 -0600 )edit

Maybe I gave it the wrong name, that is just what appears in the terminal when I run the fakeroot

billyDong gravatar image billyDong  ( 2018-04-13 08:04:20 -0600 )edit

I see, thanks for clarifying. I'd suggest trying to build the package using the command in my answer below. I think it's the most expedient way to do so.

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 08:16:09 -0600 )edit

dpkg-source: warning: can't parse dependency ros-kinetic-robis_math_utilities

Debian package names do not contain underscores. I expect your rosdep.yaml file might have some mistakes, can you post it please?

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 09:14:36 -0600 )edit

You're right, it was an error on rosdep that I corrected. But now I've the exact same error I had when I used fakeroot,, heres the log file

billyDong gravatar image billyDong  ( 2018-04-13 09:35:58 -0600 )edit

Have you created the package for robis_math_utilities and installed it on your system? Since bloom sources only your /opt/ros/kinetic installation packages in the local workspace are not used.

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 09:42:51 -0600 )edit

Yes I've done that. I wrote it on the question

billyDong gravatar image billyDong  ( 2018-04-13 09:48:16 -0600 )edit

Sorry I missed it! Are you able to build qt_ros_interface in a workspace by itself with only /opt/ros/kinetic/setup.bash sourced?

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 10:06:51 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-04-13 08:02:52 -0600

nuclearsandwich gravatar image

updated 2018-04-13 10:38:57 -0600

It might be possible to build the package by invoking commands from the debian rules file directly, but it is probably easier to use dpkg-buildpackage to build a package locally as long as your local system matches your target system.

If your package depends on any other custom packages, you will need to make sure that you build and install those packages first.

After running bloom you can create a local clone of the release repository to build your package. The release repository has branches of the form ${packagetype}/${rosdistro}/${suite}/${package}. For example, debian/kinetic/xenial/qt_ros_interface From a local checkout of this branch you can run the command dpkg-buildpackage -b -uc. This will build the binary package only (-b), and will not attempt to sign the changes file (-uc). This probably isn't what you want to be doing for your official release packages but it is suitable for quickly building debs.

edit flag offensive delete link more

Comments

Thank's for your answer but I didn't understand the local check out part.. my package is on ~/catkin_ws/src/qt_ros_interface. And I have'nt mentioned but I'm using ubuntu 16.04

billyDong gravatar image billyDong  ( 2018-04-13 08:30:48 -0600 )edit

If you ran bloom-release, it would have a created a release repository. Usually with a name like package_name-release. If you used git bloom-release instead you may have created the repository manually before doing so.

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 08:41:07 -0600 )edit

The release repository is the repository created in Step 3 of http://wiki.ros.org/bloom/Tutorials/F...

That's the repository which contains your source along with the generated debian info from bloom.

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 08:44:13 -0600 )edit

I'm sorry, I still don't understand.. I ran bloom-generate and not bloom-release. By running bllom-generate, do I have to make the code available on git hub (I already have a git repository but I want to keep it private for now)?

billyDong gravatar image billyDong  ( 2018-04-13 08:53:13 -0600 )edit

Ah, that was my misunderstanding! Since you ran bloom generate, your current workspace should have a debian folder in it and you can run the dpkg-buildpackage command above from the package directory in your workspace.

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 09:01:00 -0600 )edit

bloom-generate does not require a separate repository.

Release repositories do not need to be public, bloom's easy path expects that you're contributing packages upstream but it is not a requirement.

nuclearsandwich gravatar image nuclearsandwich  ( 2018-04-13 09:02:22 -0600 )edit

@nuclearsandwich could you please see the edit on the question. I've a similar problem with your approach.

billyDong gravatar image billyDong  ( 2018-04-13 09:07:18 -0600 )edit
0

answered 2018-04-13 07:46:56 -0600

zcm gravatar image

updated 2018-04-15 20:28:54 -0600

Could you paste the CMakelist file of package robis_math_utilities ? Did it create a cmake config file for the package ? Thanks.

Edit: You could change the package name to "ros-kinetic-robis-math-utilities" in your local yaml file.

edit flag offensive delete link more

Comments

Here is the CMakelist File. And here the cmake created in opt/ros/kinetic/share/robis_math_utilities/cmake cmake

billyDong gravatar image billyDong  ( 2018-04-13 08:02:35 -0600 )edit

Well, the cmake file seems correct. But I see your edited question, "can't parse dependency ros-kinetic-robis_math_utilities" , I think the package name should be "ros-kinetic-robis-math-utilities".

zcm gravatar image zcm  ( 2018-04-15 20:26:56 -0600 )edit

@zcm that was corrected, but the original error isn't resolved yet as you can see in the comments with @nuclearsandwich

billyDong gravatar image billyDong  ( 2018-04-16 05:34:03 -0600 )edit

So is there possibility that your qt_ros_interface CMakelists is wrong ? I don't know .... maybe should use find_package(catkin ...), or do you source setup.bash of kinetic ? Hope you would solve this problem..

zcm gravatar image zcm  ( 2018-04-18 05:08:51 -0600 )edit

@zcm, all the packages work with no problems in catkin. What seems to be wrong is the "robis_math_utilities" packages. When I create the deb files for it, the C librarys are not created..

billyDong gravatar image billyDong  ( 2018-04-18 05:50:01 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-04-12 05:15:10 -0600

Seen: 1,233 times

Last updated: Apr 17 '18