AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1301661
Accepted
Pierre Abbat
Pierre Abbat
Asked: 2020-12-21 12:02:59 +0800 CST2020-12-21 12:02:59 +0800 CST 2020-12-21 12:02:59 +0800 CST

尝试打包库导致包没有二进制文件

  • 772

我是打包新手,我正在尝试打包我的一个程序使用的库。该库名为 Plytapus,由 PerfectTIN 程序使用。您可以在我的 GitHub 站点https://github.com/phma/和 PerfectTIN 站点http://bezitopo.org/perfecttin/download.html上找到它们的源代码。源包位于https://launchpad.net/~phma-a/+archive/ubuntu/testing。

在将 plytapus-dev 添加到构建要求后,我尝试构建 PerfectTIN 包(仅安装了 plytapus,它在没有 plytapus 的情况下构建)但失败了。原来 plytapus 包缺少 .so 文件。我编辑了 debian 目录中的文件并再次尝试。

变更日志

plytapus (0.6.0-3) focal; urgency=medium

  * Remove extra asterisk from plytapus1.install

 -- Pierre Abbat <[email protected]>  Sun, 20 Dec 2020 14:02:52 -0500

plytapus (0.6.0-2) focal; urgency=medium

  * Add cmake as dependency

 -- Pierre Abbat <[email protected]>  Mon, 23 Nov 2020 03:42:16 -0500

plytapus (0.6.0-1) focal; urgency=medium

  * Initial release

 -- Pierre Abbat <[email protected]>  Tue, 17 Nov 2020 02:18:06 -0500

plytapus1.install

usr/lib/lib*.so.*
usr/lib/lib*.a

控制

Source: plytapus
Priority: optional
Maintainer: Pierre Abbat <[email protected]>
Build-Depends: debhelper-compat (= 12), cmake (>= 3.4)
Standards-Version: 4.4.0
Section: libs
Homepage: https://github.com/phma/plytapus
#Vcs-Browser: https://salsa.debian.org/debian/plytapus
#Vcs-Git: https://salsa.debian.org/debian/plytapus.git

Package: plytapus-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: plytapus (= ${binary:Version}), ${misc:Depends}
Description: Library for reading and writing PLY files
 Plytapus is a C++ library for reading and writing PLY (Stanford polygon)
 files.
 .
 This package provides the header files.

Package: plytapus
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Library for reading and writing PLY files
 Plytapus is a C++ library for reading and writing PLY (Stanford polygon)
 files.
 .
 This package provides the shared and static library.

这是构建日志的相关部分:

make[2]: Leaving directory '/home/phma/package/plytapus-0.6.0/obj-x86_64-linux-gnu'
Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "None"
-- Installing: /home/phma/package/plytapus-0.6.0/debian/tmp/usr/lib/libplytapus.so.0.6.0
-- Installing: /home/phma/package/plytapus-0.6.0/debian/tmp/usr/lib/libplytapus.so
-- Installing: /home/phma/package/plytapus-0.6.0/debian/tmp/usr/lib/libplytapus.a
-- Installing: /home/phma/package/plytapus-0.6.0/debian/tmp/usr/include/plytapus.h
-- Installing: /home/phma/package/plytapus-0.6.0/debian/tmp/usr/include/plytapus/config.h
-- Installing: /home/phma/package/plytapus-0.6.0/debian/tmp/usr/include/plytapus/textio.h
make[1]: Leaving directory '/home/phma/package/plytapus-0.6.0/obj-x86_64-linux-gnu'
   dh_install
   dh_installdocs
   dh_installchangelogs
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_missing
dh_missing: usr/lib/libplytapus.so.0.6.0 exists in debian/tmp but is not installed to anywhere
dh_missing: usr/lib/libplytapus.a exists in debian/tmp but is not installed to anywhere
    The following debhelper tools have reported what they installed (with files per package)
     * dh_install: plytapus (0), plytapus-dev (3)
     * dh_installdocs: plytapus (0), plytapus-dev (0)
    If the missing files are installed by another tool, please file a bug against it.
    When filing the report, if the tool is not part of debhelper itself, please reference the
    "Logging helpers and dh_missing" section from the "PROGRAMMING" guide for debhelper (10.6.3+).
      (in the debhelper package: /usr/share/doc/debhelper/PROGRAMMING.gz)
    Be sure to test with dpkg-buildpackage -A/-B as the results may vary when only a subset is built
    For a short-term work-around: Add the files to debian/not-installed
   dh_dwz
   dh_strip
   dh_makeshlibs
   dh_shlibdeps
   dh_installdeb
   dh_gencontrol
