From: WZAP@rusvm1.rus.uni-stuttgart.de
Subject: gs 2.4.1: VMS and Laserjet
Organization: Comp.Center (RUS) U of Stuttgart, FRG
Distribution: gnu
Date: Thu, 3 Sep 1992 12:44:54 GMT

Dear netters,
a friend asked me to post the following problem when making ghostscript
2.1.4 under VMS.
The VMS-CC.MAK file was used. It is included below. Changes were done
for including HP-Laserjet in the list of available devices.
-----------------------------------------------------------------------
$ !
$ CDEF = ""
$ LDEF = ""
$ !
$ GS_INIT = "GS_INIT.PS"
$ GS_LIB_DEFAULT = F$ENVIRONMENT("DEFAULT")
$ IF P1 .NES. "" .AND. P1 .NES. "DEBUG" THEN GS_LIB_DEFAULT = P1
$ IF P2 .NES. "" .AND. P2 .NES. "DEBUG" THEN GS_LIB_DEFAULT = P2
$ !
$ IF P1 .NES. "DEBUG" .AND. P2 .NES. "DEBUG" THEN GOTO NODEBUG
$ CDEF = "/DEFINE=(""DEBUG"")/NOOPTIMIZE/DEBUG"
$ LDEF = "/DEBUG"
$ !
$ NODEBUG:
$ !
$ ! Give ourself a healthy search list for C include files
$ !
$ DEFINE C$INCLUDE 'F$ENVIRONMENT("DEFAULT"),DECW$INCLUDE,SYS$LIBRARY
$ DEFINE VAXC$INCLUDE C$INCLUDE
$ DEFINE SYS SYS$LIBRARY
$ !
$ !
$ ! Build the ANSI C to Kernighan & Ritchie filter
$ !
$ CC/NOLIST/OBJECT=ANSI2KNR.OBJ ANSI2KNR.C
$ LINK/NOMAP/EXE=ANSI2KNR.EXE ANSI2KNR,SYS$INPUT/OPT
SYS$SHARE:DECW$XLIBSHR/SHARE
$ DELETE ANSI2KNR.OBJ.*
$ !
$ ! Now define an ansi2knr symbol
$ !
$ ANSI2KNR = "$" + F$ENVIRONMENT("DEFAULT") + "ANSI2KNR.EXE"
$ !
$ !
$ ! Compile genarch.c and then run it to create the arch.h header file
$ !
$ CC/NOLIST/OBJECT=GENARCH.OBJ GENARCH.C
$ LINK/NOMAP/EXE=GENARCH.EXE GENARCH,SYS$INPUT/OPT
SYS$SHARE:VAXCRTL/SHARE
$ GENARCH = "$" + F$ENVIRONMENT("DEFAULT") + "GENARCH.EXE"
$ GENARCH ARCH.H
$ DELETE GENARCH.EXE.*,GENARCH.OBJ.*
$ PURGE ARCH.H
$ !
$ !
$ ! Create a minimal gconfig.h
$ !
$ CREATE GCONFIG.H
device_(gs_x11_device)
device_(gs_lj3_device)
$ !
$ ! Create an empty object library
$ !
$ LIBRARY/CREATE GS.OLB
$ !
$ !
$ ! Create a list of modules to compile and store in the object library
$ !
$ CREATE MODULES.LIS
GDEVMEM1
GDEVMEM2
GDEVDJET
GDEVMEM3
GP_VMS
GSCHAR
GSCHAR0
GSCOLOR
GSCOORD
GSDEVICE
GSDPS1
GSFILE
GSFONT
GSIM2OUT
GSIMAGE
GSLINE
GSMATRIX
GSMISC
GSPAINT
GSPATH
GSPATH2
GSSTATE
GSTDEV
GSTYPE1
GSUTIL
GXCACHE
GXCLIST
GXCOLOR
GXCPATH
GXDITHER
GXDRAW
GXFILL
GXHT
GXPATH
GXPATH2
GXSTROKE
IALLOC
IBNUM
IBSCAN
ICCFONT
IDEBUG
IDICT
IINIT
INAME
INTERP
ISAVE
ISCAN
IUTIL
SFILTER
SFILTER2
STREAM
ZARITH
ZARRAY
ZBSEQ
ZCHAR
ZCOLOR
ZCONTROL
ZDEVICE
ZDICT
ZDPS1
ZFILE
ZFILEIO
ZFILTER
ZFILTER2
ZFONT
ZFONT0
ZFONT1
ZFONT2
ZGENERIC
ZGSTATE
ZHT
ZMATH
ZMATRIX
ZMISC
ZPACKED
ZPAINT
ZPATH
ZPATH2
ZPROPS
ZRELBIT
ZSTACK
ZSTRING
ZTYPE
ZUPATH
ZVMEM
$ !
$ !
$ ! NOW COMPILE AWAY!
$ !
$ OPEN/READ MODULE_LIST MODULES.LIS
$ !
$ COMPILE_LOOP:
$ READ/END=END_COMPILE MODULE_LIST MODULE
$ ANSI2KNR 'MODULE'.C 'MODULE'.CC
$ CC'CDEF/NOLIST/OBJECT='MODULE'.OBJ 'MODULE'.CC
$ LIBRARY/INSERT GS.OLB 'MODULE'.OBJ
$ DELETE 'MODULE'.OBJ.*
$ IF CDEF .EQS. "" THEN DELETE 'MODULE'.CC.*
$ GOTO COMPILE_LOOP
$ !
$ END_COMPILE:
$ CLOSE MODULE_LIST
$ DELETE MODULES.LIS.*
$ !
$ !
$ ! Is the DECwindows environment about?  Must be installed in order to
$ ! build the executable programs gs.exe, gt.exe, and xlib.exe.
$ !
$ IF F$SEARCH("SYS$SHARE:DECW$XLIBSHR.EXE") .NES. "" THEN GOTO CHECK2
$ WRITE SYS$OUTPUT "DECwindows user environment not installed;"
$ WRITE SYS$OUTPUT "unable to build executable programs."
$ GOTO DONE
$ !
$ CHECK2:
$ IF F$TRNLNM("DECW$INCLUDE") .NES. "" THEN GOTO BUILD_EXES
$ WRITE SYS$OUTPUT "You must invoke @DECW$STARTUP before using this"
$ WRITE SYS$OUTPUT "command procedure to build the executable programs."
$ GOTO DONE
$ !
$ ! Build the executables
$ !
$ BUILD_EXES:
$ !
$ DEFINE X11 DECW$INCLUDE
$ !
$ ANSI2KNR GCONFIG.C GCONFIG.CC
$ LIBDEF = """GS_LIB_DEFAULT=""""" + ''GS_LIB_DEFAULT' + """"""""
$ INIDEF = """GS_INIT=""""" + ''GS_INIT' + """"""""
$ CC'CDEF/NOLIST/DEFINE=('LIBDEF','INIDEF')/OBJECT=GCONFIG.OBJ GCONFIG.CC
$ !
$ ANSI2KNR GDEVXINI.C GDEVXINI.CC
$ CC'CDEF/NOLIST/OBJECT=GDEVXINI.OBJ GDEVXINI.CC
$ !
$ ANSI2KNR GDEVX.C GDEVX.CC
$ CC'CDEF/NOLIST/OBJECT=GDEVX.OBJ GDEVX.CC
$ !
$ ANSI2KNR GSMAIN.C GSMAIN.CC
$ CC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.CC
$ !
$ ANSI2KNR UTRACE.C UTRACE.CC
$ CC'CDEF/NOLIST/OBJECT=UTRACE.OBJ UTRACE.CC
$ !
$ !
$ ! GSMAIN and UTRACE are tossed into the GT link so that when a
$ ! debugging configuration is built, the gs_log_error and gs_exit
$ ! routines will be defined.
$ !
$ ANSI2KNR GS.C GS.CC
$ CC'CDEF/NOLIST/OBJECT=GS.OBJ GS.CC
$ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,UTRACE,GDEVX,GDEVXINI,GCONFIG,-
  GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,-
  ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCONTROL,ZDEVICE,ZDPS1,-
  ZDICT,ZFILE,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,-
  ZGENERIC,ZGSTATE,ZHT,ZMATH,ZMATRIX,ZMISC,ZPACKED,ZPAINT,ZPATH,ZPATH2,-
  ZPROPS,ZRELBIT,ZSTACK,ZSTRING,ZTYPE,ZUPATH,ZVMEM),SYS$INPUT/OPT
SYS$SHARE:DECW$DWTLIBSHR/SHARE
$ !
$ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GSMAIN.OBJ.*,UTRACE.OBJ.*,GS.OBJ.*,-
         GCONFIG.OBJ.*
$ IF CDEF .EQS. "" THEN -
  DELETE GDEVX.CC.*,GDEVXINI.CC.*,GSMAIN.CC.*,UTRACE.CC.*,GS.CC.*,GCONFIG.CC.*
$ !
$ DELETE ANSI2KNR.EXE.*
$ !
$ DEASSIGN X11
$ !
$ DONE:
$ !
$ DEASSIGN C$INCLUDE
$ DEASSIGN VAXC$INCLUDE
$ DEASSIGN SYS
$ !
$ ! ALL DONE

-------------------------------------------------------------------------
NO problems were reported during the compilation procedure.
When typing GS -H the following errors occured:

VAX2> GS -H
Usage: gs [switches] [file1.ps file2.ps ...]
  or : gs [switches] [file1.ps ...] -- filen.ps arg1 arg2 ...
The latter passes arg1 ... to the program in filen.ps.
Available devices:
    x11
%SYSTEM-F-ACCVIO, access violation, reason mask=00,
virtual address=00000000, PC
=0004EDC4, PSL=0BC00000
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name     routine name                     line       rel PC    abs PC

                                                           0004EDC4  0004EDC4
                                                           0004BFE1  0004BFE1
GS              swproc                           1947      0000018E  00012E7E
GSMAIN          gs_main                          1580      000000C1  000139BD
GS              main                             1906      000000CA  00012CCA

-----------------------------------------------------------------------------
I have no knowledges of VMS. So the above problem may be too obvious for
an expert.

Any hints will be appreciated.
ThX in advance.
-- Stefan Dallwig (WZAP@rusvm1.rus.uni-stuttgart.de)

Newsgroups: gnu.ghostscript.bug