Bug 708158 - gs generates invalid PDF files on armel
Summary: gs generates invalid PDF files on armel
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 10.04.0
Hardware: PC Linux
: P2 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-24 22:28 UTC by Steve Robbins
Modified: 2024-11-28 09:15 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
output generated on ARM (3.68 KB, application/pdf)
2024-11-24 22:28 UTC, Steve Robbins
Details
Input EPS file (1.73 KB, image/x-eps)
2024-11-24 22:29 UTC, Steve Robbins
Details
Output generated on x86 (3.64 KB, application/pdf)
2024-11-24 22:29 UTC, Steve Robbins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Robbins 2024-11-24 22:28:51 UTC
Created attachment 26235 [details]
output generated on ARM

This is a bug report from a Debian User.
Original report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085120

We noticed that package asymptote fails to build on armel [1]. It fails
at a point, when the compiled asy binary is called to generate the
documentation. The asy binary calls gs to generate a pdf file out of
an eps file like this:

gs -q -dNOPAUSE -dBATCH -P -dSAFER -dALLOWPSTRANSPARENCY -sDEVICE=pdfwrite \
-dEPSCrop -dSubsetFonts=true -dEmbedAllFonts=true -dMaxSubsetPct=100 \
-dEncodeColorImages=false -dEncodeGrayImages=false -dCompatibilityLevel=1.5 \
-dTransferFunctionInfo=/Apply -dAutoRotatePages=/None -g612x792 \
-dDEVICEWIDTHPOINTS=100 -dDEVICEHEIGHTPOINTS=100 -sOutputFile=shadedtiling_0.pdf \
-c .setsafe -f shadedtiling_0.eps

The resulting pdf file can't be processed by pdtotext:

hille@rasppi2:~/devel/misc/asymptote-2.92+ds_armel $ pdftotext -layout -nopgbrk shadedtiling_0.pdf
Syntax Error: ExtGState 'R7' is unknown
Syntax Error: ExtGState 'R16' is unknown
Syntax Warning: Bad color space 'R9'
Syntax Error (510): Bad color space (fill)

pdflatex fails to include the pdf file into a document.

[1 <./shadedtiling_0.pdf
!pdfTeX error: pdflatex (file ./shadedtiling_0.pdf): PDF inclusion: reference to invalid object (is the included pdf broken?)
 ==> Fatal error occurred, no output PDF file produced!
  _shipout(prefix,f,currentpatterns,format,wait,view,t);
          ^

For now I see the phenomenon only on armel.
Comment 1 Steve Robbins 2024-11-24 22:29:20 UTC
Created attachment 26236 [details]
Input EPS file
Comment 2 Steve Robbins 2024-11-24 22:29:41 UTC
Created attachment 26237 [details]
Output generated on x86
Comment 3 Ken Sharp 2024-11-25 08:15:40 UTC
Most probably fixed by commit c174527d944f8c2a495ad009bf2383a0d48d33e1 though there are at least two other commits relevant to ARM 32-bit builds as well.

Please try current HEAD of Git and let us know if that does not resolve the problem.
Comment 4 Steve Robbins 2024-11-28 03:36:29 UTC
(In reply to Ken Sharp from comment #3)
> Most probably fixed by commit c174527d944f8c2a495ad009bf2383a0d48d33e1
> though there are at least two other commits relevant to ARM 32-bit builds as
> well.
> 
> Please try current HEAD of Git and let us know if that does not resolve the
> problem.

Current HEAD is reported to solve the problem.  More info: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085120#32
Comment 5 Ken Sharp 2024-11-28 09:15:35 UTC
(In reply to Steve Robbins from comment #4)

> > Please try current HEAD of Git and let us know if that does not resolve the
> > problem.
> 
> Current HEAD is reported to solve the problem.  More info:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085120#32

Thanks for checking!