Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 490964 - net-print/hplip cannot print: a2ps -> lpr (problem with ghostscript-gpl? %%[ Error: invalidaccess; OffendingCommand: put ]%% and/or **** Unable to open the initial device, quitting.)
Summary: net-print/hplip cannot print: a2ps -> lpr (problem with ghostscript-gpl? %%[ ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-10 21:00 UTC by Paul Osmialowski
Modified: 2017-02-11 23:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Osmialowski 2013-11-10 21:00:34 UTC
I did not notice when the problem started, however I'm almost 100% sure I was able to print files using a2ps (two pages per one sheet) about month ago. And now I can't. I'm updating my Gentoo boxes frequently, I guess I should stop do that.
Today I prepared new postrcript file (firefox, "print to posctript") and tried to print it with a2ps, still the same problem. My printer is HP Officejet 4500
This postscript file can be displayed correclty by gv (ghostview), also ghostview is able to print this document one page per sheet.
Print Test Page works correctly. lpq, lprm, lpstat outputs look ok.
I know a2ps is a rarely used feature, however, it worked and I want it back, otherwise, this is another entry in my rapidly growing list of uptades-driven regressions in Gentoo.

Now, this is the worst. I'm using a2ps to print source code files. I tried:
a2ps test.c|lpr
And all I got on the paper is a message "**** Unable to open the initial device, quitting."
Now I feel really pissed off!

[ebuild   R    ] media-libs/libpng-1.5.17-r1  USE="apng (-neon) -static-libs" 0 kB
[ebuild   R    ] media-libs/tiff-4.0.3-r4  USE="cxx jbig jpeg lzma zlib -static-libs" 0 kB
[ebuild   R    ] net-print/cups-1.6.4  USE="X acl dbus filters gnutls java pam python ssl threads xinetd -debug -kerberos -lprng-compat (-selinux) -static-libs -usb -zeroconf" LINGUAS="-ca -es -fr -ja -ru" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" 0 kB
[ebuild   R    ] app-text/ghostscript-gpl-9.05-r1  USE="X cups dbus djvu gtk idn jpeg2k -bindist -static-libs" LINGUAS="-ja -ko -zh_CN -zh_TW" 0 kB
[ebuild   R    ] net-print/hplip-3.12.10a  USE="X fax hpcups hpijs kde libnotify parport policykit qt4 scanner snmp -doc -libusb0 -minimal -static-ppds" 0 kB
[ebuild   R    ] app-text/a2ps-4.14-r3  USE="emacs latex nls -static-libs -vanilla" LINGUAS="-ja" 0 kB

Maybe you can suggest me what downgrade first?


Reproducible: Always

Steps to Reproduce:
1. Start Firefox, I used linaro.org page, I picked one with a lot of text
2. Print to file, choose ps output
3. a2ps mozilla.ps | lpr

Actual Results:  
E [10/Nov/2013:21:35:47 +0100] [Job 1131] Unable to open image file for printing!
E [10/Nov/2013:21:35:47 +0100] [Job 1131] Job stopped due to filter errors; please consult the error_log file for details.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] The following messages were recorded from 21:35:46 to 21:35:47
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Adding start banner page "none".
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Queued on "HP_Officejet_4500_G510g-m" by "root".
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Auto-typing file...
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Request file type is application/postscript.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] File of type application/postscript queued by "root".
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Adding end banner page "none".
D [10/Nov/2013:21:35:47 +0100] [Job 1131] time-at-processing=1384115747
D [10/Nov/2013:21:35:47 +0100] [Job 1131] 3 filters for job:
D [10/Nov/2013:21:35:47 +0100] [Job 1131] pstotiff (application/postscript to image/tiff, cost 80)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] imagetopdf (image/tiff to application/vnd.cups-pdf, cost 33)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] foomatic-rip (application/vnd.cups-pdf to printer/HP_Officejet_4500_G510g-m, cost 0)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] job-sheets=none,none
D [10/Nov/2013:21:35:47 +0100] [Job 1131] argv[0]="HP_Officejet_4500_G510g-m"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] argv[1]="1131"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] argv[2]="root"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] argv[3]="(stdin)"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] argv[4]="1"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] argv[5]="finishings=3 number-up=1 job-uuid=urn:uuid:6341f2bc-fb84-3b74-6b8c-0b9226a5b56f job-originating-host-name=localhost time-at-creation=1384115746 time-at-processing=1384115747"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] argv[6]="/var/spool/cups/d01131-001"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[2]="CUPS_DOCROOT=/usr/share/cups/html"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[5]="CUPS_SERVERBIN=/usr/libexec/cups"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[7]="CUPS_STATEDIR=/run/cups"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[8]="HOME=/var/spool/cups/tmp"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[9]="PATH=/usr/libexec/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[10]="SERVER_ADMIN=root@oyster"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[11]="SOFTWARE=CUPS/1.6.4"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[13]="USER=root"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[14]="CUPS_MAX_MESSAGE=2047"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[15]="CUPS_SERVER=/run/cups/cups.sock"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[16]="CUPS_ENCRYPTION=IfRequested"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[17]="IPP_PORT=631"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[18]="CHARSET=utf-8"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[19]="LANG=pl_PL.UTF-8"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[20]="PPD=/etc/cups/ppd/HP_Officejet_4500_G510g-m.ppd"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[21]="RIP_MAX_CACHE=128m"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[22]="CONTENT_TYPE=application/postscript"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[23]="DEVICE_URI=socket://192.168.1.34:9100"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[24]="PRINTER_INFO=HP Officejet 4500 G510g-m"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[25]="PRINTER_LOCATION="
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[26]="PRINTER=HP_Officejet_4500_G510g-m"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[27]="PRINTER_STATE_REASONS=none"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[28]="CUPS_FILETYPE=document"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-pdf"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] envp[30]="AUTH_I****"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Started filter /usr/libexec/cups/filter/pstotiff (PID 4525)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Started filter /usr/libexec/cups/filter/imagetopdf (PID 4526)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Started filter /usr/libexec/cups/filter/foomatic-rip (PID 4527)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Started backend /usr/libexec/cups/backend/socket (PID 4528)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: +connecting-to-device
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Looking up "192.168.1.34"...
D [10/Nov/2013:21:35:47 +0100] [Job 1131] hrDeviceDesc="Officejet 4500 G510g-m"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] prtMarkerColorantValue.1.1 = "black ink cartridge"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] prtMarkerColorantValue.1.2 = "tri-color ink cartridge"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] prtMarkerColorantValue.1.3 = "black ink cartridge"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] prtMarkerColorantValue.1.4 = "black ink cartridge"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ATTR: marker-colors=none,none,none,none,none,none,none,none
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ATTR: marker-names='"black ink cartridge"','"tri-color ink cartridge"','"black ink cartridge"','"black ink cartridge"','"tri-color ink cartridge"','"black ink cartridge"','"black ink cartridge"','"black ink cartridge"'
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ATTR: marker-types=ink,ink,ink,other,ink,ink,ink,ink
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ATTR: marker-levels=-1,-1,-1,-1,-1,-1,-1,-1
D [10/Nov/2013:21:35:47 +0100] [Job 1131] new_supply_state=0, change_state=ffff
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -developer-low-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -developer-empty-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -marker-supply-low-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -marker-supply-empty-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -opc-near-eol-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -opc-life-over-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -toner-low-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -toner-empty-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -waste-receptacle-almost-full-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -waste-receptacle-full-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -cleaner-life-almost-over-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -cleaner-life-over-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] new_state=0, change_state=ffff
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -media-empty-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -door-open-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -media-jam-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -input-tray-missing-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -output-tray-missing-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -marker-supply-missing-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -output-area-almost-full-report
D [10/Nov/2013:21:35:47 +0100] [Job 1131] STATE: -output-area-full-warning
D [10/Nov/2013:21:35:47 +0100] [Job 1131] backendWaitLoop(snmp_fd=5, addr=0xb79c5494, side_cb=0xb7722970)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Getting input from file 
D [10/Nov/2013:21:35:47 +0100] [Job 1131] foomatic-rip version 4.0.17.256 running...
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Parsing PPD file ...
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option ColorSpace
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option Resolution
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option PageSize
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option Model
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option PrintoutMode
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option MediaType
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option InputSlot
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option Quality
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option Duplex
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option DryTime
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option ImageableArea
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option PaperDimension
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Added option Font
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Parameter Summary
D [10/Nov/2013:21:35:47 +0100] [Job 1131] -----------------
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Spooler: cups
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Printer: HP_Officejet_4500_G510g-m
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Shell: /bin/bash
D [10/Nov/2013:21:35:47 +0100] [Job 1131] PPD file: /etc/cups/ppd/HP_Officejet_4500_G510g-m.ppd
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ATTR file: 
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Printer model: HP Officejet 4500 g510g-m hpijs, 3.12.10a
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Job title: stdin
D [10/Nov/2013:21:35:47 +0100] [Job 1131] File(s) to be printed:
D [10/Nov/2013:21:35:47 +0100] [Job 1131] <STDIN>
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Ghostscript extra search path ('GS_LIB'): /usr/share/cups/fonts
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Printing system options:
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Pondering option 'finishings=3'
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Unknown option finishings=3.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Pondering option 'number-up=1'
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Unknown option number-up=1.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Pondering option 'job-uuid=urn:uuid:6341f2bc-fb84-3b74-6b8c-0b9226a5b56f'
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Unknown option job-uuid=urn:uuid:6341f2bc-fb84-3b74-6b8c-0b9226a5b56f.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Pondering option 'job-originating-host-name=localhost'
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Unknown option job-originating-host-name=localhost.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Pondering option 'time-at-creation=1384115746'
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Unknown option time-at-creation=1384115746.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Pondering option 'time-at-processing=1384115747'
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Unknown option time-at-processing=1384115747.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Options from the PPD file:
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ================================================
D [10/Nov/2013:21:35:47 +0100] [Job 1131] File: <STDIN>
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ================================================
D [10/Nov/2013:21:35:47 +0100] [Job 1131] GPL Ghostscript 9.05 (2012-02-08)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] This software comes with NO WARRANTY: see the file PUBLIC for details.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] %%[ Error: invalidaccess; OffendingCommand: put ]%%
D [10/Nov/2013:21:35:47 +0100] [Job 1131] GPL Ghostscript 9.05: Unrecoverable error, exit code 1
D [10/Nov/2013:21:35:47 +0100] [Job 1131] PID 4525 (/usr/libexec/cups/filter/pstotiff) exited with no errors.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Page = 595x842; 10,36 to 585,833
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Set job-printer-state-message to "Unable to open image file for printing!", current level=ERROR
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Cannot process "<STDIN>": Unknown filetype.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Process is dying with "Could not print file <STDIN>
D [10/Nov/2013:21:35:47 +0100] [Job 1131] ", exit stat 2
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Cleaning up...
D [10/Nov/2013:21:35:47 +0100] [Job 1131] PID 4526 (/usr/libexec/cups/filter/imagetopdf) stopped with status 1.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Hint: Try setting the LogLevel to "debug" to find out more.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] PID 4527 (/usr/libexec/cups/filter/foomatic-rip) stopped with status 2.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] Hint: Try setting the LogLevel to "debug" to find out more.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] PID 4528 (/usr/libexec/cups/backend/socket) exited with no errors.
D [10/Nov/2013:21:35:47 +0100] [Job 1131] End of messages
D [10/Nov/2013:21:35:47 +0100] [Job 1131] printer-state=3(idle)
D [10/Nov/2013:21:35:47 +0100] [Job 1131] printer-state-message="Unable to open image file for printing!"
D [10/Nov/2013:21:35:47 +0100] [Job 1131] printer-state-reasons=none
E [10/Nov/2013:21:40:48 +0100] [Job 1131] Stopping unresponsive job.

