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

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