ghostscript fails on some EPS files

Bug #1449875 reported by Mads Martin Jørgensen
66
This bug affects 14 people
Affects Status Importance Assigned to Milestone
ghostscript (Ubuntu)
Fix Released
Undecided
Unassigned
texlive-lang (Ubuntu)
Confirmed
High
Unassigned

Bug Description

On Ubuntu 15.04, running in the cloud, I issue to following command to find the Bounding Box on the attached EPS. When I download the ghostscript binary from ghostscript.com or try the same on my FreeBSD server, it works just fine. Here's the command to reproduce:

$ gs -q -sDEVICE=bbox -dNOPAUSE -dBATCH -dSAFER -dEPSCrop -r300 broken-on-ubuntu-1504.eps

The expected output:
%%BoundingBox: 87 81 1515 1510
%%HiResBoundingBox: 87.840941 81.600003 1514.790058 1509.385370

The output on Ubuntu 15.04:
Error: /undefinedresource in resourcestatus
Operand stack:
   false ct_StyleDicts --dict:0/4(L)-- Adobe-Japan1 --dict:0/4(L)-- Serif HeiseiMin-W3-83pv-RKSJ-H Font HeiseiMin-W3 CIDFont
Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1967 1 3 %oparray_pop 1967 1 3 %oparray_pop 1966 1 3 %oparray_pop --nostringval-- 1950 1 3 %oparray_pop 1836 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- 1915 10 9 %oparray_pop
Dictionary stack:
   --dict:1183/1684(ro)(G)-- --dict:0/20(G)-- --dict:87/200(L)-- --dict:57/75(L)-- --dict:2/10(L)-- --dict:39/70(L)-- --dict:0/4(L)-- --dict:0/4(L)-- --dict:20/27(ro)(G)-- --dict:20/26(ro)(G)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.15: Unrecoverable error, exit code 1

Revision history for this message
Mads Martin Jørgensen (mmj-mmj) wrote :
Revision history for this message
Karoline Busse (kikidergecko) wrote :

I have the same problem with opening eps files that were created with Adobe Illustrator. It seems like the Japanese Font "HeiseiMin-W3" (part of the Adobe-Japan1 font bundle) is missing on the system. To work around this error, I installed texlive-full. Afterwards it works.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ghostscript (Ubuntu):
status: New → Confirmed
Revision history for this message
David Abergel (davelargeuk) wrote :

I found that it was sufficient to install only the texlive-lang-cjk package, rather than the whole of texlive.

Revision history for this message
Markus W (z-mw) wrote :

Confirming that installing `texlive-lang-cjk` fixes the error when importing an Illustrator EPS into Inkscape.

Revision history for this message
Leon (leonbo) wrote :

Thanks! This fixed the issue:

sudo apt-get install texlive-lang-cjk --no-install-recommends

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.16~dfsg~0-0ubuntu2