Expected Results:  
printed document
Comment 1 Paul Osmialowski 2013-11-10 21:00:53 UTC
Portage 2.2.1 (default/linux/x86/13.0, gcc-4.6.3, glibc-2.15-r3, 3.10.17-gentoo i686)
=================================================================
System uname: Linux-3.10.17-gentoo-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-gentoo-2.2
KiB Mem:     2066416 total,    234508 free
KiB Swap:    2104508 total,   2104508 free
Timestamp of tree: Sat, 09 Nov 2013 07:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.4.6, 2.6.8-r3, 2.7.5-r3, 3.1.5, 3.2.5-r3
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.5, 1.6.3, 1.7.9-r2, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.3.6-r1, 4.4.7, 4.5.4, 4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo armagetron
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/armagetron"
USE="16bit-indices 24bpp 32bit 7zip R X Xaw3d a52 aac aacplus aacs aalib abiword accessibility acl acoustid acpi adns adplug ads aesicm afp akode akonadi alias alisp allegro alsa alstream amr amrnb amrwb analitza angelscript animgif ao apbs aplaymidi apng applet archive armadillo arpack artworkextra asf asn aspell ass assistant asyncns athena attica attrib audacious audio audiofile auth automount autoreplace autotrace aux_xml avalon-framework avalon-logkit avantgo avcodec avformat awt background badval bash-completion bazaar bcmath beautifulsoup3 berkdb bidi bitmap bittorrent bl blas blaster blender-game blksha1 bluetooth bluray boehm-gc bonjour bonobo bookmarks boost branding bs2b bzip2 cache cairo calendar canberra canlock caps caps-ng capslib catalogs cblas cdda cddax cdf cdio cdparanoia cdr cdrtools cegui celt cg cgraph chappa chardet chdir chicken chm ciao cilk city clamd clamdtop clang cli client clipboard clisp clucene cluster clutter collab colord combination-explosion-check common-lisp community compat connectionstatus consolekit contactnotes context contrast contrib corefonts coverart cpufreq cracklib cramfs crashreporter creds cron crypt cryptsetup cscope css ctype ctypes-python cuda cue cups curl cursors cvs cxx d data dbase dbi dbus dc1394 ddate debugger declarative default-font deprecated designer designer-plugin desktopglobe detex developer devfs-compat devhelp device-mapper devil dht dia digitalradio dirac discard-path discouraged djbfft djvu dmi dnd docbook doctool dot double-precision down-root dri drmaa dsdp dselect dssi dtmf dts dv dvb dvbpsi dvd dvdnav dvdr dvi dvi2tty dvipdfm dynamic e2fsprogs eap-tls ebook eclipse edd edit editor eds egl eigen elf elisp emacs embedded emf emoticons-manager emovix enca enchant encode enscript eolconv epiphany epspdf equalizer escreen eselect ethernet etiquette excel exceptions exif expat extensions external-fuse extra extra-cardsets extra-tools extrafilters extramodules extras faac faad facedetect fam fame farstream fasttree fat fax fdk festival ffamber ffmpeg fftw filecaps fileinfo filter filters findbugs finger fingerprint firefox firefox3 fits flac flash floppy fltk fluidsynth fontconfig fontforge foomaticdb fortran fortran2003 fox fping fpx frei0r ftd2xx ftdi ftp fts3 fuse futures g15 g3dvl gadu gallium games gcdmaster gcode gconf gcrypt gd gdal gdbm gdm gdu gecko gedit geoip geoloc geolocation geonames geos ggi gif gimp ginac git gjdoc glade glep glew glib glitz gloox glpk glut gmath gme gml gmp gmplayer gnet gnokii gnome gnome-keyring gnomecd gnumeric gnuplot gnutls google gopher gpg gphoto2 gpm gps gptfdisk gpu grammar graphics graphicsmagick graphite graphviz groupwise grp grub gs gsettings gsf gsl gsm gsmloc gssapi gstreamer gtk gtk2 gtk3 gtkhtml gtkstyle gudev guile gunit gzip-el h224 h281 h323 hal handbook hardcoded-tables harfbuzz hash hdf hdf5 health help heterogeneous highlight hipe hires-icons history hlapi hog hostip hotpixels howl-compat hpcups hpijs html htmlreport http humanities hunspell hwdb i18n iax ical icecast icons iconv icu id3 id3tag idn iec61883 ieee1394 ifp ilbc image image-cache imagemagick imaging imlib infinality inherit-graph inifile inkjar inotify internal-fltk intl introspection iodbc ipc iplayer ipod iproute2 iptables ipv6 ipython irc irrlicht isag iscsi iso it3tag itk jabber jack jadetex jai java java5 java6 javacomm javamail javascript jbig jit jmf jms joystick jpeg jpeg2k json judy kate kde kdeprefix kdm kdrive kexiv2 keymap keyutils kig-scripting kipi kmod kontact kpathsea ladspa lame lapack largefile lash lasi lastfm lastfmradio latency_timing latex latex3 lcdfilter lcms ldap ldap-sasl ldapdb ldb ldos leim lensfun less levels libadns libass libburn libcaca libcanberra libclamav libdsk libev libevent libextractor libffi libgda libkms libmms libmpeg2 libnotify libs libsamplerate libssh2 libssp libsysfs libtar libtiger libv4l libv4l2 libvisual libwww libxml2 libyaml lid lightning linuxkeys lirc listen-queue live llvm lm_sensors log4j logitech-mouse logrotate lpsol lqr lua luatex lucene lvm1 lxde lyx lzma lzo m17n-lib m4lib-png mad magic mail manual maps math mathml matplotlib matroska mbox mclib mcve md5sum mdns-bundled mdnsresponder-compat mediawiki memmap mercurial metalink metapost metis metric mew mhash midi mikmod mime minizip mixer mjpeg mmap mms mms-agent mmx mng mod modplug modules mongodb mono moonlight motif motif22-compatibility mouse moviepack moviesounds mozdevelop mozdom mozilla mozsha1 mp2 mp3 mp3tunes mp4 mpeg mpg123 mpi mplayer mpx msn mta mtp mudflap mule multimedia mumble musepack music musicbrainz mvl mzscheme natspec nautilus ncat ncurses ndiff neXt nelma net netapi netbeans netcdf netlink netpbm nettle network networking new-clx new-login nextaw nfsdcld nfsidmap nfsv3 nfsv4 nfsv41 nio-buffers nis njb nls nntp no-old-linux nodrm nogyroscopic nokia nominatim normalize nowlistening nping npp nptl nsplugin nss ntfs ntfsprogs ntlm ntlm_unsupported_patch ntp numpy nut nuv nvidia nvtt nyx objc objc++ objc-gc ocaml ocamlopt ocr octave odbc ode offensive offscreen ofx ogdi ogg ogg123 ogm ois okteta okular omega omxil opal openal opencl opencore-amr openexr opengl openldap openmedia openmm openmp openpty openrc openssl openxml opus orc oscar osdmenu osgapps osmesa oss otp otr ots overlays pac pager pam pango pari parport password pasteafter pbs pcap pci pcntl pcre pcsc-lite pda pdf pdfannotextractor pdo perl perl-geoipupdate pg-intdatetime pgm phar phonon php physfs pipe pixmaps pkinit places plasma player playlist playtools plot plotutils plugin-checksum plugin-doat plugin-fishlim plugin-sysinfo plugins pm-utils pnat png pnm policykit poppler-data portaudio posix postgres postproc postscript powerkadu ppds ppp presto preview-latex prison private-headers profiler proj projectm ps pstricks pth publishers pvr pyglet python qalculate qemu qhull qimageblitz qos qpak qrupdate qscintilla qt-bundled qt-faststart qt-static qt3 qt3support qt4 qthelp quicktime quotes qwt radio raptor rar raw rcs readline real recursion-limit redeyes redland reflection regex remote remoteosd resid reviewboard rle romio rpm rrdtool rss rtc rtf rtmp rtsp ruby run-exes rups samba sametime sasl sbc scale0tilt scanner schroedinger science screen script scripting scripttools scsi sctp sdk sdl sdl-image sdl-sound sdlgfx seccomp segger semantic-desktop sensord serial servletapi session sftp sge shaders shapefile shared-glapi sharedclient sharedext sharedmem shine shm shmvideo shout sid sift sigsegv simplexml sip sipim skins skype slang smbclient smbtav2 smi smime smp smpeg sms sna sndfile snmp soap sockets solver sound soundex sounds soundtouch soup sourceview sox sparse speech speex spell spidermonkey spl splash sql sqlite sqlite3 srtp sse sse2 sse2check ssl startup-notification static-analyzer statistics stats stl stlink stream stun subject-rewrite subtitles subversion suhosin supernodal svg svm swat swig switcher swscale syslog system-mpmath systemtap sysvipc szip t1lib taglib tbb tcl tcpd tdb tdbtest teamarena telepathy teletext telnet test-framework tevent tex4ht texi2html texmacs texteffect tga themedesigner themes theora thesaurus thin thin-splines threads threadsafe thumbnail thumbnails tidy tiff tilepath timezone timidity tinfo tk tls tls-heartbeat tokenizer toolame toolbar toolkit-scroll-bars tools toporouter totem track-src-odirect traits translator tremor truetype tta twisted twolame type3 udev udev-acl udis86 udisks umfpack unicode unlock-notify unwind usb usbredir utempter utils uudeview uuid v4l v4l2 vaapi vala valgrind vamp vapigen vcd vcdinfo vcdx vdpau vdr verbose-io versaloon verse vhook vhost-net video videoslideshow vidix vim-pager vim-with-x virtuoso visualization vlm vmd vmware vmware-tools vnc voice vorbis vpx vst wad wallpapers watchdog wav wavpack wddx weather web webdav webdav-neon webdav-serf webgl webkit webkit2 webm webp widescreen win32codecs winbind windeco wininst winpopup wma wma-fixed wmf wordperfect wrappers wxwidgets wxwindows x264 x86 xa xanim xbase xcap xcb xchatdccserver xcomposite xdm-auth xemacs xembed xerces-c xetex xext xface xforms xforward xfs xft xgetdefault xindy xine xinerama xinetd xkb xlib-xcb xls xml xmldoclet xmlpatterns xmlreader xmlrpc xmlwriter xmp xmpp xnest xorg xorgmodule xosd xpdf-headers xpm xrandr xrender xscreensaver xsl xslt xterm xulrunner xv xvfb xvid xvmc xz yahoo yahoo-geo yaz youtube yp yv12 zip zlib zvbi" ABI_X86="32" ALSA_CARDS="emu10k1 emu10k1x" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon spca50x template ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="arm" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby18 ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="dummy nv nvidia v4l r128 intel vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 2 Paul Osmialowski 2013-11-10 21:07:15 UTC
Ok, now I can't print at all.
I removed all printers from cups, restarted cupsd, added my printer again (hpijs driver), restarted cups several time and now all I got on paper is "**** Unable to open the initial device, quitting". Few hours ago I could print test page, now I can't do even that.
Comment 3 Paul Osmialowski 2013-11-11 08:01:51 UTC
Let's summarize the facts
1. Printer is HP OfficeJet 4500. Driver for printer and fax device was installed more than year ago using hp-setup and it was hpijs (not hpcups)
2. Everything worked a month ago
3. Yesterday I couldn't print from a2ps, CUPS error log showed this:
%%[ Error: invalidaccess; OffendingCommand: put ]%%
4. I reinstalled printer (only, no fax device) using http://localhost:631 then restarted cupsd
5. I noticed race condition in /etc/init.d/cupsd - many it hangs on 'stop', many times it hangs on 'start'
6. After reinstallation and cupsd restart , I couldn't set default printer, no matter how I try, lpq shows there's no default target. 'lpoptions -d' can't connect to running CUPS server.
7. I removed 'Listen /run/cups/cups.sock' line in /etc/cups/cupsd.conf file and changed the only line in /etc/cups/client.conf file to 'ServerName localhost:631', after cupsd restart, lpoptions -d is able to set default printer, lpq can query printer queue now
8. Now I can't print anything, the only line I can see on the paper is "**** Unable to open the initial device, quitting."
9. I removed the printer using http://localhost:631 and restarted cupsd, then I used hp-setup to add printer (as before, it offers to printer and fax device), no driver could be found.
10. I rebuilt hplip with static-ppds use flag, now hp-setup offered me hpijs driver /usr/share/ppd/HP/hp-officejet_4500_g510g-m-hpijs.ppd.gz, I looked inside this file uzing zcat and found this:

