Problem running dpkg-buildpackage
I have two packages;
- msgsrv_pkg - holds the custom messages and services
- 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 !