This file is indexed.

/usr/share/doc/graphviz/html/build.html is in graphviz-doc 2.38.0-17.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
<html>
<head>
<title>Graphviz build notes</title>
</head>
<body bgcolor=#ffffff>
<h1>graphviz build notes</h1>
<h2>External packages</h2>
The full build requires external libraries that you must
obtain elsewhere.  Most, if not all of these are optional,
and configure will build graphviz with reduced functionality
if an external library is not found.  Newer versions of these
libraries should be fine - if not, please let us know.
<p>
A list of these external libraries can be found on the Graphviz
<A HREF="http://www.graphviz.org/Download_source.php">source download page</A>.
<h3>Notes:</h3>
<ul>
<li>GD (generic raster graphics driver for PNG, GIF, JPEG)<br>
Graphviz contains a copy of libgd, but we hope to
remove it eventually so the external library is preferred.
<li>ZLIB (raster image compression)<br>
NB: Use "./configure -s" to build shared libraries. (See notes in zlib-1.2.3/Makefile)
</ul>
<P>
These libraries (either static or dynamic) and their
interface header files must already be on your system.
It's OK if you install your own copies of these packages,
though you may need to tell make or configure where to find them.
Run "configure --help" for details.
<P>
On most Linux distributions these packages are already installed
or installable from packages included in the distribution.
You might need to install some -devel packages to get the include
header files.
Also, some of these packages require other packages, so for sanity,
you should use some automated install mechanism such as rpms or macports,
or look for complete packages.
                                                                                
<h2>Abbreviated Build Instructions</h2>

<p>The recommended method for building graphviz from a downloaded
source package is the usual:
<pre>

	./configure
	make
	make install
</pre>
<p>If you are building from Mercurial sources, then you must have
recent versions of "libtool", "automake", and "autoconf".
Build with:
<pre>

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

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

<h2>Detailed Build Instructions</h2>

<p>
The preferred image renderer is cairo, with support from pango
for fonts. This handles various bitmap formats as well as svg,
pdf and PostScript.
<p>
The generic raster driver is <tt>gd</tt> and it can be configured to
generate GIF (no compression), PNG (lossless compression), JPEG
(lossy compression), and wireless bitmap (WBMP) files.
The compressors all need <tt>zlib</tt>.  In the current build, we
use a top-level config.h file that defines various symbols, such as:
<P>
	HAVE_JPEG<br>
	HAVE_PNG<br>
<P>
This file is typically generated by configure based on how you
invoke it and what it finds on your system.
If you don't enable the <tt>gd</tt> based drivers, graphviz will
still have the <tt>printf</tt> style drivers for PostScript and SVG.
(However, even these benefit from better text size estimation via
Freetype, when it is available.)
<P>
<h2>Build tools for Unix</h2>
You have several choices.
<P>
1. (Recommended - requires gmake) Use configure generated by GNU autoconf.
This comes with the source packages.
This often works well on a vanilla Linux distribution with
Tcl/Tk, freetype-devel and libjpeg already installed by root
under /usr.  It works OK with other versions of Unix, but
some adjusting of command line arguments
to <tt>configure</tt> may be needed.
For Linux you can also just pick up the source tarball
or RPMs <A HREF="http://www.graphviz.org/Download..php/">here</A>.
<P>
First, if you are using sources from Mercurial, run "./autogen.sh"
to generate the "configure" script.  If you are using sources
from graphviz-&lt;version&gt;.tar.gz this autogen.sh step should not be
needed.
<p>
Next, run configure. For help on possible configure options, run:
<br>
<pre>
./configure --help
</pre>
<p>
For example, I use <br>
<pre>
./configure  --prefix=$HOME/arch/sgi.mips3 \
	--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>
