[comp.sys.apollo] ghostscript 2.0 on apollo

michel@es.ele.tue.nl (Michel Berkelaar) (09/19/90)

We recently obtained version 2.0 of ghostscript. On our hp9000/835 it compiled
perfectly and seems to work ok. But on our Apollo 3000 and 2500 workstations
I have not been able to make a working version.

Compiling with Apollo cc and -DBSD4_2 (yes, I know, but gs only knows about
4.2) did give me a linked gs, but it immediately crashes with a segmentation
violation.

A version compiled with gcc and -DBSD4_2 starts loading ghost.ps, but crashes
in the process.

So: Did anybody succeed in getting a working version of gs 2.0? What do I do
wrong? Any hints would be greatly appreciated.




--
-------------------------------------------------------------------------------
Michel Berkelaar                   | Email: michel@ele.tue.nl
Eindhoven University of Technology |
Dept. of Electrical Engineering    |
Design Automation Section          |
P.O. Box 513                       | Phone: ... - 31 - 40 - 473345
NL-5600 MB Eindhoven               | Fax:   ... - 31 - 40 - 448375
The Netherlands                    |
-------------------------------------------------------------------------------

oliveria@srvr1 (ROQUE DONIZETE DE OLIVEIRA) (09/20/90)

From article <MICHEL.90Sep19085039@eutes4.es.ele.tue.nl>, by michel@es.ele.tue.nl (Michel Berkelaar):
> 
> We recently obtained version 2.0 of ghostscript. On our hp9000/835 it compiled
> perfectly and seems to work ok. But on our Apollo 3000 and 2500 workstations
> I have not been able to make a working version.
> 

   These are the changes I made in order to get ghostscript (postscript
interpreter/previewer) to compile on the apollos running sr10.2 bsd4.3.
Supposedly some of these changes will not be needed in sr10.3.

------------------------------------------------------------------------
1) malloc_.h

replaced
#    ifdef BSD4_2
by
#    if defined(BSD4_2) || defined(apollo)
------------------------------------------------------------------------
2) cc-head.mak

replaced
GS_LIB_DEFAULT=`pwd`
by
GS_LIB_DEFAULT=/usr/caen/ghostscript/gs:/usr/caen/ghostscript/fonts:/usr/caen/ghostscript/hershey
      

replaced
CFLAGS=-O
by
# Add -A nansi  for apollos (very important).
CFLAGS=-O -A nansi
    
replaced
LDPLAT=-X
by
LDPLAT=


replaced
EXTRALIBS= -lX11
by
# Apollos need -L/usr/X11/lib -lX11
EXTRALIBS= -L/usr/X11/lib -lX11
------------------------------------------------------------------------
3) unixtail.mak
replaced
	$(CC) $(CFLAGS) $(LDPLAT) -o gs $(GSUNIX) -lX11 $(EXTRALIBS) -lm
by
	$(CC) $(CFLAGS) $(LDPLAT) -o gs $(GSUNIX) $(EXTRALIBS) -lm
------------------------------------------------------------------------
4) created a new unix-cc.mak by typing
	cat cc-head.mak ghost.mak gdevs.mak unixtail.mak > unix-cc.mak
------------------------------------------------------------------------
5) Read the file make.doc for installing instructions.
   Note that there is no "make install" option so you
have to copy the executable (gs) to the location you want.
------------------------------------------------------------------------
6) The fonts were installed (all it it needs is to untar 2 files) in
/usr/caen/ghostscript/fonts and /usr/caen/ghostscript/hershey
------------------------------------------------------------------------
7) the man page (man.doc) was modified to include more information
and examples.  Original man page kept on man.doc.orig .
------------------------------------------------------------------------

I found it to be reasonably fast on a dn4000. I guess you could
use -D_BUILTINS and -A cpu,3000  to speed it up even more.
It supports color postscript files, symbol (greek) font, postscript files
created by some dvi* converters, etc. The main drawback of ghostscript 2.0
is garbage collection is poor (a known/documented problem) in the sense 
that it may crash or give incorrect results if many postscript
files are viewed in the same session.
Another nice feature is a postscript to PPM converter. 
On the apollos it only runs under X11 (we are using Apollo's X11)
although there are drivers for other systems (PCs, suns, etc).
Before someone asks, it can be ftp'ed from the pub/gnu directory
at prep.ai.mit.edu . It is about 1.7 megs (compressed tar files).

                      Roque D. Oliveira
                      oliveria@caen.engin.umich.edu
                      09/19/1990

andrewn@syma.sussex.ac.uk (Andrew D Nimmo) (09/21/90)

From article <MICHEL.90Sep19085039@eutes4.es.ele.tue.nl>, by michel@es.ele.tue.nl (Michel Berkelaar):
> 
> We recently obtained version 2.0 of ghostscript. On our hp9000/835 it compiled
> perfectly and seems to work ok. But on our Apollo 3000 and 2500 workstations
> I have not been able to make a working version.

I've also had the same experience with gs 2.0 -- using cc v6.7m and gcc 1.37.1 under sr10.2.  
When I debugged using dde, (gs compiled without optimisation), I had to give up due to dde
not resolving routines properly.  I did try dbx, but I also had a limit on the amount of
time I could spend with it!

If I find time, I'll look closer.  Initial indications were to look at iname.c, line 65
I think, at the make_name macro.

Andrew

-- 
Andrew D. Nimmo, VLSI & Graphics Research Group, | JANET: andrewn@uk.ac.sussex.eaps
EAPS II, University of Sussex, Falmer,		 | INTERNET: andrewn%uk.ac.sussex.eaps@nsfnet-relay.ac.uk
BRIGHTON, East Sussex, BN1 9QT			 | BITNET: andrewn%uk.ac.sussex.eaps@uk.ac
TEL: +44 273 606755 x 2617			 | UUCP: ...mcsun!ukc!syma!andrewn or andrewn@syma.uucp