Programming Library Prerequisites

The Netpbm package as a whole uses over half a dozen external libraries, but you don't necessarily need to install them all in order to build Netpbm. Each library is used by a few Netpbm programs, and if you don't have the library, the Netpbm build will automatically skip building those parts. If the library is obscure, so is the part that requires it and you may not care to build it.

For most of these libraries, configure asks you whether you have it or not, and offers a default based on its attempt to determine for itself whether you have the library.

The following sections describe the prerequired libraries, how to get them, and what they're good for.

libjpeg

This is code that knows the JFIF format (commonly called JPEG). It is required to build the following Netpbm programs:

  • jpegtopnm
  • pamtotiff
  • pnmtojpeg
  • pnmtotiff
  • pnmtotiffcmyk
  • tifftopnm

    The TIFF converters need the JFIF library because there is a subformat of TIFF that uses JPEG compression. But it is possible to have a TIFF library that cannot handle that subformat and thus does not use the JFIF library, and in that case the Netpbm TIFF converter programs don't need it either. If you have such a TIFF library, you must manually modify your Makefile.config to state that fact. configure doesn't take care of that.

    ppmtompeg needs the JFIF library in order to create MPEGs from JPEGs (without the loss of quality that comes with converting from JPEG to PPM first). If you don't have the JFIF library, the build still builds ppmtompeg, but without that capability.

    You can get a JFIF library from the Independent JPEG Group (IJG). You need Release 6b or better. With earlier releases, Netpbm build fails with undefined jpeg symbols. The basic JFIF library installation procedure installs only the runtime part of the package -- you need the development part as well, so run 'make install-lib'. The JFIF library documentation erroneously calls this installing "the library itself." This apparently was written before shared libraries. With shared libraries, "the library itself" is part of the runtime installation, but install-lib still installs the compile-time stuff you need.

    libtiff

    This is code that knows the TIFF format. It is required to build the following Netpbm programs:

  • pamtotiff
  • pnmtotiff
  • pnmtotiffcmyk
  • tifftopnm You can get libtiff from libtiff.org.

    libpng

    This is code that knows the PNG format. It is required to build the following Netpbm programs:

  • pngtopnm
  • pnmtopng

    You can get libpng from libpng.org or Sourceforge. Older libpng won't work -- you get unresolved external references to png_sig_cmp and png_set_sig_bytes.

    libz

    This is LZW compression code. It is required to build the following Netpbm programs:

  • pamtotiff
  • pnmtops
  • pnmtotiff
  • pnmtotiffcmyk
  • tifftopnm (libz is also normally required to build Pnmtopng and Pngtopnm, but we don't list it here because that's technically not Netpbm's requirement, but libpng's. If you don't have libz, you don't have libpng either).

    You can get libz from ftp://quest.jpl.nasa.gov/pub/zlib or ftp://metalab.unc.edu/pub/Linux/libs.

    The TIFF converters need the LZW library because there is a subformat of TIFF that uses LZW compression. But it is possible to have a TIFF library that cannot handle that subformat and thus does not use the LZW library, and in that case the Netpbm TIFF converter programs don't need it either. If you have such a TIFF library, you must manually modify your Makefile.config to state that fact. configure doesn't take care of that.

    libX11

    This is code that displays stuff on an X Window System display. It is required to build the following Netpbm program:

  • pamx

    libX11 is part of any X Window System implementation, for example the one produced by x.org.

    libvga (Svgalib)

    This is code that displays graphics on a SVGA Linux virtual console. It is required to build the following Netpbm program:

  • ppmsvgalib

    libxml2

    This is code that generates and parses XML. It is required to build the following Netpbm program:

  • svgtopam

    Utah Raster Toolkit

    The Utah Raster Toolkit is not a prerequisite because Netpbm includes a subset of it that meets the needs of Pnmtorle and Rletopnm. However, you can also substitute the real package by properly configuring Makefile.config. You can get it from here. There's also a patch for it.


    By Bryan Henderson, San Jose, CA; bryanh@giraffe-data.com last checked 2007.07.25.