wolffd@0: wolffd@0: wolffd@0: graphviz build notes wolffd@0: wolffd@0: wolffd@0:

graphviz build notes

wolffd@0:

External packages

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

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

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

Abbreviated Build Instructions (GNU tools)

wolffd@0: wolffd@0:

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

wolffd@0: 
wolffd@0: 	./configure
wolffd@0: 	make
wolffd@0: 	make install
wolffd@0: 
wolffd@0: wolffd@0:

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

wolffd@0: 
wolffd@0: 	./autogen.sh
wolffd@0: 	./configure
wolffd@0: 	make
wolffd@0: 	make install
wolffd@0: 
wolffd@0: wolffd@0:

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

Detailed Build Instructions

wolffd@0: wolffd@0:

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

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

wolffd@0: HAVE_JPEG
wolffd@0: HAVE_PNG
wolffd@0:

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

wolffd@0:

Build tools for Unix

wolffd@0: You have several choices. wolffd@0:

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

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

wolffd@0: Next, run configure. For help on possible configure options, run: wolffd@0:
wolffd@0:

wolffd@0: ./configure --help
wolffd@0: 
wolffd@0:

wolffd@0: For example, I use
wolffd@0:

wolffd@0: ./configure  --prefix=$HOME/arch/sgi.mips3 \
wolffd@0: 	--with-freetypeincludedir=$HOME/arch/$ARCH/include/freetype2 \
wolffd@0: 	--with-freetypelibdir=$HOME/arch/$ARCH/lib \
wolffd@0: 	--with-tcl=/usr/common/tcl8.3.3 
wolffd@0:

wolffd@0: Obviously you would change the pathnames to reflect your installation. wolffd@0:

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

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

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

wolffd@0:
wolffd@0: make
wolffd@0: make install
wolffd@0: make clean
wolffd@0: 
wolffd@0: wolffd@0:

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

wolffd@0: You have to install the AST tools first. wolffd@0:

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

wolffd@0: export PACKAGE_tcl=/where/tcl/is/installed
wolffd@0: 
wolffd@0:

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

wolffd@0:

Build tools for win32

wolffd@0:

See separate wolffd@0: wolffd@0: build notes for Microsoft Windows (in native mode). wolffd@0:

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

Unix platform-specific build notes

wolffd@0:

AIX

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

SGI

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

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

Solaris

wolffd@0: Put /usr/ccs/bin in PATH wolffd@0: wolffd@0:

HP-UX

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

Apple Mac OS/X

wolffd@0:

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

wolffd@0: The following are old pre-Pixelglow build notes: wolffd@0:

wolffd@0: dot and neato build with old make. (Didn't bother with tcldot.) wolffd@0:

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

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

GNU style building

wolffd@0: wolffd@0:
wolffd@0: 
wolffd@0: To produce graphviz-(ver).tar.gz from GIT sources using cogito.
wolffd@0: 	cg clone http://www.graphviz.org/pub/scm/graphviz2/.git
wolffd@0: 	cd graphviz2
wolffd@0: or to update from GIT
wolffd@0: 	cd graphviz2
wolffd@0: 	cg update
wolffd@0: then
wolffd@0: 	./autogen.sh
wolffd@0: 	make dist
wolffd@0: 
wolffd@0: (Cogito & GIT are available from http://www.kernel.org/pub/software/scm/
wolffd@0: or as binary packages in Fedora-Extras )
wolffd@0: 
wolffd@0: To build source and binary rpms (results are left in /usr/src/redhat/ ):
wolffd@0: 
wolffd@0: 	rpm -ta graphviz-(ver).tar.gz
wolffd@0: 
wolffd@0: To build locally:
wolffd@0: 
wolffd@0: 	zcat graphviz-(ver).tar.gz | tar xfvo -
wolffd@0: 	cd graphviz-(ver)
wolffd@0: 	./configure
wolffd@0: 	make
wolffd@0: 	make install
wolffd@0: 
wolffd@0: wolffd@0: wolffd@0: