dh_install -O--buildsystem=cmake dh_install: missing files: usr/lib/*/lib*.so
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
Solution 1:
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
andbase1.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}