1

I have been following the tutorial 6. Packaging New Software on how to create an ubuntu/debian package. I have successfully managed the hello example, but I have been having some problems with my own shared library package.

I have successfully build the package by running the following command:

bzr builddeb -- -us -uc

However when I try and build the package with pbuilder-dist (which is suppose to mimic the conditions of a fresh distribution) I get an error related to missing libraries that my package depends on. I run:

pbuilder-dist trusty build libnpregression_1.0-0ubuntu1.dsc 

and get:

 debian/rules build
dh build 
   dh_testdir
   dh_auto_configure
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Could NOT find Armadillo (missing:  ARMADILLO_LIBRARY ARMADILLO_INCLUDE_DIR) 
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:27 (find_package)


CMake Error at CMakeLists.txt:33 (message):
  flann library not found


-- Configuring incomplete, errors occurred!
See also "/tmp/buildd/libnpregression-1.0/obj-x86_64-linux-gnu/CMakeFiles/CMakeOutput.log".
dh_auto_configure: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None returned exit code 1
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

It seems that pbuilder-dist did not install those dependencies (armadillo, flann and boost).

What confuses me is that these dependencies are specified in the debian/control file:

Source: libnpregression
Priority: optional
Maintainer: Guillaume de Chambrier <chambrierg@gmail.com>
Build-Depends: debhelper (>= 9), cmake
Standards-Version: 3.9.5
Section: libs
Homepage: https://github.com/gpldecha/non-parametric-regression


Package: libnpregression-dev
Section: libdevel
Architecture: any
Depends: libboost-all-dev, libnpregression1 (= ${binary:Version})
Description: Header files of non-parameteric regression library.
 This is an extended description of libnpregression-dev

Package: libnpregression1
Section: libs
Architecture: any
Depends: libflann-dev, libboost-all-dev, libarmadillo-dev, ${shlibs:Depends}, ${misc:Depends}
Description: Shared library files of non-parameteric regresion library.
 This is an extended description of libnpregression1

I would appreciate any help in solving my pbuilder-dist build dependency problem. I am quite new to packaging debian projects.

Guillaume
  • 181

1 Answers1

1
  • libflann-dev, libboost-all-dev, libarmadillo-dev should be added to Build-Depends: field.
  • Depends: is runtime dependencies.

Reference: Chapter 7 - Declaring relationships between packages

Hint: leave "Debian Policy Manual" open.

user.dz
  • 49,176