EPS conversion aborted

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks » 2015-01-06T05:21:59-07:00

Yes there was only one ghostscript version (9.15) installed on this server.

Code: Select all

# find / -name gs
/usr/bin/gs

User avatar
dlemstra
Posts: 1571
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra » 2015-01-06T22:25:59-07:00

Maybe there are more versions of libgs.so on your machine? This library will be probably be in another package.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks » 2015-01-07T00:46:09-07:00

dlemstra wrote:Maybe there are more versions of libgs.so on your machine? This library will be probably be in another package.
I'm afraid there is only one libgs.so:

Code: Select all

# find / -name libgs.so
/usr/lib64/libgs.so

User avatar
dlemstra
Posts: 1571
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra » 2015-01-07T00:49:46-07:00

Are there symlinks that have the version number? I have this on my Ubuntu machine:

Code: Select all

dirk@singlemalt:~$ locate libgs.so
/usr/lib/libgs.so
/usr/lib/libgs.so.9
/usr/lib/libgs.so.9.10
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks » 2015-01-07T01:05:08-07:00

We may have something here:

Code: Select all

[root@localhost ~]# gs -v
GPL Ghostscript 9.15 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc.  All rights reserved.

[root@localhost ~]# locate libgs.so
/usr/lib64/libgs.so
/usr/lib64/libgs.so.8 
/usr/lib64/libgs.so.8.70

[root@localhost ~]# rpm -qa | grep ghost
ghostscript-fonts-5.50-23.2.el6.noarch
ghostscript-devel-8.70-19.el6.x86_64
ghostscript-8.70-19.el6.x86_64
ghostscript claims to be 9.15, but it seems that the installed version is 8.70...

kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks » 2015-01-07T06:46:14-07:00

This was a step in the right direction, thank you!
There seems to be a problem in the ghostscript package in centos 6.6