*FoomaticIDs: "HP-Color_LaserJet_2600n hpijs"
*FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPA&&
USE -sDEVICE=ijs -sIjsServer=hpijs%A%B%C%D -dIjsUseOutputFD%Z -sOutputFi&&
le=- -"
*End
*FoomaticRIPOption Model: "enum CmdLine A 100"
*FoomaticRIPOptionSetting Model=HP-Color_LaserJet_2600n: " -sDeviceManufactur&&
er=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;HP Color LaserJet 2600n&quot;"

So, my inkjet printer became laserjet now...

11. cupsd restart again, and... no luck, still only "**** Unable to open the initial device, quitting." is printed
12. I googled this message and found suggestions to replace hpijs driver with hpcups
13. I removed both printer and fax devices using http://localhost:631 and restarted cupsd, then I started hp-setup again and picked /usr/share/ppd/HP/hp-officejet_4500_g510g-m.ppd.gz (hpcups driver) instead of proposed hpijs driver. I looked at ppd.gz using zcat and I didn't find any single line with 'LaserJet' token.
14. I restarted cupsd again (race condition in /etc/init.d/cupsd still hits me so it ends up with full reboot) and now I'm able to print test page!
15. Unfortunately, hpcups driver causes all of the problems you can read about in googles, seems like it is not recommended solution, it's only advantage is that it sometimes works
16. Main problem is that it does not use ghostscript to re-render postscritp
17. Seems like a2ps produces bad postscript, CUPS error log says:
prnt/hpcups/HPCupsFilter.cpp 252: ERROR: Unsupported resolution
Following CLOSED WONTFIX bug explains why:
https://bugzilla.redhat.com/show_bug.cgi?id=773765
As a matter of irony, this bug report is about OfficeJet 4500 too - the most popular Linux troublemaker in the world?
Comment 4 Daniel Pielmeier gentoo-dev 2013-11-11 14:55:56 UTC
First of all, calm down!

