GNU bug report logs

#29219 CUPS filter still can't access Ghostscript (gs)

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Reply or subscribe to this bug. View this bug as an mbox, status mbox, or maintainer mbox

Report forwarded to bug-guix@gnu.org:
bug#29219; Package guix. (Wed, 08 Nov 2017 20:52:02 GMT) (full text, mbox, link).


Acknowledgement sent to Mekeor Melire <mekeor.melire@gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org. (Wed, 08 Nov 2017 20:52:02 GMT) (full text, mbox, link).


Message #5 received at submit@debbugs.gnu.org (full text, mbox, reply):

From: Mekeor Melire <mekeor.melire@gmail.com>
To: bug-guix@gnu.org
Subject: CUPS filter still can't access Ghostscript (gs)
Date: Wed, 08 Nov 2017 21:50:52 +0100
I added two printers through CUPS' web interface (localhost:631) using
the PPD driver file which I downloaded (from openprinting.org): one
called ljet4 (which calls Ghostscript) and one called Postscript (which
just calls `cat`)⁰. The latter worked.


But although I was expecting commit
1728c411718e3b358c06561d6e80b47d7b331617¹ to fix this issue, when I try
the ljet4² driver, I still get this error in /var/log/cups/error_log³:


    sh: gs: command not found
    Process is dying with \"Unable to determine number of pages, page count: -1
    \", exit stat 3


Is anybody able to reproduce this issue?

How can I be sure that the cups-service I'm running is the recent one
which includes that commit? (I tried pulling guix and rebuilding the
system afterwards and restarting cups-service afterwards.)

What am I doing wrong?


⁰: https://www.openprinting.org/ppd-o-matic.php?driver=Postscript&printer=Kyocera-FS-920&show=1
¹: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=1728c411718e3b358c06561d6e80b47d7b331617
²: https://www.openprinting.org/ppd-o-matic.php?driver=ljet4&printer=Kyocera-FS-920&show=1
³: http://sprunge.us/EMbF


--
mekeor ~ EDD3 DFFA 76F6 11C0 145F 9A99 AC85 BAD8 A2F8 C868




Information forwarded to bug-guix@gnu.org:
bug#29219; Package guix. (Thu, 09 Nov 2017 09:06:02 GMT) (full text, mbox, link).


Message #8 received at 29219@debbugs.gnu.org (full text, mbox, reply):

From: ludo@gnu.org (Ludovic Courtès)
To: Mekeor Melire <mekeor.melire@gmail.com>
Cc: 29219@debbugs.gnu.org
Subject: Re: bug#29219: CUPS filter still can't access Ghostscript (gs)
Date: Thu, 09 Nov 2017 10:05:42 +0100
Hi,

Mekeor Melire <mekeor.melire@gmail.com> skribis:

> I added two printers through CUPS' web interface (localhost:631) using
> the PPD driver file which I downloaded (from openprinting.org): one
> called ljet4 (which calls Ghostscript) and one called Postscript (which
> just calls `cat`)⁰. The latter worked.
>
>
> But although I was expecting commit
> 1728c411718e3b358c06561d6e80b47d7b331617¹ to fix this issue, when I try
> the ljet4² driver, I still get this error in /var/log/cups/error_log³:
>
>
>     sh: gs: command not found
>     Process is dying with \"Unable to determine number of pages, page count: -1
>     \", exit stat 3
>
>
> Is anybody able to reproduce this issue?
>
> How can I be sure that the cups-service I'm running is the recent one
> which includes that commit? (I tried pulling guix and rebuilding the
> system afterwards and restarting cups-service afterwards.)

Just make sure to reconfigure from a recent-enough commit (run ‘guix
--version’ as root to see which commit you’re using.)

If it turns out you’re already using CUPS with commit
1728c411718e3b358c06561d6e80b47d7b331617, could you reproduce the issue
while running “strace -p PID -f -s 345 -o log”, where PID is the PID of
cupsd as shown by ‘herd status cups’?

TIA!

Ludo’.




Information forwarded to bug-guix@gnu.org:
bug#29219; Package guix. (Thu, 09 Nov 2017 19:20:02 GMT) (full text, mbox, link).


Message #11 received at 29219@debbugs.gnu.org (full text, mbox, reply):

From: Mekeor Melire <mekeor.melire@gmail.com>
To: Ludovic Courtès <ludo@gnu.org>
Cc: 29219@debbugs.gnu.org
Subject: Re: bug#29219: CUPS filter still can't access Ghostscript (gs)
Date: Thu, 09 Nov 2017 20:19:17 +0100
Ludovic Courtès <ludo@gnu.org> writes:

> Mekeor Melire <mekeor.melire@gmail.com> skribis:

>> But although I was expecting commit
>> 1728c411718e3b358c06561d6e80b47d7b331617¹ to fix this issue, when I try
>> the ljet4² driver, I still get this error in /var/log/cups/error_log³:

>>     sh: gs: command not found
>>     Process is dying with \"Unable to determine number of pages, page count: -1
>>     \", exit stat 3

> Just make sure to reconfigure from a recent-enough commit (run ‘guix
> --version’ as root to see which commit you’re using.)

Done. I'm running a recent-enough commit. (Namely
46dea1241c801af5aa65e0c7b4e84bb0aff11273.)

