Bug 98428 - Cannot print with net-print/hplip-0.9.3
Bug#: 98428 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: printing@gentoo.org Reported By: lists.sridhar@dhanapalan.com
Component: Printing
URL: 
Summary: Cannot print with net-print/hplip-0.9.3
Keywords:  
Status Whiteboard: 
Opened: 2005-07-08 22:42 0000
Description:   Opened: 2005-07-08 22:42 0000
I have an HP OfficeJet 6110 All-in-One printer. The hplip-0.9.2.ebuild from Bug
73709 works perfectly: I can both print and scan. However, the
hplip-0.9.3.ebuild in portage only allows me to scan. If I try to print, nothing
is added to the CUPS print queue.

After downgrading to hplip-0.9.2.ebuild and restarting the hplip service,
everything worked again.

I thought this might be due to the /etc/init.d/hplip script, so I replaced the
version from hplip-0.9.2 with the one from hplip-0.9.3. Even with using the
/etc/init.d/hplip script from hplip-0.9.3 on hplip-0.9.2, both printing and
scanning worked.

Reproducible: Always
Steps to Reproduce:




Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6-yama i686)
=================================================================
System uname: 2.6.11-gentoo-r6-yama i686 AMD Athlon(TM) XP 2100+
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.2.3-r5,dev-lang/python-2.3.5 [2.3.5 (#1,
May  1 2005, 03:19:10)]
ccache version 2.3 [enabled]
dev-lang/python:     2.2.3-r5, 2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mcpu=athlon-xp -O3 -pipe -m3dnow -msse -mfpmath=sse
-mmmx -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop
-frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -mcpu=athlon-xp -O3 -pipe -m3dnow -msse -mfpmath=sse
-mmmx -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop
-frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays"
DISTDIR="/data2/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache digest distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.internode.on.net/pub/gentoo
ftp://mirror.aarnet.edu.au/pub/gentoo ftp://mirror.pacific.net.au/gentoo
ftp://planetmirror.com/pub/gentoo http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_AU"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/data2/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/data2/portage /data2/portage-bmg-main"
SYNC="rsync://mirror.internode.on.net/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib acpi aim alsa apm arts artswrappersuid
audiofile avi bash-completion bindist bitmap-fonts bonobo cairo cdda cddb cdio
cdparanoia cdr crypt cups curl dbus dga divx4linux dts dvd dvdr dvdread eds
emboss encode esd faad fam fbcon ffmpeg firefox flac flash foomaticdb fortran
freetype freetype2 gb gd gdbm ggi ggz gif gimpprint glitz gnome gnome-libs
gnome-print gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal howl icq
imagemagick imlib inkjar ipv6 ithreads jabber java javascript jpeg jpeg2k junit
kde kdeenablefinal lesstif libcaca libg++ libwww lzo mad maildir matroska mbox
mikmod mjpeg mmx mng mono motif mozilla moznomail mozsvg mp3 mpeg mplayer msn
mysql ncurses network nocd noplugin nptl nptlonly nvidia objprelink offensive
ogg oggvorbis ooo-kde opengl oscar oss pam pdflib perl pic plugin png ppds
prelink python qt qtmt quicktime rar readline real rtc samba scanner sdl shadow
slang slp smime snmp speex spell sqlite sse ssl stream subtitles svg svga tcltk
tcpd tex tga theora threads tidy tiff truetype truetype-fonts type1-fonts
unicode usb v4l v4l2 vcd videos vorbis win32codecs wmf wxwindows x86 xanim xface
xine xml xml2 xmms xosd xprint xscreensaver xv xvid xvmc yahoo zlib
linguas_en_GB userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS

------- Comment #1 From Heinrich Wendel (RETIRED) 2005-07-10 08:37:27 0000 -------
*** Bug 95953 has been marked as a duplicate of this bug. ***

------- Comment #2 From Luis Medinas (RETIRED) 2005-08-02 09:09:50 0000 -------
Can you please take a look at the bug #95953 . hplip-0.9.4 is in cvs. Test it
please.

------- Comment #3 From Sridhar Dhanapalan 2005-08-14 19:13:42 0000 -------
hplip-0.9.4 has the same problem. I had to downgrade once again to hplip-0.9.2
to restore printing functionality.

------- Comment #4 From Luis Medinas (RETIRED) 2005-09-25 09:42:02 0000 -------
*** Bug 105009 has been marked as a duplicate of this bug. ***

------- Comment #5 From Luis Medinas (RETIRED) 2005-09-25 10:01:51 0000 -------
I commited hplip 0.9.5 i had the information that it works fine now. Reopen
with
a patch if it still not working for you. (i don't have an hp printer so i can
test this).

------- Comment #6 From Jiří Vyskočil 2005-09-28 09:29:26 0000 -------
Unfortunately, my problem (bug 105009 - marked duplicate) persists even with
0.9.5. '/etc/init.d/hplip start' fails, running manually from command line
works. However, I don't know what additional information should I include.

