[gs-devel] gs on uClinux ARM producing blank output
Ray Johnston
Ray.Johnston at Artifex.com
Fri Sep 14 07:43:17 PDT 2007
James,
As far as options in the Makefile, unless you have a disk you will
want BAND_LIST_STORAGE=memory so that _if_ gs needs to band it
will use the internal memory clist handling rather than relying on
the /tmp cramfs. The internal memfile stuff automatically compresses
(with zlib) and uses an LRU cache when uncompressing so it uses
less RAM than the /tmp cramfs would.
As I said previously, COMPILE_INITS=1 works for me, but you obviously
have your gs finding the gs_init.ps and other init files or else
you wouldn't get the 'sign-on' message from gs that gets emitted
unless you say -q (or -dQUIET).
Just to see what's working, try:
gs -sDEVICE=bbox -o- -dNOPAUSE examples/tiger.eps
you should see some stdout such as:
GPL Ghostscript 8.60 (2007-08-01)
Copyright (C) 2007 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
%%BoundingBox: 17 177 565 753
%%HiResBoundingBox: 17.253492 177.202190 564.310108 752.488993
The -o- (or -o -) tells gs to output to stdout (equivalent to
-sOutputFile=- -dNOPAUSE -dBATCH).
I've attached the 'arch.h' that I used on the Intel XScale ARM in
case that helps you at all.
From here, I guess you need to do a DEBUG build (make debug) and
turn on some gs debugging switches (-Z.... -- see doc/Use.htm)
or use gdb and actually set breakpoints.
Good luck.
Regards,
Ray
------------------------------------------------------------------------
James Maki wrote:
> Ray,
>
> Gs does not emit any errors, as you can see from the shell fragment
> below. The choice of output device or input does not change anything;
> All devices do the same thing. If I feed in a 10 page pdf I get out 10
> blank pages. I can compile with -DDEBUG and give you whatever output you
> would like. The path for fonts, lib, and Resource is correct and gs can
> locate them. Is there something specific to ARM that maybe the problem?
>
>
>
> host# cat tiger.eps | gs -sDEVICE=tiffg3 -sOutputFile=file -
> GPL Ghostscript 8.60 (2007-09-01)
> Copyright (C) 2007 Artifex Software, Inc. All rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> host# ls -al
> drwxr-xr-x 2 1000 1000 1024 .
> drwxr-xr-x 5 1000 1000 1024 ..
> -rw-r--r-- 1 0 0 8972 file
> -rwxr-xr-x 1 1000 1000 78599 tiger.eps
>
>
> build# cat tiger.eps | gs -sDEVICE=tiffg3 -sOutputFile=file -
> GPL Ghostscript 8.60 (2007-09-01)
> Copyright (C) 2007 Artifex Software, Inc. All rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> build# ls -al
> total 1140
> drwxr-xr-x 2 jcm jcm 4096 2007-09-13 16:52 .
> drwxr-xr-x 22 jcm jcm 4096 2007-09-13 16:49 ..
> -rw-r--r-- 1 jcm jcm 313124 2007-09-13 16:52 file
> -rwxr-xr-x 1 jcm jcm 78599 2002-01-10 15:21 tiger.eps
>
> Sincerely,
> -James
>
> -----Original Message-----
> From: Ray Johnston [mailto:Ray.Johnston at Artifex.com]
> Sent: Thursday, September 13, 2007 1:57 PM
> To: James Maki
> Cc: gs-devel at ghostscript.com
> Subject: Re: [gs-devel] gs on uClinux ARM producing blank output
>
>
> James,
>
> Actually I have Ghostscript built and running on a gumstix embedded
> linux system (cross compiled from ubuntu linux on x86).
>
> You should capture the stdout and stderr from ghostscript to see if
> there are error messages being generated.
>
> Note that 'waterfal.ps' uses fonts, so possibly gs isn't finding the
> fonts. We usually try 'tiger.eps' first since it doesn't use any fonts.
>
> BTW, I _am_ using COMPILE_INITS=1 (with 8.60) and it works fine, so you
> may want to dig into the linking problems.
>
> I wouldn't bother opening a bug as Igor suggested since I would probably
> just close it as 'WORKSFORME' and we can't really support GPL users, but
> if you do have stdout or stderr and send it, I'll be glad to see if I
> can see what the problem is.
>
> Regards,
> Ray Johnston
> ------------------------------------------------------------------------
>
> James Maki wrote:
>
>> I have cross-compiled gs to run on uClinux. gs runs without producing
>> any error messages, but all pages of output to any DEVICE are blank. I
>>
>
>
>> am not using COMPILE_INITS=1 because of linking problems. I have my
>> fonts and libs in the correct dir, and gs can find them correctly.
>>
>> Running the following:
>>
>> cat waterfal.ps | gs -sDEVICE=tiffg3 -sOutputFile=file -
>>
>> on my build system I get a file which is 47680 bytes and displays
>> fine. On my target system I get a file which is 8972 bytes and is
>> blank. It does not matter which device I use the output is always
>>
> blank.
>
>>
>> I have ran genarch on my target and produced a correct arch.h. I also
>> tried many different options from the Makefile to see if they had
>> anything to do with the problem (FPU_TYPE, BAND_LIST_STORAGE,
>> SHARED_ZLIB, ...).
>>
>>
>
>
>
-------------- next part --------------
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 4
#define ARCH_ALIGN_PTR_MOD 4
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 8
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 2
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 4
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 0
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_CAN_SHIFT_FULL_LONG 1
#define ARCH_DIV_NEG_POS_TRUNCATES 1
More information about the gs-devel
mailing list