【问题标题】:Build failure with pbuilder-dist xenial build使用 pbuilder-dist xenial build 构建失败
【发布时间】:2017-08-09 17:02:55
【问题描述】:

为什么不构建?部分问题输出如下。

Making distclean in src
make[2]: Entering directory '/build/opensh-0.1/src'
 cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
./config.status: 1517: ./config.status: gawk: not found
config.status: error: could not create src/Makefile
Makefile:689: recipe for target 'Makefile' failed
make[2]: *** [Makefile] Error 127
make[2]: Leaving directory '/build/opensh-0.1/src'
Makefile:810: recipe for target 'distclean-recursive' failed
make[1]: *** [distclean-recursive] Error 1
make[1]: Leaving directory '/build/opensh-0.1'
dh_auto_clean: make -j1 distclean returned exit code 2
debian/rules:18: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
I: copying local configuration
E: Failed autobuilding of package
I: unmounting dev/pts filesystem
I: unmounting run/shm filesystem
I: unmounting proc filesystem
I: cleaning the build env 
I: removing directory /var/cache/pbuilder/build/23507 and its subdirectories

我肯定安装了 gawk,我的配置没有什么奇怪的。我的debian/control

$ more debian/control 
Source: opensh
Section: utils
Priority: optional
Maintainer: Niklas Larsson <nik@kth.se>
Build-Depends: debhelper (>=9),autotools-dev
Standards-Version: 3.9.6
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/opensh.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/opensh.git

Package: opensh
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>

【问题讨论】:

  • 您能否在问题中包含您的debian/control 文件?至少是它的依赖项?
  • @FlorianWeimer 我包含了文件。我已经安装了依赖项。我不明白。使用 make 构建良好,但使用打包工具失败。

标签: linux makefile ubuntu-16.04 autoconf pbuilder


【解决方案1】:

debian/control 文件不正确。 gawk 不是必需的或构建必需的包,因此它不包含在默认的 pbuilder 环境中。如果构建过程需要,则需要明确列出:

Build-Depends: debhelper (>=9), autotools-dev, gawk

安装在 pbuilder 环境之外也没关系。故意将环境保持在最低限度以强制执行正确的构建依赖关系。

【讨论】:

  • 我想下一次失败也是一样的:/usr/bin/ld: cannot find -lbsd ,我应该添加依赖libbsd-dev
  • 对,如果你的包需要,你也需要添加libbsd-dev。欢迎使用 Debian(嗯,Ubuntu)打包!
猜你喜欢
  • 1970-01-01
  • 2014-10-12
  • 2021-05-20
  • 2021-02-27
  • 2016-09-10
  • 1970-01-01
  • 2022-01-17
  • 2011-06-21
  • 1970-01-01
相关资源
最近更新 更多