When I emerge the ghostscript-afpl (version 8.15) or ghostscript-gnu (8.16) on an amd64 machine and try either pdf2ps or gs on a PDF file (I have tried 3 different ones) I always get the error described bellow. On my other computer having x86 gentoo installed the same versions of the software work well. The problem does not occur for esp-ghostscript (version 7.07.1-r8). The problem is not affected by CFLAGS - setting them to "-O2" only does not change the result. Reproducible: Always Steps to Reproduce: 1. emerge the described packages on an amd64 machine 2. run pdf2ps some_pdf_file.pdf 3. Actual Results: Error: /rangecheck in --show-- Operand stack: --dict:7/7(L)-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- Dictionary stack: --dict:1123/1686(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:104/127(ro)(G)-- --dict:238/347(ro)(G)-- --dict:20/24(L)-- --dict:4/6(L)-- --dict:27/32(L)-- Current allocation mode is local GPL Ghostscript 8.15: Unrecoverable error, exit code 1 Expected Results: conversion of the submitted file to postscript. Portage 2.0.51.22-r3 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r0, 2.6.13-gentoo-r3 x86_64) ================================================================= System uname: 2.6.13-gentoo-r3 x86_64 Dual Core AMD Opteron(tm) Processor 270 Gentoo Base System version 1.6.12 ccache version 2.3 [enabled] dev-lang/python: 2.3.5, 2.4.2 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 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="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -march=k8 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=k8 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.belnet. be/mirror/rsync.gentoo.org/gentoo/ http://ftp.du.se/pub/os/gentoo http://gentoo.mirror.solnet.ch" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/opt/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="amd64 X alsa apache2 avi berkdb bitmap-fonts cdr crypt cups dvd eds emacs emboss encode f77 foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 imagemagick imlib ipv6 java jpeg junit libwww lzw lzw-tiff matroska mp3 mpeg ncurses nls nomalloccheck opengl pam pdflib perl png python qt quicktime readline samba sdl spell ssl svg t1lib tcltk tcpd tiff truetype-fonts type1-fonts udev un icode usb userlocales xml xml2 xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
I only get that on one pdf, that evince claims has invalid utf-8, and that ghostscript claims is broken: **** Warning: An error occurred while reading an XREF table. **** The file has been damaged. This may have been caused **** by a problem while converting or transfering the file. **** Ghostscript will attempt to recover the data. **** Warning: There are objects with matching object and generation **** numbers. The accuracy of the resulting image is unknown. It also doesn't crash, it just exits. I so far don't see any problems except for evince handling a broken (or new maybe?) pdf better than ghostscript.
Created attachment 71945 [details] a pdf file that crashes I submit a document that causes the crash for me. As I said before, it works without problem on my x86 machine.
Can you please tell this the UPSTREAM ghosstscript developers? I think it is a problem with the source code, not with the ebuild.