[gs-devel] More on the merger of ESP and GPL GhostScript

Till Kamppeter till.kamppeter at gmail.com
Tue Apr 24 16:23:10 PDT 2007


Hi,

now I have tried to build GPL GhostScript with the legacy/third-part 
drivers coming with ESP GhostScript (addons/ and pstoraster/ 
directories). In GPL GhostScript I will put this into the contrib/ 
subdirectory (with the CUPS raster device in contrib/cups/).

I get most drivers built if I apply

perl -p -i -e 
's:(gs_(malloc|free|exit|to_exit)\s*\()(?!\s*\)):$1pdev->memory, :' *.c 
*/*.c */*/*.c

to the directories to reflect the changes of the GhostScript API in 
terms of needing to supply a memory_t pointer to the gs_alloc, gs_free, 
and gs_to_exit functions.

For some drivers I had to manually change the variable name pdev to the 
actual name manually afterwards.

For the "cups" device I needed to add "-lcups -lcupsimage" to XLDFLAGS 
(should be made automatic via ./configure) and " -Dgs_stderr=stderr" to 
the end of the GCFLAGS line in the Makefile (there should be a better 
solution, too).

I got stuck on the following devices (all the rest I succeeded to 
compile into GPL GS):

- dj505j, ljet4pjl, lj4dithp, picty180: They require patches on existing 
gdev*.c files in src/ and therefore cannot be implemented in the 
contrib/ subdirectory. I will post the patches later here on the list.

- pcl3, hpdj*: This driver ("pcl3" on the OpenPrinting site) for older 
HP inkjets and some non-HP PCL3 inkjets seems to break on some API
changes between GS 8.15 and 8.57. Output on compilation:
-------------------------------------------------------------------------
./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_set_page_layout’:
./contrib/pcl3/eprn/gdeveprn.c:665: warning: suggest parentheses around 
&& within ||
./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_init_device’:
./contrib/pcl3/eprn/gdeveprn.c:878: error: ‘gx_device_procs’ has no 
member named ‘free_object’
./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_open_device’:
./contrib/pcl3/eprn/gdeveprn.c:1028: error: ‘gx_device_procs’ has no 
member named ‘free_object’
./contrib/pcl3/eprn/gdeveprn.c:1041: error: ‘gx_device_procs’ has no 
member named ‘free_object’
./contrib/pcl3/eprn/gdeveprn.c:1044: error: ‘gx_device_procs’ has no 
member named ‘free_object’
./contrib/pcl3/eprn/gdeveprn.c:1051: error: ‘gx_device_procs’ has no 
member named ‘alloc_byte_array’
./contrib/pcl3/eprn/gdeveprn.c:1054: error: ‘gx_device_procs’ has no 
member named ‘alloc_byte_array’
./contrib/pcl3/eprn/gdeveprn.c:1057: error: ‘gx_device_procs’ has no 
member named ‘free_object’
./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_close_device’:
./contrib/pcl3/eprn/gdeveprn.c:1087: error: ‘gx_device_procs’ has no 
member named ‘free_object’
./contrib/pcl3/eprn/gdeveprn.c:1092: error: ‘gx_device_procs’ has no 
member named ‘free_object’
./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_forget_defaultmatrix’:
./contrib/pcl3/eprn/gdeveprn.c:1116: warning: implicit declaration of 
function ‘gs_main_instance_default’
./contrib/pcl3/eprn/gdeveprn.c:1116: error: invalid type argument of ‘->’
./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_output_page’:
./contrib/pcl3/eprn/gdeveprn.c:1172: error: ‘gx_device_procs’ has no 
member named ‘free_object’
-------------------------------------------------------------------------

- lx5000: It needs the function 'gs_memory_default()' which seems to be 
removed in the current API:
-------------------------------------------------------------------------
./contrib/gdevlx50.c:1066: warning: no previous prototype for 
‘getColourBufs’
./contrib/gdevlx50.c: In function ‘getColourBufs’:
./contrib/gdevlx50.c:1122: error: ‘gs_memory_default’ undeclared (first 
use in this function)
./contrib/gdevlx50.c:1122: error: (Each undeclared identifier is 
reported only once
./contrib/gdevlx50.c:1122: error: for each function it appears in.)
make: *** [obj/gdevlx50.o] Error 1
-------------------------------------------------------------------------

- bjc880j, lips2p, lips4, lips4v: Conflict of 'gs_lips3_device' 
definition in contrib/lips4/gdevl4r.c and src/gdevlbp8.c, in ESP GS all 
code needing 'gs_lips3_device' is commented out in src/gdevlbp8.c

I am grateful for any help on these issues. It is very important for the 
distributions that no driver gets lost, as otherwise users will complain 
about non-working printers.

    Till



More information about the gs-devel mailing list