---------------
ghostscript (9.16~dfsg~0-0ubuntu2) wily; urgency=medium

  * debian/rules: Recommend texlive-lang-cjk as some files make
    Ghostscript fail (LP: #1449875).

 -- Till Kamppeter <email address hidden> Fri, 18 Sep 2015 16:35:09 -0300

Changed in ghostscript (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Fred (eldmannen+launchpad) wrote :

This fix brings in 40 new packages that previously was not installed.

Is this a good solution?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

To the maintainer of texlive-lang:

Can the Recommends: of texlive-lang-cjk be demoted to Suggests:? Ghostscript only needs texlive-lang-cjk and nothing more for being able to render the attached file.

Alternatively, can the binary package texlive-lang-cjk be split into two packages, texlive-lang-cjk-gs containing all the files of the former texlive-lang-cjk and texlive-lang-cjk depending on texlive-lang-cjk-gs and recommending what texlive-lang-cjk recommended before. Then we let Ghostscript depend on texlive-lang-cjk-gs making only the files of this package getting onto the system and the rest of the world uses texlive-lang-cjk pulling in all the 40 extra packages.

WDYT?

Changed in texlive-lang (Ubuntu):
importance: Undecided → High
Revision history for this message
Norbert Preining (preining) wrote : Re: [Bug 1449875] Re: ghostscript fails on some EPS files

On Sat, 19 Sep 2015, Till Kamppeter wrote:
> Can the Recommends: of texlive-lang-cjk be demoted to Suggests:?
> Ghostscript only needs texlive-lang-cjk and nothing more for being able
> to render the attached file.

Can you please be a bit more specific why this is a problem?
And *what* recommends you are talking about?
 texlive-lang-japanese?
 -chinese?
 -korean?
 ruby?
 latex-cjk-all?

> Alternatively, can the binary package texlive-lang-cjk be split into two
> packages, texlive-lang-cjk-gs containing all the files of the former
> texlive-lang-cjk and texlive-lang-cjk depending on texlive-lang-cjk-gs
> and recommending what texlive-lang-cjk recommended before. Then we let
> Ghostscript depend on texlive-lang-cjk-gs making only the files of this
> package getting onto the system and the rest of the world uses texlive-
> lang-cjk pulling in all the 40 extra packages.

You could be more specific *what* the problem is ... what files
do gs need from which package. That would help.

Norbert

------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

What is happening here is the following. With a standard Ubuntu Desktop installation Ghostscript is not able to render the file attached to this bug report. If one installs only the texlive-lang-cjk and nothing more (therefore "--no-install-recommends"), Ghostscript remders the attached file correctly.

This leads to the conclusion that adding the files contained in texlive-lang-cjk to the system fixes Ghostscript's problem to render the attached file.

Now a new problem occurs: If a package is installed, the system does not only install the requested package and its dependencies, but also all recommended packages. In our case we let Ghostscript recommend texlive-lang-cjk and so the system installs texlive-lang-cjk but also the packages which texlive-lang-cjk recommends, extra 40 unnecessary packages which take several 100 MB of space.

To not blow up the standard installation with unneeded stuff, I want to have texlive-lang-cjk added to the system, but nothing more.

Revision history for this message
Norbert Preining (preining) wrote :

On Sat, 19 Sep 2015, Till Kamppeter wrote:
> What is happening here is the following. With a standard Ubuntu Desktop
> installation Ghostscript is not able to render the file attached to this
> bug report. If one installs only the texlive-lang-cjk and nothing more
> (therefore "--no-install-recommends"), Ghostscript remders the attached
> file correctly.
>
> This leads to the conclusion that adding the files contained in texlive-
> lang-cjk to the system fixes Ghostscript's problem to render the
> attached file.

But which *added* file creates the problem? I am slightly
surprised about this, and can only possible blame it on
latex-cjk as the other packages do not do anything related to
ghostscript and do not add fonts to the general search path.

Can you please check what file is read by gs that creates the
problem?

Furthermore, *why* do you want gs recommends texlive-lang-cjk?
What do you need as gs from it?

Norbert

------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The problem of the added files is that these added files, 40 recommended packages, several 100 MB of unneeded data, make the standard installation too big.

texlive-lang-cjk seems to contain font information needed by the attached file to be correctly rendered by Ghostscript. At least installing this package as described in comment #6 solves the rendering problem. I cannot explain why, this is simply an observation.

Revision history for this message
Norbert Preining (preining) wrote :

On Sat, 19 Sep 2015, Till Kamppeter wrote:
> The problem of the added files is that these added files, 40 recommended
> packages, several 100 MB of unneeded data, make the standard
> installation too big.

Sorry, could you please try at least to stay on topic.
The bug is about an eps file that with the installation of
a package stopped being rendered.

This is completely independent from your wishlist about what
packages are recommended and what not.

Can we please separate actual problems (EPS not rendered) from
your packaging problems.

As Ubuntu you are free to change package relations at will.
I as Debian/TeX Live maintainer am interested in fixing a problem
where the installation of a package changes the behaviour of gs.

Norbert

------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------

Revision history for this message
tista (tista) wrote :

Dear developers,

Please rollback this change... This affects Gimp, Evince, Gnome-documents, Gnome-Sushi as well (libgs9-common depends). Actually on my Wily Gnome, needs 783MB additional disk space would be used.

Regards.

Revision history for this message
Doug McMahon (mc3man) wrote :

You should just set texlive-lang-cjk as an *actual* Suggest: for ghostscript, not a Recommend:
Why? -
Well the Ubuntu image will not contain that package nor any texlive packages so the bug will still be present to the relatively few affected.
For them to fix they'd need to install texlive-lang-cjk manually anyway. (here texlive-lang-cjk is not a *listed* Recommend: of ghostscript or libgs9 or libgs9-common

The state or plight of users running an existing 15.10 dev install is irrelevant for the most part.

Revision history for this message
Doug McMahon (mc3man) wrote :

I will amend the above -
On a fresh install texlive-lang-cjk does show as a recommend of libgs9-common. Still would need to be installed by the user so still seems making it a suggest would be better, what's the difference other than forcing 800+MB of unneeded packages on most users when it's a recommend.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have demoted texlive-lang-cjk from Recommends: to Suggests: in libgs9-common now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in texlive-lang (Ubuntu):
status: New → Confirmed
Revision history for this message
Bane (oddid) wrote :

On my system (Kubuntu 15.4, latest updates 2015-11-02) only fonts-ipaexfont-mincho was necessary to process these files. texlive-lang-cjk depends on this package.
Could somebody check as well? Maybe the footprint of this fix can be further narrowed.

Revision history for this message
shaneonabike (shanebill) wrote :

I can confirm that installing textlive-lang-cjk actually resolved this issue. Can we resolve this by making whichever packages a requirement because having this work seemless is fairly important for designers and it's a simple fix (after you scower the internet for ages to find this bug :/)

Revision history for this message
John C. (johnbendie) wrote :

> Could somebody check as well? Maybe the footprint of this fix can be further narrowed.

@oddid I can confirm installing only `fonts-ipaexfont-mincho` fixes the problem and reduces the footprint needed to fix this issue. Thanks!

Revision history for this message
Gabriel (gnuetzi) wrote :

sudo apt-get install fonts-ipaexfont-mincho

fixed the issue under 15.04

Revision history for this message
Gabriel (gnuetzi) wrote :

I have a vanillar texlive installed by install-tl.sh

Revision history for this message
pozitron (lisakov57) wrote :

Run into the problem after updating to Ubuntu 16.04. Installing texlive-lang-cjk and reinstalling texlive-full didn't help me. I can view some eps, but can't view eps which has been created (even on the other machine) via python matplotlib with rc("text", usetex=True)

Python shows this plot via plt.show() fine, saving to pdf also works.

Revision history for this message
pozitron (lisakov57) wrote :

I still cannot view certain eps files on Ubuntu 16.04 with XFCE. I tried all of the proposed in this thread solutions but none of them works. What else can I try?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.