dpkg-gencontrol: warning: Depends field of package plytapus: substitution variable ${shlibs:Depends} used, but is not defined
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'plytapus-dev' in '../plytapus-dev_0.6.0-3_amd64.deb'.
dpkg-deb: building package 'plytapus' in '../plytapus_0.6.0-3_amd64.deb'.

我该如何解决这个问题,以便 .so 和 .a 文件位于 plytapus 包中?

ppa packaging libraries
  • 2 2 个回答
  • 137 Views

2 个回答

  • Voted
  1. cges30901
    2020-12-23T20:33:54+08:002020-12-23T20:33:54+08:00

    我认为这是因为文件名错误。尝试重命名plytapus1.install为plytapus.install.

    • 0
  2. Best Answer
    Colin Watson
    2021-01-07T04:21:16+08:002021-01-07T04:21:16+08:00

    从https://lists.launchpad.net/launchpad-users/msg07147.html重复我的回答:

    1. 上游构建系统安装到.../usr/lib/lib*.so.*,但在我下载的包装版本中,不是你上面引用的debian/plytapus1.install。你需要放下这个位。(我猜你使用了,并且假设上游配置遵循https://wiki.debian.org/Multiarch/Implementation#CMake中的建议,但是这个包没有这样做;所以你需要要么使包装期望预多架构路径或将上游配置更改为对多架构友好,如该 wiki 页面中所示。)usr/lib/*/lib*.so.*usr/lib/lib*.so.*/*dh-makecmakecmake
    2. debian/control运行时库包名称为plytapus,这意味着debian/plytapus1.*完全忽略。
    3. 库包名称应以“lib”开头。
    4. 无论如何,“1”位当前都不正确;Debian Policy Manual说它应该与库中的版本号匹配,SONAME在本例中为“0.6.0”(您可以objdump -p在 .so 文件上使用来查看它)。您需要确保在上游更改时随时更改此设置SONAME。
    5. 看起来您当前没有SONAME在上游cmake配置中明确设置 a ,只是cmake在猜测一个。也许这是无意的,因为这等于说每个新的上游版本都可能与之前的每个版本都完全不兼容 ABI。如果这不是您的意思,那么您应该SOVERSION在上游cmake配置中进行设置(我认为;我不是很流利cmake),并可能阅读在维护 C++ 库接口时需要做的各种事情。 如果可能,符号文件是一门有用的学科。

    所以,把它们放在一起,你应该删除/*from debian/plytapus1.install。您应该重命名debian/plytapus1.install为debian/libplytapus0.6.0.install和。您应该更改from和to and中的两个“Package:”行,并调整Depends 行以匹配。您也可以完全删除,因为它们似乎不需要。而且我建议整理上游ABI情况,之后您需要再次调整库包名称以匹配(如果您的库实际上具有相当稳定的ABI,那么您将因不必更改而获得回报一段时间的二进制包名称)。debian/plytapus-dev.installdebian/libplytapus-dev.installdebian/controlplytapus-devplytapuslibplytapus-devlibplytapus0.6.0libplytapus-devdebian/*.dirs

    • 0

相关问题

  • 为自定义 PPA 修补 Wine 的正确方法是什么?

  • 我如何创建自己的 php 5.3.3 包/ppa?

  • 如何删除 PPA?

  • 当上游维护者似乎不活跃时,如何将补丁应用于包?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve