Cross Compile Cups Ghostscript gstoraster Embedded Print

The object of this is to be able to print labels on a DYMO LabelWriter 450 from an embedded system.

I put this together as a lot of the docs and info around it are, at best, confusing / outdated / wrong, or all three.

I am showing it as chunks of a custom system's Makefile as it will probably be what you are trying to do and hopefully make it clearer too.

CUPS
CUPS by default will compile genstrings and mantohtml using the cross compiler, then try and run them locally as part of the rest of the build process, hence failing. The easiest solution is to ignore these bits by just building the rest of cups without them, forgetting localisations and manual crap.

(If you want to do it the hard way, compile it with local compiler. Copy genstrings and mantohtml out. make distclean, start again with cross compiler. When it errors copy the file back in it errors on , make again, then it will stick on next one, copy that back in too, make again and it should complete. Or something like that. I wouldn't bother though.)

Gotchas;


 * Note libdir needs specifying otherwise it uses /lib64 for some reason.
 * Note it uses DSTROOT not DESTDIR.
 * Note it selectively ignores LDFLAGS so you need to put path on the --with-optim= parameter to get it through. (for ld linker to libz, -lz)

This (below) creates the needed bits without requiring genstrings or mantohtml, note you will see a genstrings error but it won't cause a problem as you are doing each bit separately.

This is as minimal as I think you can get it.

DYMO LabelWriter 450 PPD Driver
This builds the ppd (driver) and the filters for cups.


 * Note ac_cv_path_cupsc= breaks it automatically finding the wrong paths by using local cups-config, allowing overriding with cups_datadir and cups_serverbindir

Ghostscript genarch

 * 1) this will crap out, but ok, then copy genarch binary to eventual target machine and run it to generate an arch-xxx.h which you need back for making ghostscript proper
 * 2) run "genarch arch-myarch.h" on target