graphviz build notes

External packages

The full build requires external libraries that you must obtain elsewhere. Most, if not all of these are optional, and configure will build graphviz with reduced functionality if an external library is not found. Newer versions of these libraries should be fine - if not, please let us know.

These libraries (either static or dynamic) and their interface header files must already be on your system. It's OK if you install your own copies of these packages, though you may need to tell make or configure where to find them. Run "configure --help" for details.

On most Linux distributions these packages are already installed or installable from packages included in the distribution. You might need to install some -devel packages to get the include header files.

Abbreviated Build Instructions (GNU tools)

If you are using GNU tools, the recommended method for building graphviz is the usual:

	make install

If you are building from CVS sources, then you must have recent versions of "libtool", "automake", and "autoconf". Build with:

	make install

If you are not building with GNU tools, then there are some tried-and-true old-style Makefiles that can be used instead. Details below.

Detailed Build Instructions

There are a handful of preprocessor defines that control the image driver configuration. These preprocessor defines need to agree with the libraries used in the Makefile.

The generic raster driver is gd and it can be configured to generate GIF (no compression), PNG (lossless compression), JPEG (lossy compression), and wireless bitmap (WBMP) files. The compressors all need zlib. In the current build we have a top-level config.h file that defines various symbols, such as:


If you don't enable the gd based drivers, graphviz will still have the printf style drivers for Postscript and SVG. (However, even these benefit from better text size estimation via Freetype, when it is available.)

Build tools for Unix

You have several choices.

1. (Recommended for Linux) Use configure generated by GNU autoconf. This often works well on a vanilla Linux distribution with Tcl/Tk, freetype-devel and libjpeg already installed by root under /usr. Probably works OK with Solaris, too. Otherwise some adjusting of command line arguments to configure will be needed. For Linux you can also just pick up the source tarball or RPMs here.

First, if you are using sources from CVS, run "./" to generate the "configure" script. If you are using sources from graphviz-<version>.tar.gz this step should not be needed.

Next, run configure. For help on possible configure options, run:

./configure --help

For example, I use

./configure  --prefix=$HOME/arch/sgi.mips3 \
	--with-freetypeincludedir=$HOME/arch/$ARCH/include/freetype2 \
	--with-freetypelibdir=$HOME/arch/$ARCH/lib \

Obviously you would change the pathnames to reflect your installation.

Note that the directory ${prefix}/include is automatically searched for headers, and ${prefix}/lib for libraries.

If you have problems with one or more of the optional script language bindings, they can be disabled with e.g. --disable-perl.

2. (Recommend for other Unix platforms.) As above, you need the external packages to be installed somewhere.

make install
make clean

3. (Recommended for Dave Korn and Eleftheris Koutsofios) Use AT&T/Lucent nmake.

You have to install the AST tools first.

Then edit Makeargs in the top source directory appropriately and nmake install. Some fiddling with X11 libs is probably necessary to compile 'lefty'. This usually involes editing $INSTALLROOT/lib/lib/Xt or X11 (or less portably, edit nmakefile). You may also need...

export PACKAGE_tcl=/where/tcl/is/installed

When nmake works, it's absolutely great, but it's usually some work to get the environment right including the actions of tools like iffe (the AST equivalent of what GNU configure does). If you're Lefty or Dave Korn, you already knew that.

Build tools for win32

See separate build notes for Microsoft Windows (in native mode).

With some persistence you can likely get Graphviz to build on UWIN or Cygwin installed on Microsoft Windows. You will still need various third-party packages to enable all the Graphviz drivers. We haven't tried to build tcldot or webdot in win32.

Unix platform-specific build notes


Matt Fago tells us that "--enable-shared=no" is required or the executables segfault after seemingly correct compiles. (Bug #421)


The default Irix libjpeg is obsolescent. We need at least version 62. It wasn't at all clear to me where to get sources for this - eventually I found the source for v61 and patches for v62 using a search engine. We may eventually remove JPEG support (lossy compression seems good for photos, not technical diagrams) so if you can't get this to work, the loss of -Tjpeg is no big deal.

We found that on some platforms (Solaris?) gd/dotneato and freetype MUST be compiled with the same C compiler (e.g. gcc, or the native cc). Otherwise there are are weird stack argument errors in the call to TT_Open_Face. I don't have time to try to figure out what's wrong.


Put /usr/ccs/bin in PATH


The X11 package must include /usr/contrib/X11R6 as well as the base stuff. For some reason GNU autoconf doesn't seem to find X11 in this location so you may need to add the following to the ./configure line:
--with-Xawincludedir=/usr/contrib/X11R6/include --with-Xawlibdir=/usr/contrib/X11R6/lib

Apple Mac OS/X

Currently, PixelGlow (Glen Low) provides a full featured port of Graphviz including a very nice Aqua-based graph document container. Highly recommended. We merged his patches into our source, but we don't build or test on OS X. Talk to Glen.

The following are old pre-Pixelglow build notes:

dot and neato build with old make. (Didn't bother with tcldot.)

There could still be problems with case-sensitive names, though we fixed all the ones we could find.

It's weird that Mac OSX declares lrand48() but it's not defined in any of the standard system library functions.

GNU style building

To produce graphviz-(ver).tar.gz from GIT sources using cogito.
	cg clone
	cd graphviz2
or to update from GIT
	cd graphviz2
	cg update
	make dist

(Cogito & GIT are available from
or as binary packages in Fedora-Extras )

To build source and binary rpms (results are left in /usr/src/redhat/ ):

	rpm -ta graphviz-(ver).tar.gz

To build locally:

	zcat graphviz-(ver).tar.gz | tar xfvo -
	cd graphviz-(ver)
	make install
copyright  ©  June 06 2020 sean dreilinger url: