Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

32-bit ghostscript, required for ImageWriter and other printers using CUPS

Is there any updated version of Ghostscript, required for ImageWriter and many other Printers?

Mojave reports the standard version is 32-bit only.

Posted on Oct 7, 2019 12:54 PM

Reply
47 replies

Oct 8, 2019 5:05 PM in response to VikingOSX

The complexity of this build is remarkable. But I did not read anything except the instructions, and look for some 64-bit references, and did not read or modify anything else.


If you can move around Terminal and type a few terminal commands, or as you suggested, use HomeBrew, the whole process is not overwhelming.


I expect that if I needed to modify it in some way I could probably slog in there, make the changes, and do a little debugging and get it working the way I wanted. But I do not want each and every ImageWriter user to have to do this.


What I would dearly love to find is a compiled installable version somewhere, for Users who can't run a MAKE to save their lives. Dr. Koch may have done this work already (see previous postings on this thread). Provided his version works and is 64-bit.

Oct 8, 2019 5:49 PM in response to John Galt

<<Grant, the gs I've been using resides at /usr/local/bin/gs on all my Macs.>>


I see now that is the change Made by Mathew Broughton's script, which I am reading through now. Since his suggested patch borked my computer-to-computer CUPS, I never used his script, relying instead on another suggested location.


Unencumbered by any knowledge of where these things ought to be placed, I copied faithfully another user's suggestion. But I agree

/use/local/bin is probably the right place for that stuff, so I will need to move a bunch of files over there.

Oct 8, 2019 7:41 PM in response to Grant Bennet-Alder

Grant Bennet-Alder wrote:

Dr. Koch may have done this work already (see previous postings on this thread). Provided his version works and is 64-bit.


I haven't tried it yet. I'm sure it will install just fine but I have no reason to expect he included the drivers we need. I'm reasonably certain they must be included in the build. Somewhere.


Installability itself isn't a problem.

Oct 8, 2019 8:01 PM in response to John Galt

John Galt wrote:

Grant Bennet-Alder wrote:

Dr. Koch may have done this work already (see previous postings on this thread). Provided his version works and is 64-bit.

I haven't tried it yet. I'm sure it will install just fine but I have no reason to expect he included the drivers we need.


So I tried it. As I expected it wiped out the ImageWriter's drivers.


Other than that, it's a nice gs installer package.


One less thing you have to do 🙃

Oct 9, 2019 8:40 AM in response to John Galt

IWhi has traditionally been inside Ghostscript. I have a listing of IWhi. That sections is surrounded with multiple levels of conditionals, as if it were meant to include or leave out.


I expect it was left inside Ghostscript because 'the wonky way the rasterized bits are sent' is specific to that printer, not general enough to transfer to other printers so it would "never be needed elsewhere".


That is probably good news. If Dr. Koch's Installer does not include it, it may just be a change in the Make procedure to include IWhi in the compile of ghostscript. And you may be able to "borrow" (or copy) his Installer.


If your ImageWriter printed out "IWhi could not be found" did it use the built-in ASCII characters (i.e., NOT bitmapped fonts that require multiple passes) when it printed that? That would ad weight to the conjecture that IWhi was just not included in that build.

Oct 9, 2019 9:02 AM in response to Grant Bennet-Alder

In my opinion, Matt Broughton's script to modify those PPD files is rather a hack, compared to the elegant parameterizations throughout CUPS. The entire CUPS system uses parameter from CUPS.conf to specify the directories where the CUPS component parts can be found. His script makes a quick and dirty patch, directly to the PPD file, referencing a specific directory structure. It is unlike anything else in any PPD or elsewhere in CUPS.


I would like to find a way to preserve the elegance of CUPS.Conf file references, rather than having to revert to an inelegant specific directory reference in the PPD files.


--------

I mentioned elsewhere that his suggestion (and I believe his script) deletes one line from the PPD. But deleting that line makes Sharing these Printers across a Network collapse. (I think this may be because the Sharing file-format between most Shared Printers is now PDF, so you cannot just delete that line without substituting another PDF converter).


The reason to delete was that the foomatic converter to PDF files was not as good as the one built onto CUPS.


I think I may have found a solution, sitting in the middle of Generic Printer PPD. These lines:

*% The generic Printer is a PDF capable Printer
*cupsFilter: "application/vnd.cups-pdf 0 -"

DO Indeed work if substituted for the line from the ImageWriter PPD:

*cupsFilter: application/vnd.cups-pdf 0 foomatic-rip

That substitution appears to invoke the CUPS version of PDF conversion, rather than the foomatic version. Once there is an explicit conversion to PDF, Networked CUPS works again.

Oct 9, 2019 12:06 PM in response to Grant Bennet-Alder

If your ImageWriter printed out "IWhi could not be found" did it use the built-in ASCII characters (i.e., NOT bitmapped fonts that require multiple passes) when it printed that?


Yes. It printed ASCII text from the IW's ROM. Not bitmapped.


That would ad weight to the conjecture that IWhi was just not included in that build.


Agreed.


... If Dr. Koch's Installer does not include it, it may just be a change in the Make procedure to include IWhi in the compile of ghostscript. And you may be able to "borrow" (or copy) his Installer.


Yes, but I don't think it's even a matter of copying his installer, since whatever it does omits the devices we need anyway.


Building gs from source code is easy enough from the command line. I just need to know how to compile gs with those devices. I think (or at least I would like to think) that I need to add some parameters to the make command, and / or alter the contents of the files it uses to build.


At this point there it's pretty clear to me iwhi and the others were intentionally omitted from gs, and that omission predates even gs version 8.71 we're using. Why I don't know, but you're probably on the right track suspecting some wonky way of doing it. Wonky or not it worked.


I suspect there is something in the ImageWriter.pkg file that added those drivers to the build—possibly by passing parameters to it. That suspicion leads me to believe whatever is that installer package could be added manually.


IWhi has traditionally been inside Ghostscript. I have a listing of IWhi. That sections is surrounded with multiple levels of conditionals, as if it were meant to include or leave out.


Can you explain what you mean by that? I know iwhi must reside inside of gs, the problem is getting it there 😕 What is a listing of IWhi, and what sections are you referring to?

Oct 9, 2019 5:17 PM in response to John Galt

I made an archeological dig on a specific junk pile and came up with my IWhi c paper source code listing from 2010.


Apple Dot Matrix printer/ ImageWriter driver (modified to also support the ImageWriter LQ) -- About 10 pages of C code and comments when printed out. Internal routines and common code for DMP, IWLO, IWHI, and IWLQ.


my listing is from a file:

Ghostscript-8.64/base/gdevadmp.c


in ghostscript 9.27, that file is not in the 'base' source-code directory, but several other gdev files are present. Looking back to what is in Artisoft's repository on Github, the oldest is 9.18, and gdevadmp is not in that one either. So at some point before 9.18, it was set aside. 9.18 repository has 64-bit versions compiled there.


I think someone will have to troll the LinuxFoundation printing web support site or contact Artisoft and find out where the gdevdmp.c code went. We don't need the latest features for ImageWriter (we have been using Ghostscript 8.71 forever) but we do need 64-bit to carry it into Mojave and beyond.

Oct 9, 2019 6:34 PM in response to Grant Bennet-Alder

I started at Linux Foundation web site and tried to find source for Ghostscript 8.71. I found an old source code repository. Source for Ghostscript 9.04, and gdevadmp.c is present in the base folder -- (circa August 2011).


base/gdevadmp.c not present in 9.05: it looks like at that point Artisoft is moving more strongly toward GhostPDL, built on top of Ghostscript. That may be the motivation for "streamlining".


