2

I am trying to publish my cmake project to ppa at launchpad. The project is a library named "base".

bzr builddeb -- -us -uc -sd fails with following error while trying to fake install dev version of the package.

...
...
Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "None"
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so.1.0
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so.1
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/myxml.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/Socket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/ClientSocket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/mycurl.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/mystdlib.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/ServerSocket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/JPEGImage.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/SocketException.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/FerryTimeStamp.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/myconverters.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/baseConfig.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/pkgconfig/libbase.pc
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/share/pkgconfig/libbase.pc
make[1]: Leaving directory '/home/gowtham/Packages/build-area/base-1.1/obj-x86_64-linux-gnu'
  dh_install -O--buildsystem=cmake
dh_install: base-dev missing files: usr/lib/*/lib*.so
dh_install: base-dev missing files: usr/lib/*/pkgconfig/*
dh_install: base1 missing files: usr/lib/*/lib*.so.*
dh_install: missing files, aborting
debian/rules:11: recipe for target 'binary' failed
make: *** [binary] Error 20
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -sd failed
bzr: ERROR: The build failed.

how to differ builddeb for dev version of the package at installing header files

debian/rules

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

override_dh_auto_test:
override_dh_usrlocal:

%:
    dh $@ --buildsystem=cmake

1 Answer 1

2

The paths in base-dev.install and base1.install are wrong.

dh_install: base-dev missing files: usr/lib/*/lib*.so
dh_install: base-dev missing files: usr/lib/*/pkgconfig/*
dh_install: base1 missing files: usr/lib/*/lib*.so.*

They will be correct as below and package can be built:

usr/lib/lib*.so
usr/lib/pkgconfig/*

usr/lib/lib*.so.*

But you will have lintian messages that /usr/lib/ is not safe for multi-arch system installations.

  • Either you fix it at source level (as upstream developer), so cmake install those files to /usr/lib/<HOST-ARCH-FOLDER>/. Which is the correct way.

  • Or you fix it at packaging level (as packager), by overriding installation paths in base-dev.install and base1.install

    #!/usr/bin/dh-exec
    
    usr/lib/lib*.so /usr/lib/${DEB_HOST_MULTIARCH}
    usr/lib/pkgconfig/* /usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
    
    usr/lib/lib*.so.* /usr/lib/${DEB_HOST_MULTIARCH}
    
9
  • 1
    Though I intend to run my library on multiple architectures, I didn't write any thing specific for each architecture. So is it proper to put my library under architecture folder?
    – Necktwi
    Nov 21, 2016 at 2:49
  • @neckTwi, in multi-arch systems, user can install base1:amd64 or/and base1:i386, (1) your packages overwrite same files, you should put in debian/control that they break each other. (2) Can a program linked to an architecture run versus the other one, if your library is explicitly verified for portability between arch's then you are safe.
    – user.dz
    Nov 21, 2016 at 8:38
  • do multi-arch systems exist!! I always thought a system is of single architecture at a time.
    – Necktwi
    Nov 22, 2016 at 3:19
  • 2
    pbuild is not including /usr/lib/${DEB_HOST_MULTIARCH} by default I have to do link_directories(/usr/lib/${DEB_HOST_MULTIARCH}) in CMakeLists.txt
    – Necktwi
    Nov 26, 2016 at 8:13
  • 2
    I think I am wrong; I am building another package(logger) dependent on my previous package(base). I have done sudo cp ~/pbuilder/xenial-base.tgz /var/cache/pbuilder/base.tgz pbuilder login --save-after-login apt-add-repository ppa:satyagowtham-k-gmail/ferryfair.ppa
    – Necktwi
    Nov 26, 2016 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .