我已经打包了一个名为base
并上传到我的ppa:satyagowtham-k-gmail/ferryfair.ppa
. 启动板已成功构建base
包,我通过sudo apt install base-dev
. 现在我正在打包另一个名为的库logger
,它依赖于base
.
我已将我的添加ppa
到pbuilder chroot
$ 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
# apt-get update
# exit
pbuilder-dist xenial build logger_1.0-0ubuntu1.dsc给出以下错误
...
...
install -d debian/logger-dev/DEBIAN
dpkg-shlibdeps -Tdebian/logger1.substvars -l/build/logger-1.0/lib/x86_64 --ignore-missing-info debian/logger1/usr/lib/x86_64/liblogger.so.1.0
dpkg-shlibdeps: error: couldn't find library libbase.so.1 needed by debian/logger1/usr/lib/x86_64/liblogger.so.1.0 (ELF format: 'elf64-x86-64'; RPATH: '')
dpkg-shlibdeps: error: cannot continue due to the error above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to use -l.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/logger1.substvars -l/build/logger-1.0/lib/x86_64 --ignore-missing-info debian/logger1/usr/lib/x86_64/liblogger.so.1.0 returned exit code 2
debian/rules:10: recipe for target 'override_dh_shlibdeps' failed
make[1]: *** [override_dh_shlibdeps] Error 2
make[1]: Leaving directory '/build/logger-1.0'
debian/rules:13: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
...
...
Debian/规则
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
override_dh_auto_test:
override_dh_usrlocal:
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(shell pwd)/lib/$(shell uname -m)
%:
dh $@ --buildsystem=cmake
Debian/控制
Source: logger
Priority: optional
Maintainer: Satya Gowtham Kudupudi <[email protected]>
Build-Depends: debhelper (>= 9), cmake, base-dev
Standards-Version: 3.9.7
Section: non-free/libs
Homepage: https://github.com/necktwi/logger
Vcs-Git: https://github.com/necktwi/logger.git
Vcs-Browser: https://github.com/necktwi/logger
Package: logger-dev
Section: non-free/libdevel
Architecture: any
Depends: logger1 (= ${binary:Version}), ${misc:Depends}, base1
Description: logger from ferryfair.com
It logs a beautiful and useful format.
Package: logger1
Section: non-free/libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, base1
Description: logger from ferryfair.com
It logs a beautiful and useful format.
问题出在
base
包上。它确实将共享对象安装在错误的路径中它应该在哪里
根据您之前的问题,您已
CMakeLists.txt
对安装未/usr/lib/
使用的库进行了一些更改:新变量
${arch}
被替换x86_64
。我可以找到一份 Debian 手册来解释
cmake
项目向 MultiArch 的迁移。cmake v3.3 添加了一个新的GNUInstallDirs 模块。
包括用于 MultiArch 路径支持的新模块
然后改用
CMAKE_INSTALL_LIBDIR
(/usr/lib/<triplet>
) 变量。只是关于
base
遵循 Debian 政策的软件包命名的小提示,二进制文件不包含可执行文件。lib
因此,最好用前缀libbase1
&来命名它们libbase-dev
。