A search shows notes about changes for 64-bit versions occurring in early 2011, so this may be the version that still supports ImageWriter (and older gdev's) AND 64-bit versions.

Oct 9, 2019 8:21 PM in response to Grant Bennet-Alder

I am trying and failing to coax that source code out of its GitHub repository. I know very little about GitHub. I can inspect the code, but can not manage to get it to send it to me. The list of releases is here:


http://git.ghostscript.com/?p=ghostpdl.git;a=tags


scroll down and there is a

Ghostscript-9.04


... line item. Some of the buttons take you to the directory and thence to the files, which can be individually displayed.

Oct 14, 2019 8:31 AM in response to Grant Bennet-Alder

After more digging, the situation looks MUCH more hopeful.


at version 9.05, the log shows that gdevadmp (containing iwhi and iwlo and iwlq) was not removed, it was MOVED to the 'devices' folder.

The records show it survived in 'devices' up to and including version 9.20.


Dr Koch has a pre-built Macintosh installer for 9.20 sitting on his site, referenced above.


At version 9.21, it looks like gdevadmp was removed in a single operation targeting just that file and its supporting files, not a whole batch of things.


If Dr Koch's installer does not do the trick, the files for Ghostscript 9.20 are sitting in a MUCH more recent repository, and look like they could be complied and built in a very straightforward way.

Oct 14, 2019 10:49 AM in response to John Galt

John Galt wrote:

Try it for yourself: from wherever it resides on your Mac, run gs -h

My older gs 8.71 (the 32-bit one that worked until Cat) returns a total of 323 "available devices" including iwhi, iwlo, and• iwlq
• The new gs 9.27 returns 335 "available devices" but the three we need are absent. That's an obvious show-stopper.

I have an old VM with 10.7 and Xcode 5.1 installed. I downloaded and built the old gs 8.71. I had to make a small hack to get it to compile. I don’t know what they were doing with that (comment out lines 45 and 46). But it now it builds and is 64-bit. It seems to run on Mojave when I just copy over the gs executable. It seems to have the Imagewriter drivers. It would be better to build on the VM and then do a full “make install” on Catalina. I have no way to test any of this. Contact me and I’ll send you the installable directory.

Oct 16, 2019 11:22 AM in response to etresoft

etresoft wrote:

I have an old VM with 10.7 and Xcode 5.1 installed. I downloaded and built the old gs 8.71. I had to make a small hack to get it to compile. I don’t know what they were doing with that (comment out lines 45 and 46). But it now it builds and is 64-bit. It seems to run on Mojave when I just copy over the gs executable. It seems to have the Imagewriter drivers.


Quick update: I installed your gs 8.71 build on both High Sierra and Mojave systems, and I'm happy to report it works! Which is to say the ImageWriter drivers are included, I can print the way I always have on those various systems, and nothing appears to have been broken. My only other (non-Ghostscript related) /usr/local/bin/ files that might have been affected don't appear to have been affected.


I don't know of any better way to inspect its architecture other than the file command, results below:


Prior to installing it (the "old" gs)


iMac4:~ john$ file /usr/local/bin/gs 
/usr/local/bin/gs: Mach-O universal binary with 2 architectures: [i386:Mach-O executable i386] [ppc]
/usr/local/bin/gs (for architecture i386):	Mach-O executable i386
/usr/local/bin/gs (for architecture ppc):	Mach-O executable ppc
iMac4:~ john$ 


After installing it (the "new" gs):


iMac4:~ john$ file /usr/local/bin/gs 
/usr/local/bin/gs: Mach-O 64-bit executable x86_64
iMac4:~ john$ 


As I wrote I don't know any other way to determine its 64-bit compliance, except for System Information. It does show the "old" gs, but its entry indicates its "last used" date was a few days ago, so that's not a surprise.


It's still version 8.71 which I'm sure you're aware of, but I want that to be clear in the highly unlikely event anyone else is interested.


When making changes like this I try to use my systems for a while in the usual manner before drawing any conclusions, but for now am I correct in assuming that "Mach-O 64-bit" architecture means Catalina ought to load it? Of course it's easy enough for me to try it myself, which I'll get around to doing over the next few days. I just wanted to give you this quick update and say thanks!

32-bit ghostscript, required for ImageWriter and other printers using CUPS

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.