------- Comment #7 From Paul Giordano 2005-09-30 06:56:17 0000 -------
I also have this problem. Backing off to prior versions does NOT fix the
problem.

------- Comment #8 From Rob Brown 2005-09-30 13:14:34 0000 -------
I also have this issue. However, I found that if I remove hplip and cups from
the default runlevel, but instead put this in /etc/conf.d/local.start:

/usr/bin/hpiod
sleep 1
/usr/share/hplip/hpssd.py
sleep 1
/etc/init.d/cupsd start

it works just fine. Some sort of timing issue then?

------- Comment #9 From Jiří Vyskočil 2005-10-05 11:02:53 0000 -------
I don't believe the timing is relevant, it seems, that hpssd doesn't like the
'start-stop-daemon' way of invoking. If the initscript is changed so that it's
run directly (ie. no start-stop-daemon line, just something like
'/usr/share/hplip/hpssd.py > /dev/null') it works fine. However, you lose the
ability of shutting it down as the pid remains unknown to the system.
btw, someone with the right permissions should reopen the bug as it's still
unresolved even with v0.9.5.

------- Comment #10 From Sridhar Dhanapalan 2005-11-03 03:55:01 0000 -------
The problem still exists with hplip 0.9.5. Again, downgrading to 0.9.2 fixes
it.

------- Comment #11 From William Keaney 2005-11-25 15:00:51 0000 -------
(In reply to comment #9)
> I don't believe the timing is relevant, it seems, that hpssd doesn't like the
> 'start-stop-daemon' way of invoking. If the initscript is changed so that it's
> run directly (ie. no start-stop-daemon line, just something like
> '/usr/share/hplip/hpssd.py > /dev/null') it works fine. However, you lose the
> ability of shutting it down as the pid remains unknown to the system.
> btw, someone with the right permissions should reopen the bug as it's still
> unresolved even with v0.9.5.

I have the same problem with v.0.9.5.  
I ran the commands exactly as listed in the script ( start-stop-daemon --start
--exec /usr/sbin/hpiod >/dev/null 2>&1 && start-stop-daemon --start --exec
/usr/share/hplip/hpssd.py --pidfile /var/run/hpssd.pid >/dev/null 2>&1 ), which
worked fine, but running '/etc/init.d/hplip start' fails at hpssd.  I read on
forums.gentoo.org that someone had a similar error when their ink cartridges
were empty, but my still have a few pages left in 'em.
As far as I can tell the syntax in the init file is perfect, so I'm not sure why
this is failing.  I'm going to try downgrading to .9.2 just for kicks.

------- Comment #12 From William Keaney 2005-11-25 16:45:39 0000 -------
emerge hplip-0.9.2 fails for me:
printerproxy.h:69: error: ISO C++ forbids declaration of 'Printer' with no type
printerproxy.h:69: error: 'Printer' declared as a 'virtual' field
printerproxy.h:69: error: expected ';' before '*' token
printerfactory.h:92: error: ISO C++ forbids declaration of 'Printer' with no type
printerfactory.h:92: error: 'Printer' declared as an 'inline' field
printerfactory.h:92: error: expected ';' before '*' token
printerfactory.h:178: error: expected initializer before '*' token

------- Comment #13 From Boris Faure 2005-12-23 04:29:47 0000 -------
(In reply to comment #11)
I'm using net-print/hplip-0.9.7, and it works fine on x86 with my PSC-2355.
I've got an error using the init-script so it always fails.

I've fixed it by changing the first line of /usr/share/hplip/hpssd.py from
#!/usr/bin/env python
to
#!/usr/bin/python
. This error occurs with other gentoo users on this thread (in french)
http://forums.gentoo.org/viewtopic-p-2953081.html .

Greets

------- Comment #14 From Chris Bayley 2005-12-27 08:18:37 0000 -------
(In reply to comment #13)
> I've fixed it by changing the first line of /usr/share/hplip/hpssd.py from
> #!/usr/bin/env python
> to
> #!/usr/bin/python

I concur, I'm using 0.9.7 also and had no problems running start-stop-daemon
with identical parameters either from cl or from bash but there is obviously
something in the /sbin/runscript environment that upsets it. However the above
change works for me and many in the french thread mentioned above.

Cheers,
Pouakai

------- Comment #15 From Christian Roessner 2006-01-05 02:43:52 0000 -------
I can confirm: Changing the magic line in the python script fixes it for me,
too.

------- Comment #16 From LukᚠPolívka 2006-01-08 00:53:23 0000 -------
(In reply to comment #15)
> I can confirm: Changing the magic line in the python script fixes it for me,
> too.
> 

#13 works for me as well.

------- Comment #17 From Jakub Moc (RETIRED) 2006-01-14 02:25:53 0000 -------
*** Bug 118958 has been marked as a duplicate of this bug. ***

------- Comment #18 From Marcelo Goes 2006-01-14 10:24:24 0000 -------
Ok, added the fix to 0.9.7-r1. Do you mind testing it out?

------- Comment #19 From Marcelo Goes 2006-01-14 10:58:08 0000 -------
Marking as fixed.