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