2014-10-16 286 views
3

我已經用apt-get source cups下載了杯子源文件,我試圖用dpkg-buildpackage編譯它。編譯失敗,出現以下錯誤:無法編譯杯子(在Debian中,使用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

有人能請幫忙嗎?

回答

1

雖然我不能告訴你究竟出了什麼問題,但我可以指出您正確的方向。
你看到的是ipptool單元測試的失敗。

您可能需要進一步調查,或許與this link

3

apt-get build-dep 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打印機嗎?如果是這樣,請嘗試斷開連接並進行構建。我想知道是否在cups構建期間特定於特定USB打印機的cups-device子系統中的問題導致此故障。

我碰巧發現這個bug report有關cup-device和signal 11(在較早的Ubuntu-Debian系統上)的類似問題。這是一個顯然固定的舊bug,但我想知道是否還有其他情況仍然是問題。這個錯誤是這樣說的:

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! 

But, for some reason or another, Ubuntu 9.10 and 10.04 does not properly recognize the existence of USB printers anymore. It does not recognize my HP Laserjet 4 and probably fails to recognize other USB printers, too.

然後它在錯誤日誌中,類似於你在構建杯子在測試過程中看到的錯誤提供了這種