无法编译杯子(在Debian中,使用dpkg-buildpackage)

时间:2014-10-16 15:07:00

标签: build debian dpkg cups

我已经使用apt-get source cups下载了来源,我正在尝试使用dpkg-buildpackage进行编译。编译失败,出现以下错误:

PASS: All job control files purged.
PASS: Printer 'Test1' correctly produced 55 page(s).
PASS: Printer 'Test2' correctly produced 23 page(s).
PASS: 135 requests logged.
PASS: CUPS-Get-Default not logged.
PASS: 0 emergency messages.
PASS: 0 alert messages.
PASS: 0 critical messages.
FAIL: 19 error messages, expected 18.
E [16/Oct/2014:15:48:55.461975 +0200] Returning IPP client-error-bad-request for Get-Jobs (no URI) from localhost
E [16/Oct/2014:15:48:55.462540 +0200] Missing attributes-natural-language attribute
E [16/Oct/2014:15:48:55.462577 +0200] Missing printer-uri, job-uri, or ppd-name attribute
E [16/Oct/2014:15:48:55.462651 +0200] Returning IPP client-error-bad-request for Get-Jobs (no URI) from localhost
E [16/Oct/2014:15:48:55.463161 +0200] Missing attributes-charset attribute
E [16/Oct/2014:15:48:55.463192 +0200] Missing attributes-natural-language attribute
E [16/Oct/2014:15:48:55.463228 +0200] Missing printer-uri, job-uri, or ppd-name attribute
E [16/Oct/2014:15:48:55.463303 +0200] Returning IPP client-error-bad-request for Get-Jobs (no URI) from localhost
E [16/Oct/2014:15:48:55.463831 +0200] Missing attributes-charset attribute
E [16/Oct/2014:15:48:55.463862 +0200] Missing attributes-natural-language attribute
E [16/Oct/2014:15:48:55.463898 +0200] Missing printer-uri, job-uri, or ppd-name attribute
E [16/Oct/2014:15:48:55.463981 +0200] Returning IPP client-error-bad-request for Get-Jobs (no URI) from localhost
E [16/Oct/2014:15:48:55.464499 +0200] Missing printer-uri, job-uri, or ppd-name attribute
E [16/Oct/2014:15:48:55.464590 +0200] Returning IPP client-error-bad-request for Get-Jobs (no URI) from localhost
E [16/Oct/2014:15:48:55.465803 +0200] Returning IPP client-error-bad-request for Get-Jobs (ipp://localhost:8631/jobs) from localhost
E [16/Oct/2014:15:48:55.466380 +0200] Returning IPP server-error-version-not-supported for Get-Jobs (no URI) from localhost
E [16/Oct/2014:15:48:55.522710 +0200] Returning IPP client-error-bad-request for Print-Job (ipp://localhost:8631/printers/Test1) from localhost
E [16/Oct/2014:15:49:02.558807 +0200] Returning IPP client-error-too-many-subscriptions for Create-Printer-Subscription (ipp://localhost:8631/printers/Test1) from localhost
E [16/Oct/2014:15:49:13.164121 +0200] [cups-deviced] PID 8234 (usb) crashed on signal 11!
E [16/Oct/2014:15:49:13.164484 +0200] [cups-deviced] PID 8235 (snmp) stopped with status 1!
PASS: 9 warning messages.
PASS: 0 notice messages.
PASS: 787 info messages.
PASS: 9755 debug messages.
PASS: 19774 debug2 messages.

1 tests failed.
Log files can be found in /tmp/cups-martin/log.
A HTML report was created in /tmp/cups-martin/cups-str-1.5-2014-10-16-martin.html.

Copies of the error_log and cups-str-1.5-2014-10-16-martin.html files are in
/home/martin/src/debian/cups-1.5.3/test.

make[1]: *** [check] Error 1
make[1]: Leaving directory `/home/martin/src/debian/cups-1.5.3'
make: *** [debian/stamp-makefile-check] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

我不知道出了什么问题。我已经安装了所有构建依赖项。

我正在使用Debian Wheezy

有人可以帮忙吗?

2 个答案:

答案 0 :(得分:3)

应运行

apt-get build-dep cups以获取cups的所有构建依赖项。我知道你说你安装了所有的依赖项,但由于你没有说你是怎么做的,我提供了这个命令作为我用来做它的机制。

有许多事情浮现在脑海中。有些软件包在用root用户完成后不能很好地构建(你找不到一个说明它的官方消息来源,但我已经在Debian上构建软件包多年来做了这个观察)。通常我使用fakeroot作为普通用户进行软件构建。由于我更喜欢​​使用fakeroot进行包构建,因此我确保通过apt-get install fakeroot安装fakeroot。然后作为非root用户,我会apt-get source cups后跟一个典型的dpkg-buildpackage -b -us -uc -rfakeroot来构建Debian系统上的二进制文件。我碰巧在我的Debian Wheezy系统上构建了Cups 1.5.3,没有任何问题作为非root用户。

我碰巧尝试将此版本作为root进行尝试,并且有趣的是cups在尝试启动调度程序时遇到了问题。此问题不是作为非root用户存在的。虽然我的系统上发生的事情并没有产生相同的结果错误,因为我的测试根本无法完成!

我建议您使用fakeroot作为非root用户进行构建,如果您还没有这样做的话。

特定于您的调试输出我发现这很好奇:

[cups-deviced] PID 8234 (usb) crashed on signal 11!

我想知道在测试期间USB打印机设备的问题是否导致您的失败。您是否有USB打印机直接连接到您的系统?如果是这样,请尝试断开连接并进行构建。我想知道特定USB打印机特定的cups-device子系统中的问题是否导致cups构建期间出现此故障。

我碰巧发现这个bug report关于cup-device和signal 11(在较旧的Ubuntu - 基于Debian的系统上)的类似问题。这是一个显然已修复的旧bug,但我想知道是否还有其他案例仍然存在问题。这个错误就是这样说的:

  

但是,由于某种原因,Ubuntu 9.10和10.04无法正确识别USB打印机的存在。它无法识别我的HP Laserjet 4,也可能无法识别其他USB打印机。

然后它会在错误日志中提供此内容,这类似于您在构建数据杯时在测试期间看到的错误:

Architecture: amd64
CupsErrorLog:
 E [18/Apr/2010:09:43:44 -0600] [cups-deviced] PID 1768 (usb) crashed on signal 11!
 E [18/Apr/2010:09:46:36 -0600] [cups-deviced] PID 1817 (usb) crashed on signal 11!

答案 1 :(得分:1)

虽然我无法告诉你究竟是什么问题,但我可以指出你正确的方向 你看到的是ipptool的单元测试失败了。

您可能希望进一步调查此问题,可能从this link

开始