I don't think this is a hplip issue as you still use 3.12.10 and this version is stable for a long time now. The most recent update which might cause this was cups-1.6.4. You can easily find such things out by using app-portage/genlop.

You can try to rebuild everything involved (a2ps foomatic ghostscript cups hplip). Set cups configuration back to the defaults. Remove all printers and reconfigure them as described on the HPLIP Gentoo Wiki page [1].

I would suggest to use the hpcups driver as it is the one recommended by hplip. The hpijs driver is not developed anymore.

[1] https://wiki.gentoo.org/wiki/HPLIP
Comment 5 Paul Osmialowski 2013-11-11 22:00:23 UTC
As usual, the nature itself can find solution for any sophisticated problem. This time the solution is named 'ps2pdf'.
I have rebuilt hplip with -hpijs USE flag, so now only hpcups drivers are available. As before, I can print test page, still a2ps pipelined to lpr is not working (ERROR: Unsupported resolution). I don't know who's to blame, a2ps or lpr, however, a2ps output (and any other .ps file, I have a lot of them waiting to be printed) can be converted to pdf using ps2pdf, then opened in acroread and printed with any page arrangement I want. That's progress: I can do what I was able to do before, only with little more effort. Seems like regression is an inherent consequence of progress in Linux world, the only way to survive is to never give up searching for workarounds.
'a2ps file.pdf | lpr' <= this did not work either.
Comment 6 Daniel Pielmeier gentoo-dev 2013-11-14 18:45:27 UTC
I am removing myself from this bug as I don't think this is a hplip problem but more a cups or a2ps one.
Comment 7 Paul Osmialowski 2014-06-07 09:37:02 UTC
I've installed Gentoo on new machine and a2ps works again as in old days and as on my Ubuntu at work. I guess we can close this one.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2017-02-11 23:02:34 UTC
(In reply to Paul Osmialowski from comment #7)
> I've installed Gentoo on new machine and a2ps works again as in old days and
> as on my Ubuntu at work. I guess we can close this one.

OK thanks.