【发布时间】:2023-03-31 07:43:01
【问题描述】:
我最初是几天前在 askubuntu @ 上发布的 https://askubuntu.com/questions/1044708/debian-rules161-recipe-for-target-config-status-failed
很遗憾,我没有收到任何回复。因此寻找一些 StackOverflow 的帮助。
我正在尝试为collect-pw 构建一个deb 包。上游的焦油球是:
http://perfwatcher.free.fr/download/collectd/collectd-5.4.0.20150311.tar.gz
为了构建这个包,我从 ubuntu repo 中提取了 collectd 的源包,并修改了 debian/control 和 debian/changelog 下的包名称。
现在,当我运行 pdebuild(或 debuild)时,它会失败并出现以下错误:
configure: exit 1
debian/rules:161: recipe for target 'config.status' failed
make: *** [config.status] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2
我无法弄清楚这里出了什么问题。该错误是一般错误。
如果我运行./configure、make,那么构建就可以了。
这里是来自debian/rules的相关行
160 config.status: configure
161 dh_testdir
162
163 PKG_CONFIG_PATH="$(CURDIR)/debian/pkgconfig:$$PKG_CONFIG_PATH" \
164 ./configure $(confflags) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
165 JAVAC="$(JAVAC)" JAR="$(JAR)" JAVA_CPPFLAGS="$(JAVA_CPPFLAGS)" \
166 JAVA_LDFLAGS="$(JAVA_LDFLAGS)" \
167 || ( status=$$?; cat config.log; exit $$status )
您能否提供有关此处可能出现问题的任何指示?或者 任何让它提供详细错误的建议都会有所帮助,因为
configure: exit 1 并没有提供太多可以采取行动的洞察力。
顺便说一句,我在debian/rules 中启用了export DH_VERBOSE=1。
更新:
正如@GiacomoCatenazzi 所建议的:
- 是的,我可以成功运行
dh_testdir。 - 我将
make与debian/rules作为makefile 运行,并将详细启用为make -d -f debian/rules。这一次它在相同的config.status步骤上再次失败,并添加了 2 条我无法理解的调试行。
这是上面make命令的最后几行输出:
...
...
...
#define HAVE_PLUGIN_VSERVER 1
#define HAVE_PLUGIN_WIRELESS 1
#define HAVE_PLUGIN_WRITE_GRAPHITE 1
configure: exit 1
Reaping losing child 0x1a103d0 PID 27476
debian/rules:161: recipe for target 'config.status' failed
make: *** [config.status] Error 1
Removing child 0x1a103d0 PID 27476 from chain.
- 运行后,它创建了
config.log,它有大约 30k 行。
日志最后几行如下:
29303 #define HAVE_PLUGIN_WIRELESS 1
29304 #define HAVE_PLUGIN_WRITE_GRAPHITE 1
29305
29306 configure: exit 1
这里也没有有用的信息:(
更新:
根据@Stephen Kitt 的建议,完整的config.log 可在此处获得:http://pasted.co/3767a043
【问题讨论】:
-
dh_testdir 的状态是什么?您能否使用 debian/rules 作为 Makefile 和 config.status 作为目标并使用详细标志运行 make。
-
你能把完整的
config.log贴在某个地方吗?它会有错误的原因,但很难找到。 -
感谢您的宝贵时间@Stephen。我已将
config.log添加到线程中。 -
exit 1看起来像是故意返回错误,而当您以交互方式运行它时您只是没有注意到,因为当您以交互方式运行某些东西时通常不会查看它的退出代码. -
您能尝试再次使用
pdebuild构建并发布构建日志吗?它存储在源目录的父目录中扩展名为.build的文件中。
标签: ubuntu debian configure dpkg