After recompiling and installing ghostscript 9.15, and then recompiling the src.rpm for IM-6.9.0-3, the aborted process does not show up any more :)
(I had to recompile, as the provided RPMs don't install on centos : viewtopic.php?f=3&t=26839 )

The only thing that bothers me is that error during the configuration of IM :

Code: Select all

checking for Ghostscript... 
checking for Ghostscript version... 9.15
checking for gs alpha device... pngalpha
checking for gs color device... pnmraw
checking for gs CMYK device... pam
checking for gs mono device... pbmraw
checking for gs PDF writing device... pdfwrite
checking for gs PS writing device... ps2write
checking for gs EPS writing device... Unknown device: epswrite
Unrecoverable error: syntaxerror in --nostringval--
Operand stack:
    defaultdevice
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
    defaultdevice
nodevice
Do you know what that means ?

User avatar
magick
Site Admin
Posts: 11066
Joined: 2003-05-31T11:32:55-07:00

Re: EPS conversion aborted

Post by magick » 2015-01-07T08:35:50-07:00

The configure script queries Ghostscript is see if the epswrite device is supported. If its not found, it alerts you but its an optional device so it nots a problem.

kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks » 2015-01-07T08:58:42-07:00

Thanks magick for the information.

But I spoke too fast, after compiling GS (9.15) and IM (6.9.0-3) from source on a clean centos 6.6, the "aborted" GS comes again.
I'll have to double check this later again.

User avatar
dlemstra
Posts: 1571
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra » 2015-01-07T09:04:25-07:00

You should check with ldd if you are linking with the correct version of Ghostscript.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks » 2015-01-07T09:09:17-07:00

I thought that IM would invoke GS by a command-line in a sub-process, and not as a library, am I wrong ?

here are the 2 ldd:

Code: Select all

[root@localhost ~]# ldd /usr/bin/convert 
        linux-vdso.so.1 =>  (0x00007fff017e0000)
        libMagickCore-6.Q16.so.2 => /usr/lib/libMagickCore-6.Q16.so.2 (0x00007f3d34df0000)
        libMagickWand-6.Q16.so.2 => /usr/lib/libMagickWand-6.Q16.so.2 (0x00007f3d34aca000)
        liblcms2.so.2 => /usr/lib64/liblcms2.so.2 (0x00007f3d3487c000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f3d345df000)
        libfftw3.so.3 => /usr/lib64/libfftw3.so.3 (0x00007f3d342e0000)
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f3d340aa000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f3d33e98000)
        libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007f3d33c32000)
        liblzma.so.0 => /usr/lib64/liblzma.so.0 (0x00007f3d33a11000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f3d33800000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f3d335e9000)
        libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f3d333e0000)
        libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f3d331d8000)
        libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f3d32fbb000)                                                                                                                                                 
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f3d32c7e000)                                                                                                                                                 
        libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007f3d32a69000)                                                                                                                                               
        libm.so.6 => /lib64/libm.so.6 (0x00007f3d327e4000)                                                                                                                                                         
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3d325c7000)                                                                                                                                             
        libc.so.6 => /lib64/libc.so.6 (0x00007f3d32233000)                                                                                                                                                         
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3d3201c000)                                                                                                                                                 
        libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f3d31df4000)                                                                                                                                                 
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f3d31bef000)                                                                                                                                                       
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f3d319eb000)                                                                                                                                                   
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f3d317cd000)                                                                                                                                                 
        librt.so.1 => /lib64/librt.so.1 (0x00007f3d315c4000)                                                                                                                                                       
        /lib64/ld-linux-x86-64.so.2 (0x00007f3d352a6000)                                                                                                                                                           
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f3d313c1000)
[root@localhost ~]# ldd /usr/bin/gs
        linux-vdso.so.1 =>  (0x00007fff7afff000)
        libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007fd6781b5000)
        libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007fd677fad000)
        libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007fd677d90000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fd677b7e000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fd677841000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fd67763c000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fd6773b8000)
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fd677182000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd676f64000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fd676bd0000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fd6769cc000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fd6767ad000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd678424000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fd676510000)
        libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fd6762e8000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fd6760e4000)

User avatar
dlemstra
Posts: 1571
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra » 2015-01-07T09:41:59-07:00

Your first log has the following text '[ghostscript library]'. This means that it will use the library instead of the command-line. Do you see the following in your config.log?

Code: Select all

Ghostscript lib   --with-gslib=yes      yes
If you don't see that line you can call configure like this:

Code: Select all

./configure --with-gslib
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: EPS conversion aborted

Post by pipitas » 2015-01-07T14:10:55-07:00

kriks wrote:

Code: Select all

checking for Ghostscript... 
[....]
checking for gs PS writing device... ps2write
checking for gs EPS writing device... Unknown device: epswrite
[....]
Do you know what that means ?
While my earlier post in the current thread was out of context -- for this question (compiling current GS sources) it may be relevant...

Please check one more time.

User avatar
fmw42
Posts: 25588
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: EPS conversion aborted

Post by fmw42 » 2015-01-07T16:54:31-07:00

You might check your delegates.xml file to see what sDEVICE is being used for EPS. Mine says


<delegate decode="eps" encode="pdf" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i""/>

<delegate decode="eps" encode="ps" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ps2write" "-sOutputFile=%o" "-f%i""/>

Edit as needed.

kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks » 2015-01-08T02:00:38-07:00

fmw42 wrote:You might check your delegates.xml file to see what sDEVICE is being used for EPS.
In this case, it seems that it's the ps:cmyk delegates that is used :

Code: Select all

<delegate decode="ps:cmyk" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pam" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
dlemstra wrote:Your first log has the following text '[ghostscript library]'. This means that it will use the library instead of the command-line. Do you see the following in your config.log?
Yes, I saw it, and when I use it, the convert fails. (Aborted)

I made another try without gslib, so that gs is used as a command, and in this case it works!

Could there be a bug when using gslib?

Post Reply