File: build.html

package info (click to toggle)
graphviz 1.7.16-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 11,124 kB
  • ctags: 12,650
  • sloc: ansic: 131,002; sh: 7,483; makefile: 1,954; tcl: 1,760; yacc: 1,758; perl: 253; awk: 150; lex: 96
file content (275 lines) | stat: -rw-r--r-- 8,763 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<html>
<head>
<title>graphviz 1.7 build notes</title>
</head>
<body bgcolor=#ffffff>
<h1>graphviz 1.7 build notes</h1>
<h2>External packages</h2>

The full build requires external libraries that you must
obtain elsewhere:

<ul>
<li> zlib 1.1.3  <a href=http://www.gzip.org/zlib/>http://www.gzip.org/zlib/</a>
<li> libpng 1.0.6 <a href=http://www.libpng.org/pub/png/>http://www.libpng.org/pub/png/</a>
<li> jpeg-6b 62 <a href=http://www.ijg.org/>http://www.ijg.org/</a>
<li> freetype 2.0 (or 1.3, but not both) <a href=http://freetype.sourceforge.net/>http://freetype.sourceforge.net/</a>
<li> Tcl/Tk 8.3 <a href=http://sourceforge.net/foundry/tcl-foundry/>http://sourceforge.net/foundry/tcl-foundry/</a>
</ul>
<P>
These libraries (either static or dynamic) and their
interface header files must already be on the system. 
It's OK if you install your own copies of these packages,
though you will need to tell make or configure where to find them.
<P>
It's probably still possible to build the tools without
the above (by deleting the raster driver), and it's possible
to build dot and neato without tcldot, but we haven't tried that
in a while.
<P>
I had some trouble finding the right version of libjpeg v62
but you can get a
<A HREF="http://www.research.att.com/sw/tools/graphviz/extras/jpeg6b-patch.tgz">
source tarball</A> of my patched copy if you have trouble with yours.
<P>
You can locate most of this stuff on places like 
<A HREF="http://www.sourceforge.net">SourceForge</A>,
<A HREF="http://www.freetype.org">freetype.org</A>,
and <A HREF="http://www.rpmfind.net">RPMfind</A> (for Linux at least).
<P>
n.b. It is a little annoying that you must build and install freetype-devel
just to get the header files that define the API in the freetype
libraries (e.g. libttf.so).  For convenience we put the
header files for Linux
<A HREF="http://www.research.att.com/sw/tools/graphviz/freetype_include.tgz">
here</A>.

<h2>Abreviated Build Instructions (GNU tools)</h2>

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

	./configure
	make
	make install
</pre>

<p>If you are building from CVS sources, then you will need
to have "libtool", "automake", and "autoconf" installed, then build
with:
<pre>

	./autogen.sh
	make
	make install
</pre>

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

<h2>Detailed Build Instructions</h2>

<P>
There are a handful of preprocessor defines that control the
image driver configuration.   The generic driver is <tt>gd</tt>
and it can be configured to generate GIF (no compression),
PNG (lossless compression), JPEG (lossy compression),
and Windows BMP files.   The compressors all need <tt>zlib</tt>.
In the current build we have a top-level config.h file that 
defines various symbols, such as:
<P>
	HAVE_JPEG<br>
	HAVE_PNG<br>
<P>
<h2>Build tools for Unix</h2>
You have several choices.
<P>
1. (Recommended for Linux) Use Linux GNU autoconf.
This often works well on a vanilla Linux distribution with
Tcl/Tk, freetype-devel and libjpeg already installed by root
under /usr.  Might work OK with Solaris, too.
Otherwise some adjusting of command line arguments
to <tt>autogen.sh</tt> or <tt>configure</tt> will be needed.
For Linux you can also just pick up the source tarball
or RPMs <A HREF="http://www.graphviz.org">here</A>.
<P>
To do this, run
<pre>
autogen.sh
</pre>
possibly with some additional arguments.  After running autogen.sh for
the first time, you can use run configure directly with the same command line
arguments. For example, I use <br>
<pre>
./autogen.sh  --prefix=$HOME/arch/sgi.mips3 \
	--with-extralibdir=$HOME/arch/sgi.mips3/lib \
	--with-extraincludedir=$HOME/arch/sgi.mips3/include \
	--with-freetypeincludedir=$HOME/arch/$ARCH/include/freetype2 \
	--with-freetypelibdir=$HOME/arch/$ARCH/lib \
	--with-tcl=/usr/common/tcl8.3.3 </pre>
<P>
Obviously you would change the pathnames to reflect your installation.
<P>
2. (Recommend for other Unix platforms.)  As above, you need
the external packages to be installed somewhere.
Then use old make by editing Config.mk for your architecture
and installation directory.  Check settings in makearch/$(ARCH).
See below for further notes on individual platforms.
<P>
Do the usual:<br>
<pre>
make
make install
make clean
</pre>
	
<P>
3. (Recommended for Dave Korn and Elefteris Koutsofios) Use AT&amp;T/Lucent
<A HREF="http://www.research.att.com/sw/tools/reuse/packages/astkit.html">nmake</A>.
<P>
You have to install the AST tools first.
<P>
Then edit Makeargs in the top source directory appropriately
and <tt>nmake install</tt>.  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...
<pre>
export PACKAGE_tcl=/where/tcl/is/installed
</pre>
<P>
When nmake works, it's absolutely great, but it's usually
some work to get the environment right including the
actions of tools like <tt>iffe</tt> (the AST equivalent
of what GNU <tt>configure</tt> does).  If you're Lefty
or Dave Korn, you already knew that.

<P>
<h2>Build tools for win32</h2>
Not for the faint of heart.

We're now building with Microsoft Visual Studio and
are on the verge of a full source and binary release
for thsi platform.

If you're ambitious, we have also used nmake from
<A HREF="http://www.research.att.com/sw/tools/uwin">
AT&amp;T UWIN</A> to build for both the UWIN environment
and the native win32 platform.
<pre>
	export nativepp=-1 <br>
	nmake CC=ncc  MSWIN32==1
</pre>
(the nativepp thing seems fixed in UWIN 2.25).
<p>
Obviously you need to have native versions
of zlib, libpng, jpeg and freetype.  I've done this;
it wasn't especially pleasant. See below

If you're running UWIN, of course, you can always just go
with either the old gviz 1.5 binaries of graphviz for UWIN
(from Dave Korn's <A HREF="http://www.research.att.com/sw/tools/uwin">UWIN
site </A>) or build graphviz 1.7 as a UWIN program using nmake or gmake.
<br>

More win32 notes...

<P>
Had to get cygwin versions of: zlib, png, jpeg-6b (required minor
source mods), freetype.1.3.1.

<P>
Had to add extra fluff to globals.h to pull in astwin32.h but #undef _UWIN
when compiling with CC=ncc.

<P>
Built zlib by <tt>configure CC=ncc --prefix=/home/users/north/src/usr</tt>
then <tt>gmake install</tt>

<P>
Built png by copying scripts/makefile.gcc to makefile and editing slightly
then gmake install

<P>
Built jpeg same as zlib.
<tt>
gmake install-lib install-headers
</tt>

<P>
MSVC 5.0 C compiler dies when -O is invoked on neato/splines.c,
required nmakefile CC.NOOPTIMIZE.
<P>
Needed to hand-craft a lib/lib/z to go with our libz.a in order
to not unintentionally pull in /usr/lib/ast.lib (because of mistakenly
binding the lib/lib/z that goes with /usr/lib/z.lib).
<P>
I haven't tried to build tcldot or webdot in win32.

<h2>Unix platform-specific build notes</h2>
<h2>SGI</h2>
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.  
<P>

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.

<h2>Solaris</h2>
Put /usr/ccs/bin in PATH

<h2>HP-UX</h2>
The X11 package must include /usr/contrib/X11R6
as well as the base stuff.

<h2>Apple Mac OS/X</h2>
dot and neato build with old make.  (Didn't bother with tcldot.)
<P>
One problem to work around is that we naively named
some of the build files with case-sensitive names, namely,
configure and CONFIGURE, Makefile.in and Makefile.IN.
The Mac OS file system apparently performs case folding so
they can't co-exist when you unpack the archive.  You want
the ones with upper-case names.  I just copied them from
a nearby Unix machine.  If you can't do that, then try
extracting them manually from the source tarball, along
the lines of...
<pre>
tar xvzf `tar tvzf graphviz.tgz | grep Makefile.IN`
</pre>
<P>
It's weird that Mac OSX declares lrand48() but it's not
defined in any of the standard system library functions.

<h2>GNU style building</h2>

<pre>
To produce graphviz-(ver).tar.gz from CVS sources.

	cvs checkout graphviz
	cd graphviz
	./autogen.sh
	make dist

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)
	./configure
	make
	make install
</pre>

</body>
</html>