Note that the directory ${prefix}/include is automatically searched
for headers, and ${prefix}/lib for libraries.
<P>
If you have problems with one or more of the optional script language bindings,
they can be disabled with e.g. --disable-perl.
<p>
When configure is finished, it reports which optional packages were
found and which Graphviz features are enabled. If some package or
feature you expected is not shown as used, you may need to check
the config.log file or configure.ac or configure files to see what
went wrong. Usually, any problem can be resolved using environment
variables or the command-line flags of configure.
<p>
Once configure has finished, complete the build with
<pre>
gmake
gmake install
</pre>
2. To avoid the use of configure and gmake, the source package comes with
a collection of simple non-GNU makefiles. As above, you need
the external packages to be installed somewhere. Then
<ul>
<li>
Run configure.old from the root graphviz directory.
<li>
Edit Config.mk for your architecture, tools, and installation directory.
In particular, set the ARCH make variable.
<li>
If desired, check settings in makearch/$(ARCH).
<li>
Run make and make install.
</ul>
	
<h2>Build tools for win32</h2>
<p>See separate
<A HREF="http://www.graphviz.org/doc/winbuild.html">
build notes</A> for Microsoft Windows.
<p>
With some persistence you can likely get Graphviz to build on
<A HREF="http://www.research.att.com/sw/tools/uwin">UWIN</A>
or <A HREF="http://www.cygwin.com/">Cygwin</A> installed on
Microsoft Windows.  You will still need various third-party packages
to enable all the Graphviz drivers.

<!--------------------------------------------------------------------------
Currently we build graphviz on Windows using the MS Visual C++ compiler only.
The project and makefiles can be found in both the Mercurial tree and the source
distribution package in the $ROOT/windows directory. ($ROOT refers
to the directory where the source tree has been installed.)
<p>
Follow the step-by-step procedure given below:
<p>
<ol>
<li>Open the WSH script file $ROOT/windows/winmake.wsf using a text editor
and set the "vc" variable to the location of MS VC++ on your machine.</li>
<p>
<li>Download the third-party libraries/header files from
<a href=http://www.research.att.com/sw/tools/graphviz/dist/third-party.zip>http:
//www.research.att.com/sw/tools/graphviz/dist/third-party.zip</a>.
Unzip the file in $ROOT directory.</li>
<p>
<li>Execute the $ROOT/windows/winmake.wsf file by double-clicking on the
file within Windows Explorer.</li>
<p>
<li>If the script throws errors, you'll need to open the graphviz project in
$ROOT/makearch/win32/static/graphviz.dsw using the MS Visual Studio.
Switch to the "File View" within the MS Visual Studio and trigger project
builds individually.</li>
<p>
<li>Follow step 4 for building tools in
$ROOT/makearch/win32/static/tools.dsw.</li>
</ol>

