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

Problem running dpkg-buildpackage

asked 2019-02-07 09:53:53 -0600

venkisagunner gravatar image

updated 2019-02-07 16:24:14 -0600

I have two packages;

  1. msgsrv_pkg - holds the custom messages and services
  2. motor_driver_pkg - a driver package that interfaces with the drives in the robot

I'm trying to generate debian for both the packages. motor_driver_pkg depends on msgsrv_pkg.
I ran bloom-generate rosdebian which generated the debian folders for both the packages. Then I executed dpkg-buildpackage -b -us on msgsrv_pkg which generated debian for the package without any issue. I followed this question. I created a rosdep file and added to /etc/ros/rosdep/source.list.d/50-my-packages.list and ran rosdep update got the following output.

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/magazino/pylon_camera/indigo-devel/rosdep/pylon_sdk.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Hit file:///home/user/my-ros-pkgs.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Add distro "bouncy"
Add distro "crystal"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Add distro "indigo"
Skip end-of-life distro "jade"
Add distro "kinetic"
Add distro "lunar"
Add distro "melodic"
updated cache in /home/user/.ros/rosdep/sources.cache

Then I executed the dpkg-buildpackage -b -us on the motor_driver_pkg. It fails because the package is not installed in /opt/ros/melodic/

Also, I tried the two things to overcome this problem.

1) Researching more about the dpkg-build package help, I executed the following command in dpkg-buildpackage; dpkg-buildpackage -b -d -us and it failed.

2) Another option was to create an environment variable and add it with a sudo apt install -y $TEST_INSTALL where TEST_INSTALL looks like the following,

TEST_INSTALL=$(dpkg-checkbuilddeps 2>&1 | sed "s/dpkg-checkbuilddeps:\serror:\sUnmet build dependencies: //g" | sed "s/[\(][^)]*[\)] //g")

Should I use a docker container to do these builds just for the sake of generating a debian and tear it down ? Any help on this will be greatly appreciated.

Thanks !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-02-08 15:49:00 -0600

tfoote gravatar image

If you're building the downstream package, you have to install all the dependencies on the system that you're building on. That includes the messages package that you just built. If you don't want to do this on your host machine. The standard way to do this is either in a chroot or a docker container. All of the production builds are done in chroots or docker for better reproducibility.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-02-07 09:53:53 -0600

Seen: 502 times

Last updated: Feb 08 '19