> If it turns out you’re already using CUPS with commit
> 1728c411718e3b358c06561d6e80b47d7b331617, could you reproduce the issue
> while running “strace -p PID -f -s 345 -o log”, where PID is the PID of
> cupsd as shown by ‘herd status cups’?

You can find the log here: <http://sprunge.us/UDOY>. These might be the
interesting lines:

    $ grep -E '[^a-zA-Z0-9]gs' log
    31377 execve("/gnu/store/…-bash-static-4.4.12/bin/sh", ["sh", "-c", "gs -dNODISPLAY -q -c '/pdffile (/var/spool/cups/tmp/foomatic-4ngnEr) (r) file def pdfdict begin pdffile pdfopen begin (PageCount: ) print pdfpagecount == flush currentdict pdfclose end end quit'"], 0x149e810 /* 33 vars */ <unfinished ...>
    31377 stat("/gnu/store/…-cups-server-bin/lib/cups/filter/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
    31377 stat("/gnu/store/…-cups-2.2.4/bin/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
    31377 stat("/gnu/store/…-cups-2.2.4/sbin/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
    31377 stat("/bin/gs", 0x7ffd7921b5c0)   = -1 ENOENT (No such file or directory)
    31377 stat("/usr/bin/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
    31377 write(2, "sh: gs: command not found\n", 26) = 26
    15154 <... read resumed> "sh: gs: command not found\n", 2047) = 26
    15154 write(4, "D [09/Nov/2017:20:06:50 +0100] [Job 13] sh: gs: command not found\n", 66) = 66

Thank you for your help! How could we continue debugging?

--
mekeor ~ EDD3 DFFA 76F6 11C0 145F 9A99 AC85 BAD8 A2F8 C868




Information forwarded to bug-guix@gnu.org:
bug#29219; Package guix. (Fri, 10 Nov 2017 12:23:01 GMT) (full text, mbox, link).


Message #14 received at 29219@debbugs.gnu.org (full text, mbox, reply):

From: ludo@gnu.org (Ludovic Courtès)
To: Mekeor Melire <mekeor.melire@gmail.com>
Cc: 29219@debbugs.gnu.org
Subject: Re: bug#29219: CUPS filter still can't access Ghostscript (gs)
Date: Fri, 10 Nov 2017 13:22:39 +0100
Hi Mekeor,

Mekeor Melire <mekeor.melire@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Mekeor Melire <mekeor.melire@gmail.com> skribis:
>
>>> But although I was expecting commit
>>> 1728c411718e3b358c06561d6e80b47d7b331617¹ to fix this issue, when I try
>>> the ljet4² driver, I still get this error in /var/log/cups/error_log³:
>
>>>     sh: gs: command not found
>>>     Process is dying with \"Unable to determine number of pages, page count: -1
>>>     \", exit stat 3
>
>> Just make sure to reconfigure from a recent-enough commit (run ‘guix
>> --version’ as root to see which commit you’re using.)
>
> Done. I'm running a recent-enough commit. (Namely
> 46dea1241c801af5aa65e0c7b4e84bb0aff11273.)
>
>> If it turns out you’re already using CUPS with commit
>> 1728c411718e3b358c06561d6e80b47d7b331617, could you reproduce the issue
>> while running “strace -p PID -f -s 345 -o log”, where PID is the PID of
>> cupsd as shown by ‘herd status cups’?
>
> You can find the log here: <http://sprunge.us/UDOY>. These might be the
> interesting lines:
>
>     $ grep -E '[^a-zA-Z0-9]gs' log
>     31377 execve("/gnu/store/…-bash-static-4.4.12/bin/sh", ["sh", "-c", "gs -dNODISPLAY -q -c '/pdffile (/var/spool/cups/tmp/foomatic-4ngnEr) (r) file def pdfdict begin pdffile pdfopen begin (PageCount: ) print pdfpagecount == flush currentdict pdfclose end end quit'"], 0x149e810 /* 33 vars */ <unfinished ...>
>     31377 stat("/gnu/store/…-cups-server-bin/lib/cups/filter/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
>     31377 stat("/gnu/store/…-cups-2.2.4/bin/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
>     31377 stat("/gnu/store/…-cups-2.2.4/sbin/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
>     31377 stat("/bin/gs", 0x7ffd7921b5c0)   = -1 ENOENT (No such file or directory)
>     31377 stat("/usr/bin/gs", 0x7ffd7921b5c0) = -1 ENOENT (No such file or directory)
>     31377 write(2, "sh: gs: command not found\n", 26) = 26
>     15154 <... read resumed> "sh: gs: command not found\n", 2047) = 26
>     15154 write(4, "D [09/Nov/2017:20:06:50 +0100] [Job 13] sh: gs: command not found\n", 66) = 66
>
> Thank you for your help! How could we continue debugging?

IIUC, process 31377 is started by cupsd itself.  Commit
1728c411718e3b358c06561d6e80b47d7b331617 wrapped the cups-filters
programs but not cupsd itself.  Perhaps we need to wrap cupsd similarly?
Could you grep the source of cups itself to see if it contains this ‘gs’
invocation?

In the meantime, can you try adding ghostcript to your system profile?
That should work around the problem.

Thanks,
Ludo’.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Wed Apr 16 04:45:50 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.