Ghostscript Dependencies for Development

Ghostscript/GhostPDL is fairly self contained, and has few "hard" dependencies other than a supported build system (autoconf/make on Unix and Visual Studio nmake on Windows), C compiler (gcc/clang, VC++) and the supporting development libraries - including libc.

It does have several optional depencies on Unix-like systems:

To include the x11 display devices: libX11/libXext/libXt (xorg-dev)

To automate finding and using non-standard fonts: libfontconfig (libfontconfig1-dev)

To have the default papersize customize by region: libpaper (libpaper-dev)

The ".so" target includes a very simplistic GTK+ based "viewer" (really, no better than the x11 devices, just using the GTK+ toolkit): libgtk3 (libgtk-3-dev)

Support the OpenPrinting opvp/oprp devices: iconv (built newer glibc versions)

Support Unicode passwords for PDF files etc: libidn (libidn11-dev)

cups output device: libcups2/libcupsimage2 (libcups2-dev/libcupsimage2-dev)

The Unix script should cope with these being missing, and build without support for the specific feature that library is required to support (the exception is the X11 libraries, where there are some issues detecting individual missing ones - either have all three, or none).

For full information when using the memento memory checker: libbacktrace and libdl

NOTE: if you primarily use a 64 bit Linux variant, and it is a Debian derivative, and you need to be able to build and test 32 bit libraries and executables:

dpkg --add-architecture i386
apt-get update

Then append ":i386" to the package name for "apt install". For example:

apt install xorg-dev

would become:

apt install xorg-dev:i386

(Disclaimer: multi-arch is fairly new, so the above may change, depending on the distro version you are using)

-- Chris Liddell - 2017-04-03


If you are building Ghostscript for macOS, you will need to install X11 manually if you want to generate output using one of the x11 drivers. X11 is no longer included as part of the standard macOS install. The open-source X11 driver can be found at Download the .dmg file (e.g. XQuartz-2.7.11.dmg) and double-click to open it. Then double-click on XQuartz.pkg to install X11. You must restart your Mac before continuing or the X11 drivers will not be available. After restart, will configure the X11 drivers by default.

If you encounter any errors, double-check that the DISPLAY environment variable is pointing to a valid X device:


should show something like:


This method works with the latest version of macOS Sierra (version 10.12.4).

-- Steve Phillips - 2017-04-04

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2017-04-04 - StevePhillips
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 2014 Artifex Software Inc