annotate toolboxes/graph_visualisation/share/graphviz/doc/html/build.html @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 <html>
wolffd@0 2 <head>
wolffd@0 3 <title>graphviz build notes</title>
wolffd@0 4 </head>
wolffd@0 5 <body bgcolor=#ffffff>
wolffd@0 6 <h1>graphviz build notes</h1>
wolffd@0 7 <h2>External packages</h2>
wolffd@0 8 The full build requires external libraries that you must
wolffd@0 9 obtain elsewhere. Most, if not all of these are optional,
wolffd@0 10 and configure will build graphviz with reduced functionality
wolffd@0 11 if an external library is not found. Newer versions of these
wolffd@0 12 libraries should be fine - if not, please let us know.
wolffd@0 13 <ul>
wolffd@0 14 <li>GD (generic raster graphics driver for PNG, GIF, JPEG)
wolffd@0 15 <a href="http://www.boutell.com/gd/http/gd-2.0.28.tar.gz">
wolffd@0 16 http://www.boutell.com/gd/http/gd-2.0.28.tar.gz</a>
wolffd@0 17 <br>Graphviz also contains a copy of GD 2.0.4, but we will
wolffd@0 18 remove it eventually so the external library is preferred.
wolffd@0 19 <li>ZLIB (raster image compression)
wolffd@0 20 <a href="http://www.zlib.net/zlib-1.2.3.tar.gz">
wolffd@0 21 http://www.zlib.net/zlib-1.2.3.tar.gz</a>
wolffd@0 22 <br>
wolffd@0 23 NB: Use "./configure -s" to build shared libraries. (See notes in zlib-1.2.3/Makefile)
wolffd@0 24 <li>FREETYPE (renders text in raster graphics formats)
wolffd@0 25 <a href="http://prdownloads.sourceforge.net/freetype/freetype-2.1.3.tar.gz">
wolffd@0 26 http://prdownloads.sourceforge.net/freetype/freetype-2.1.3.tar.gz</a>
wolffd@0 27 <li>PNG (driver for Portable Network Graphics raster format)
wolffd@0 28 <a href="http://prdownloads.sourceforge.net/libpng/libpng-1.2.5.tar.gz">
wolffd@0 29 http://prdownloads.sourceforge.net/libpng/libpng-1.2.5.tar.gz</a>
wolffd@0 30 <li>JPEG (a popular raster format with lossy compression, not critical here)
wolffd@0 31 <a href="ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz">
wolffd@0 32 ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz</a>
wolffd@0 33 <li>EXPAT (XML parser)
wolffd@0 34 <a href="http://prdownloads.sourceforge.net/expat/expat-1.95.5.tar.gz">
wolffd@0 35 http://prdownloads.sourceforge.net/expat/expat-1.95.5.tar.gz</a>
wolffd@0 36 <li>GETTEXT (gcc compatibility library)
wolffd@0 37 <a href="http://ftp.gnu.org/gnu/gettext/gettext-0.11.5.tar.gz">
wolffd@0 38 http://ftp.gnu.org/gnu/gettext/gettext-0.11.5.tar.gz</a>
wolffd@0 39 <li>ICONV (string converstion for text internationalization)
wolffd@0 40 (Many systems already provide iconv in glibc. Check to see if you already
wolffd@0 41 have a working /usr/bin/iconv before installing this extra package.)
wolffd@0 42 <br>
wolffd@0 43 <a href="http://ftp.gnu.org/gnu/libiconv/libiconv-1.8.tar.gz">
wolffd@0 44 http://ftp.gnu.org/gnu/libiconv/libiconv-1.8.tar.gz</a>
wolffd@0 45 <li>TCL (a command interpreter for the tcldot GUI)
wolffd@0 46 <a href="http://prdownloads.sourceforge.net/tcl/tcl8.3.5-src.tar.gz">
wolffd@0 47 http://prdownloads.sourceforge.net/tcl/tcl8.3.5-src.tar.gz</a>
wolffd@0 48 <li>LIBTOOL (generic library support)
wolffd@0 49 <a href="ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.5.22.tar.gz">
wolffd@0 50 ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.5.22.tar.gz
wolffd@0 51 </a>
wolffd@0 52 </ul>
wolffd@0 53 <P>
wolffd@0 54 These libraries (either static or dynamic) and their
wolffd@0 55 interface header files must already be on your system.
wolffd@0 56 It's OK if you install your own copies of these packages,
wolffd@0 57 though you may need to tell make or configure where to find them.
wolffd@0 58 Run "configure --help" for details.
wolffd@0 59 <P>
wolffd@0 60 On most Linux distributions these packages are already installed
wolffd@0 61 or installable from packages included in the distribution.
wolffd@0 62 You might need to install some -devel packages to get the include
wolffd@0 63 header files.
wolffd@0 64
wolffd@0 65 <h2>Abbreviated Build Instructions (GNU tools)</h2>
wolffd@0 66
wolffd@0 67 <p>If you are using GNU tools, the recommended method for building
wolffd@0 68 graphviz is the usual:
wolffd@0 69 <pre>
wolffd@0 70
wolffd@0 71 ./configure
wolffd@0 72 make
wolffd@0 73 make install
wolffd@0 74 </pre>
wolffd@0 75
wolffd@0 76 <p>If you are building from CVS sources, then you must have
wolffd@0 77 recent versions of "libtool", "automake", and "autoconf".
wolffd@0 78 Build with:
wolffd@0 79 <pre>
wolffd@0 80
wolffd@0 81 ./autogen.sh
wolffd@0 82 ./configure
wolffd@0 83 make
wolffd@0 84 make install
wolffd@0 85 </pre>
wolffd@0 86
wolffd@0 87 <p>If you are not building with GNU tools, then there are some
wolffd@0 88 tried-and-true old-style Makefiles that can be used instead.
wolffd@0 89 Details below.
wolffd@0 90
wolffd@0 91 <h2>Detailed Build Instructions</h2>
wolffd@0 92
wolffd@0 93 <P>
wolffd@0 94 There are a handful of preprocessor defines that control the
wolffd@0 95 image driver configuration. These preprocessor defines need to
wolffd@0 96 agree with the libraries used in the Makefile.
wolffd@0 97 <p>
wolffd@0 98 The generic raster driver is <tt>gd</tt> and it can be configured to
wolffd@0 99 generate GIF (no compression), PNG (lossless compression), JPEG
wolffd@0 100 (lossy compression), and wireless bitmap (WBMP) files.
wolffd@0 101 The compressors all need <tt>zlib</tt>. In the current build we
wolffd@0 102 have a top-level config.h file that defines various symbols, such as:
wolffd@0 103 <P>
wolffd@0 104 HAVE_JPEG<br>
wolffd@0 105 HAVE_PNG<br>
wolffd@0 106 <P>
wolffd@0 107 If you don't enable the <tt>gd</tt> based drivers, graphviz will
wolffd@0 108 still have the <tt>printf</tt> style drivers for Postscript and SVG.
wolffd@0 109 (However, even these benefit from better text size estimation via
wolffd@0 110 Freetype, when it is available.)
wolffd@0 111 <P>
wolffd@0 112 <h2>Build tools for Unix</h2>
wolffd@0 113 You have several choices.
wolffd@0 114 <P>
wolffd@0 115 1. (Recommended for Linux) Use configure generated by GNU autoconf.
wolffd@0 116 This often works well on a vanilla Linux distribution with
wolffd@0 117 Tcl/Tk, freetype-devel and libjpeg already installed by root
wolffd@0 118 under /usr. Probably works OK with Solaris, too.
wolffd@0 119 Otherwise some adjusting of command line arguments
wolffd@0 120 to <tt>configure</tt> will be needed.
wolffd@0 121 For Linux you can also just pick up the source tarball
wolffd@0 122 or RPMs <A HREF="http://www.graphviz.org/pub/graphviz/">here</A>.
wolffd@0 123 <P>
wolffd@0 124 First, if you are using sources from CVS, run "./autogen.sh"
wolffd@0 125 to generate the "configure" script. If you are using sources
wolffd@0 126 from graphviz-&lt;version&gt;.tar.gz this autogen.sh step should not be
wolffd@0 127 needed.
wolffd@0 128 <p>
wolffd@0 129 Next, run configure. For help on possible configure options, run:
wolffd@0 130 <br>
wolffd@0 131 <pre>
wolffd@0 132 ./configure --help
wolffd@0 133 </pre>
wolffd@0 134 <p>
wolffd@0 135 For example, I use <br>
wolffd@0 136 <pre>
wolffd@0 137 ./configure --prefix=$HOME/arch/sgi.mips3 \
wolffd@0 138 --with-freetypeincludedir=$HOME/arch/$ARCH/include/freetype2 \
wolffd@0 139 --with-freetypelibdir=$HOME/arch/$ARCH/lib \
wolffd@0 140 --with-tcl=/usr/common/tcl8.3.3 </pre>
wolffd@0 141 <P>
wolffd@0 142 Obviously you would change the pathnames to reflect your installation.
wolffd@0 143 <p>
wolffd@0 144 Note that the directory ${prefix}/include is automatically searched
wolffd@0 145 for headers, and ${prefix}/lib for libraries.
wolffd@0 146 <P>
wolffd@0 147 If you have problems with one or more of the optional script language bindings,
wolffd@0 148 they can be disabled with e.g. --disable-perl.
wolffd@0 149 <p>
wolffd@0 150 2. (Recommend for other Unix platforms.) As above, you need
wolffd@0 151 the external packages to be installed somewhere.
wolffd@0 152 <ul>
wolffd@0 153 <li>
wolffd@0 154 Run configure.old from the root graphviz directory.
wolffd@0 155 <li>
wolffd@0 156 Edit Config.mk for your architecture, tools, and installation directory.
wolffd@0 157 In particular, set the ARCH make variable.
wolffd@0 158 <li>
wolffd@0 159 If desired, check settings in makearch/$(ARCH).
wolffd@0 160 See below for further notes on individual platforms.
wolffd@0 161 <li>
wolffd@0 162 Run make.
wolffd@0 163 </ul>
wolffd@0 164 <pre>
wolffd@0 165 make
wolffd@0 166 make install
wolffd@0 167 make clean
wolffd@0 168 </pre>
wolffd@0 169
wolffd@0 170 <P>
wolffd@0 171 3. (Recommended for Dave Korn and Eleftheris Koutsofios) Use AT&amp;T/Lucent
wolffd@0 172 <A HREF="http://www.research.att.com/sw/tools/reuse/packages/astkit.html">nmake</A>.
wolffd@0 173 <P>
wolffd@0 174 You have to install the AST tools first.
wolffd@0 175 <P>
wolffd@0 176 Then edit Makeargs in the top source directory appropriately
wolffd@0 177 and <tt>nmake install</tt>. Some fiddling with X11 libs is probably
wolffd@0 178 necessary to compile 'lefty'. This usually involes editing
wolffd@0 179 $INSTALLROOT/lib/lib/Xt or X11 (or less portably, edit nmakefile).
wolffd@0 180 You may also need...
wolffd@0 181 <pre>
wolffd@0 182 export PACKAGE_tcl=/where/tcl/is/installed
wolffd@0 183 </pre>
wolffd@0 184 <P>
wolffd@0 185 When nmake works, it's absolutely great, but it's usually
wolffd@0 186 some work to get the environment right including the
wolffd@0 187 actions of tools like <tt>iffe</tt> (the AST equivalent
wolffd@0 188 of what GNU <tt>configure</tt> does). If you're Lefty
wolffd@0 189 or Dave Korn, you already knew that.
wolffd@0 190 <P>
wolffd@0 191 <h2>Build tools for win32</h2>
wolffd@0 192 <p>See separate
wolffd@0 193 <A HREF="http://www.graphviz.org/pub/scm/graphviz2/doc/winbuild.html">
wolffd@0 194 build notes</A> for Microsoft Windows (in native mode).
wolffd@0 195 <p>
wolffd@0 196 With some persistence you can likely get Graphviz to build on
wolffd@0 197 <A HREF="http://www.research.att.com/sw/tools/uwin">UWIN</A>
wolffd@0 198 or <A HREF="http://www.cygwin.com/">Cygwin</A> installed on
wolffd@0 199 Microsoft Windows. You will still need various third-party packages
wolffd@0 200 to enable all the Graphviz drivers.
wolffd@0 201
wolffd@0 202 <!--------------------------------------------------------------------------
wolffd@0 203 Currently we build graphviz on Windows using the MS Visual C++ compiler only.
wolffd@0 204 The project and makefiles can be found in both the CVS tree and the source
wolffd@0 205 distribution package in the $ROOT/windows directory. ($ROOT refers
wolffd@0 206 to the directory where the source tree has been installed.)
wolffd@0 207 <p>
wolffd@0 208 Follow the step-by-step procedure given below:
wolffd@0 209 <p>
wolffd@0 210 <ol>
wolffd@0 211 <li>Open the WSH script file $ROOT/windows/winmake.wsf using a text editor
wolffd@0 212 and set the "vc" variable to the location of MS VC++ on your machine.</li>
wolffd@0 213 <p>
wolffd@0 214 <li>Download the third-party libraries/header files from
wolffd@0 215 <a href=http://www.research.att.com/sw/tools/graphviz/dist/third-party.zip>http:
wolffd@0 216 //www.research.att.com/sw/tools/graphviz/dist/third-party.zip</a>.
wolffd@0 217 Unzip the file in $ROOT directory.</li>
wolffd@0 218 <p>
wolffd@0 219 <li>Execute the $ROOT/windows/winmake.wsf file by double-clicking on the
wolffd@0 220 file within Windows Explorer.</li>
wolffd@0 221 <p>
wolffd@0 222 <li>If the script throws errors, you'll need to open the graphviz project in
wolffd@0 223 $ROOT/makearch/win32/static/graphviz.dsw using the MS Visual Studio.
wolffd@0 224 Switch to the "File View" within the MS Visual Studio and trigger project
wolffd@0 225 builds individually.</li>
wolffd@0 226 <p>
wolffd@0 227 <li>Follow step 4 for building tools in
wolffd@0 228 $ROOT/makearch/win32/static/tools.dsw.</li>
wolffd@0 229 </ol>
wolffd@0 230
wolffd@0 231 <P>
wolffd@0 232 If you're ambitious, we have also used nmake from
wolffd@0 233 <A HREF="http://www.research.att.com/sw/tools/uwin">
wolffd@0 234 AT&amp;T UWIN</A> to build for both the UWIN environment
wolffd@0 235 and the native win32 platform.
wolffd@0 236 <pre>
wolffd@0 237 export nativepp=-1 <br>
wolffd@0 238 nmake CC=ncc MSWIN32==1
wolffd@0 239 </pre>
wolffd@0 240 (the nativepp thing seems fixed in UWIN 2.25).
wolffd@0 241 <p>
wolffd@0 242 Obviously you need to have native versions
wolffd@0 243 of zlib, libpng, jpeg and freetype. (See step 2 above. Or build them
wolffd@0 244 yourself; see notes below.)
wolffd@0 245 <P>
wolffd@0 246 If you're running UWIN, of course, you can always just go
wolffd@0 247 with either the old binaries of graphviz for UWIN
wolffd@0 248 (from Dave Korn's <A HREF="http://www.research.att.com/sw/tools/uwin">UWIN
wolffd@0 249 site </A>) or build graphviz as a UWIN program using nmake or gmake.
wolffd@0 250 <br>
wolffd@0 251 <P>
wolffd@0 252 More win32 notes...
wolffd@0 253 <il>
wolffd@0 254 <P>
wolffd@0 255 <li>
wolffd@0 256 Add extra fluff to globals.h to pull in astwin32.h but #undef _UWIN
wolffd@0 257 when compiling with CC=ncc.
wolffd@0 258 </li>
wolffd@0 259 <P>
wolffd@0 260 <li>
wolffd@0 261 MSVC 5.0 C compiler may die when -O is invoked on neato/splines.c;
wolffd@0 262 this required nmakefile CC.NOOPTIMIZE.
wolffd@0 263 </li>
wolffd@0 264 <P>
wolffd@0 265 <li>
wolffd@0 266 Get cygwin versions of: zlib, png, jpeg-6b (required minor
wolffd@0 267 source mods), freetype.1.3.1.
wolffd@0 268 </li>
wolffd@0 269 <P>
wolffd@0 270 <li>
wolffd@0 271 Build zlib by <tt>configure CC=ncc --prefix=/home/users/north/src/usr</tt>
wolffd@0 272 then <tt>gmake install</tt>
wolffd@0 273 </li>
wolffd@0 274 <P>
wolffd@0 275 <li>
wolffd@0 276 Build png by copying scripts/makefile.gcc to makefile and editing slightly
wolffd@0 277 then gmake install
wolffd@0 278 </li>
wolffd@0 279 <P>
wolffd@0 280 <li>
wolffd@0 281 Build jpeg same as zlib: <tt> gmake install-lib install-headers </tt>
wolffd@0 282 </li>
wolffd@0 283 <P>
wolffd@0 284 <li>
wolffd@0 285 Needed to hand-craft a lib/lib/z to go with our libz.a in order
wolffd@0 286 to not unintentionally pull in /usr/lib/ast.lib (because of mistakenly
wolffd@0 287 binding the lib/lib/z that goes with /usr/lib/z.lib).
wolffd@0 288 </li>
wolffd@0 289 <P>
wolffd@0 290 <li>
wolffd@0 291 ----------------------------------------------------------->
wolffd@0 292 We haven't tried to build tcldot or webdot in win32.
wolffd@0 293 </li>
wolffd@0 294 <h2>Unix platform-specific build notes</h2>
wolffd@0 295 <h2>AIX</h2>
wolffd@0 296 Matt Fago tells us that "--enable-shared=no" is required or the
wolffd@0 297 executables segfault after seemingly correct compiles. (Bug #421)
wolffd@0 298 <h2>SGI</h2>
wolffd@0 299 The default Irix libjpeg is obsolescent. We need at least
wolffd@0 300 version 62. It wasn't at all clear to me where to get sources for
wolffd@0 301 this - eventually I found the source for v61 and patches for v62
wolffd@0 302 using a search engine. We may eventually remove JPEG support
wolffd@0 303 (lossy compression seems good for photos, not technical diagrams)
wolffd@0 304 so if you can't get this to work, the loss of -Tjpeg is no big deal.
wolffd@0 305 <P>
wolffd@0 306
wolffd@0 307 We found that on some platforms (Solaris?)
wolffd@0 308 gd/dotneato and freetype MUST be compiled with the
wolffd@0 309 same C compiler (e.g. gcc, or the native cc).
wolffd@0 310 Otherwise there are are weird stack argument errors in
wolffd@0 311 the call to TT_Open_Face. I don't have time to try
wolffd@0 312 to figure out what's wrong.
wolffd@0 313
wolffd@0 314 <h2>Solaris</h2>
wolffd@0 315 Put /usr/ccs/bin in PATH
wolffd@0 316
wolffd@0 317 <h2>HP-UX</h2>
wolffd@0 318 The X11 package must include /usr/contrib/X11R6
wolffd@0 319 as well as the base stuff. For some reason GNU autoconf doesn't seem to find
wolffd@0 320 X11 in this location so you may need to add the following to the
wolffd@0 321 ./configure line:
wolffd@0 322 <pre>
wolffd@0 323 --with-Xawincludedir=/usr/contrib/X11R6/include --with-Xawlibdir=/usr/contrib/X11R6/lib
wolffd@0 324 </pre>
wolffd@0 325
wolffd@0 326 <h2>Apple Mac OS/X</h2>
wolffd@0 327 <P>
wolffd@0 328 Currently, PixelGlow (Glen Low) provides a full featured
wolffd@0 329 <A HREF="http://www.pixelglow.com/graphviz/">
wolffd@0 330 port of Graphviz</A> including a very nice Aqua-based graph
wolffd@0 331 document container. Highly recommended. We merged his patches
wolffd@0 332 into our source, but we don't build or test on OS X. Talk to Glen.
wolffd@0 333 <P>
wolffd@0 334 The following are old pre-Pixelglow build notes:
wolffd@0 335 <P>
wolffd@0 336 dot and neato build with old make. (Didn't bother with tcldot.)
wolffd@0 337 <P>
wolffd@0 338 There could still be problems with case-sensitive names,
wolffd@0 339 though we fixed all the ones we could find.
wolffd@0 340 <P>
wolffd@0 341 It's weird that Mac OSX declares lrand48() but it's not
wolffd@0 342 defined in any of the standard system library functions.
wolffd@0 343
wolffd@0 344 <h2>GNU style building</h2>
wolffd@0 345
wolffd@0 346 <pre>
wolffd@0 347 <!--
wolffd@0 348 To produce graphviz-(ver).tar.gz from CVS sources.
wolffd@0 349
wolffd@0 350 cvs checkout graphviz
wolffd@0 351 cd graphviz
wolffd@0 352 ./autogen.sh
wolffd@0 353 make dist
wolffd@0 354 -->
wolffd@0 355 To produce graphviz-(ver).tar.gz from GIT sources using cogito.
wolffd@0 356 cg clone http://www.graphviz.org/pub/scm/graphviz2/.git
wolffd@0 357 cd graphviz2
wolffd@0 358 or to update from GIT
wolffd@0 359 cd graphviz2
wolffd@0 360 cg update
wolffd@0 361 then
wolffd@0 362 ./autogen.sh
wolffd@0 363 make dist
wolffd@0 364
wolffd@0 365 (Cogito &amp; GIT are available from http://www.kernel.org/pub/software/scm/
wolffd@0 366 or as binary packages in Fedora-Extras )
wolffd@0 367
wolffd@0 368 To build source and binary rpms (results are left in /usr/src/redhat/ ):
wolffd@0 369
wolffd@0 370 rpm -ta graphviz-(ver).tar.gz
wolffd@0 371
wolffd@0 372 To build locally:
wolffd@0 373
wolffd@0 374 zcat graphviz-(ver).tar.gz | tar xfvo -
wolffd@0 375 cd graphviz-(ver)
wolffd@0 376 ./configure
wolffd@0 377 make
wolffd@0 378 make install
wolffd@0 379 </pre>
wolffd@0 380
wolffd@0 381 </body>
wolffd@0 382 </html>