【问题标题】:unable to compile cups (in Debian, using dpkg-buildpackage)无法编译 cups(在 Debian 中,使用 dpkg-buildpackage)
【发布时间】:2023-03-04 22:16:02
【问题描述】:

我已经用apt-get source cups 下载了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

有人可以帮忙吗?

【问题讨论】:

    标签: build debian dpkg cups


    【解决方案1】:

    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用户不存在此问题。虽然我的系统上发生的事情并没有产生同样的错误,因为我的测试永远不会完成!

    如果您还没有这样做,我建议您尝试以非 root 用户身份使用 fakeroot 进行构建。

    具体到您的调试输出我觉得这很奇怪:

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

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

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

    但是,出于某种原因,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!
    

    【讨论】:

      【解决方案2】:

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

      您可能想进一步调查,可能从this link开始

      【讨论】:

        猜你喜欢
        • 2022-07-16
        • 2022-07-14
        • 1970-01-01
        • 1970-01-01
        • 2018-08-22
        • 1970-01-01
        • 2014-08-02
        • 2014-07-15
        • 1970-01-01
        相关资源
        最近更新 更多