Search code examples
builddebiandpkgcups

unable to compile cups (in Debian, using dpkg-buildpackage)


I have downloaded cups source with apt-get source cups, and I am trying to compile it with dpkg-buildpackage. The compilation fails with following error:

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

I have no idea what is wrong. I have all build-dependencies installed.

I am using Debian Wheezy

Can somebody please help?


Solution

  • apt-get build-dep cups should be run to get all the build dependencies for cups. I know you say you installed all the dependencies, but since you didn't say how you did it I provide that command as the mechanism I'd use to do it.

    A number of things come to mind. Some packages don't build well when done as the root user (you won't find an official source that says it, but I have made that observation over years of building packages on Debian). Generally I do software builds as a normal user but using fakeroot. Since I prefer to use fakeroot for package builds I make sure fakeroot is installed via apt-get install fakeroot. Then as a non-root user I would do apt-get source cups followed by a typical dpkg-buildpackage -b -us -uc -rfakeroot to build binaries on a Debian system. I happened to build Cups 1.5.3 on my Debian Wheezy system here without any issues as a non-root user.

    I happened to try this build as root and interestingly enough cups got stuck during the tests while trying to launch the scheduler. This problem didn't exist as a non-root user. Although what happened on my system didn't generate the same resulting error, as my tests would never finish at all!

    I'd recommend trying a build using fakeroot as a non-root user if you aren't already doing so.

    Specific to your debug output I find this curious:

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

    I'm wondering if during the tests a problem with a USB printer device is causing your failure. Do you have a USB printer connected directly to your system? If so, try disconnecting it and doing a build. I'm wondering if a problem in the cups-device subsystem specific to a particular USB printer is causing this failure during a cups build.

    I happened to find this bug report regarding a similar problem with cups-device and signal 11 (on an older Ubuntu - Debian based system). It is an older bug that was apparently fixed, but I wonder if there are other cases that are still a problem. The bug had this to say:

    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.

    It then provides this in the error log which is similar to the errors you are seeing during the tests while building cups:

    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!