<P>
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. (See step 2 above. Or build them
yourself; see notes below.)
<P>
If you're running UWIN, of course, you can always just go
with either the old 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 as a UWIN program using nmake or gmake.
<br>
<P>
More win32 notes...
<il>
<P>
<li>
Add extra fluff to globals.h to pull in astwin32.h but #undef _UWIN
when compiling with CC=ncc.
</li>
<P>
<li>
MSVC 5.0 C compiler may die when -O is invoked on neato/splines.c;
this required nmakefile CC.NOOPTIMIZE.
</li>
<P>
<li>
Get cygwin versions of: zlib, png, jpeg-6b (required minor
source mods), freetype.1.3.1.
</li>
<P>
<li>
Build zlib by <tt>configure CC=ncc --prefix=/home/users/north/src/usr</tt>
then <tt>gmake install</tt>
</li>
<P>
<li>
Build png by copying scripts/makefile.gcc to makefile and editing slightly
then gmake install
</li>
<P>
<li>
Build jpeg same as zlib: <tt> gmake install-lib install-headers </tt>
</li>
<P>
<li>
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).
</li>
<P>
<li>
----------------------------------------------------------->
We haven't tried to build tcldot or webdot in win32.
</li>
<h2>Unix platform-specific build notes</h2>
<h2>AIX</h2>
Matt Fago tells us that "--enable-shared=no" is required or the
executables segfault after seemingly correct compiles.  (Bug #421)
<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.  We may eventually remove JPEG support
(lossy compression seems good for photos, not technical diagrams)
so if you can't get this to work, the loss of -Tjpeg is no big deal.
<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.  For some reason GNU autoconf doesn't seem to find
X11 in this location so you may need to add the following to the
./configure line:
<pre>
--with-Xawincludedir=/usr/contrib/X11R6/include --with-Xawlibdir=/usr/contrib/X11R6/lib
</pre>

<h2>Apple Mac OS/X</h2>
<P>
Currently, Glen Low provides a full-featured
<A HREF="http://www.graphviz.org/Download_macos.php">
port of Graphviz</A>.
Also, Ryan Schmidt maintains versions of Graphviz for macports.
<P>
We recommend using macports to install the desired third-party
libraries. Once these have been installed, 
the standard build using configure and make works fine. The only caveat
is that sometimes, an incompatible, non-GNU tool is picked up 
rather than the needed GNU version. 
<P>
Compiling Smyrna for OS X, Snow Leopard (Amanda Stent)
<p>
<b>Xcode</b>:<br>
First if you updated from Leopard you have to reinstall developer tools.  No getting around it, I tried, you just have to do it.
<p>
<b>Macports</b>:<br>
Then you have to uninstall and clean up the Macports ports, all of them.  Take the opportunity to reinstall Macports itself.  There are migration instructions on the web, but it's a little hairier than they make it out to be because some of the links (e.g. hs-ports) will not be there and you will have to get over those hurdles manually.
<p>
Briefly, to do a clean install of macports do:
<pre>
sudo port -f uninstall installed
sudo port clean --work --archive all
and then new macports
and then sudo port install the things you need now
and possibly sudo port selfupdate and sudo port upgrade outdated at the end
</pre>

Then you have to install all the tools needed for Smyrna, glut, glade, etc., and all their dependencies.  This takes days.
<P>
Now macports doesn't do glut separately.  It's sneaky because if you say install glut, something will happen, but actually glut now comes with mesa.  This will mess up your head. (The real meat of glut is part of the mesa package - ed.)
<P>
<b>Graphviz</b>:<br>
Then you get your graphviz and you configure with --with-smyrna.  I used the following:
<pre>
configure --with-smyrna --with-glutincludedir=/opt/local/var/macports/software/mesa/7.6.1_1+hw_render/opt/local/include --with-glutlibdir=/opt/local/var/macports/software/mesa/7.6.1_1+hw_render/opt/local/lib --prefix=/usr/local/share/graphviz
</pre>

(I use<br>
<pre>
configure --with-smyrna --with-glutincludedir=/opt/local/include  --with-glutlibdir=/opt/local/lib
</pre>
 - ed.)
<p>

On the webs they say to use -framework commandline option to gcc; however I couldn't figure out how to make this work with the makefile and configure file for graphviz.
<p>
Now, I got to a certain point and it grumbled about permissions and refused to go any further.  So you may have to chmod in the source directory.
<p>
And I got to the point where it was building gv_perl.cpp and it refused to go any further.  I got around this eventually by changing the call to XS to XSPROTO, thus obviating the need for XSUB.h (what does it do for you?  nothing!).
<p>
And then it said it was done but when I went to run it it wouldn't start due to some missing template.dot so then you make clean, and make install again because by now you are confused as well.
<p>
And then it should work!
<p>
By the way making by sneakily cd'ing into the macosx folder and using the makefile labeled with your OS *does not work*.

<h2>GNU style building</h2>

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

	hg clone http://hg.research.att.com/graphviz
	cd graphviz
	./autogen.sh
	make dist
-->
To produce graphviz-(ver).tar.gz from GIT sources using cogito.
	cg clone http://www.graphviz.org/pub/scm/graphviz2/.git
	cd graphviz2
or to update from GIT
	cd graphviz2
	cg update
then
	./autogen.sh
	make dist

(Cogito &amp; GIT are available from http://www.kernel.org/pub/software/scm/
or as binary packages in Fedora-Extras )

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>