~ubuntu-branches/ubuntu/saucy/rrdtool/saucy-proposed

« back to all changes in this revision

Viewing changes to doc/rrdbuild.html

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2010-07-22 08:07:01 UTC
  • mfrom: (1.2.8 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100722080701-k46mgdfz6euxwqsm
Tags: 1.4.3-1ubuntu1
* Merge from debian unstable, Remaining changes:
  - debian/control: Don't build against ruby1.9 as we don't want
    it in main.
* require libdbi >= 0.8.3 to prevent aborts when using dbi datasources

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
</p>
68
68
<hr />
69
69
<h1><a name="overview">OVERVIEW</a></h1>
70
 
<p>If you downloaded the source of rrdtool you have to compile it. This
 
70
<p>If you downloaded the source of RRDtool you have to compile it. This
71
71
document will give some information on how this is done.</p>
72
72
<p>RRDtool relies on services of third part libraries. Some of these libraries
73
73
may already be installed on your system. You have to compile copies of the other
96
96
<p>Once you have decided. Save the two locations into environment variables.</p>
97
97
<pre>
98
98
 BUILD_DIR=/tmp/rrdbuild
99
 
 INSTALL_DIR=/usr/local/rrdtool-1.3.8</pre>
 
99
 INSTALL_DIR=/opt/rrdtool-1.4.3</pre>
100
100
<p>If your <em class="file">/tmp</em> is mounted with the option noexec (RHEL seems todo that) you have to choose
101
101
a different directory!</p>
102
102
<p>Now make sure the BUILD_DIR exists and go there:</p>
106
106
<p>Lets first assume you already have all the necessary libraries
107
107
pre-installed.</p>
108
108
<pre>
109
 
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz">http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz</a>
110
 
 gunzip -c rrdtool-1.3.8.tar.gz | tar xf -
111
 
 cd rrdtool-1.3.8
 
109
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.3.tar.gz">http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.3.tar.gz</a>
 
110
 gunzip -c rrdtool-1.4.3.tar.gz | tar xf -
 
111
 cd rrdtool-1.4.3
112
112
 ./configure --prefix=$INSTALL_DIR &amp;&amp; make &amp;&amp; make install</pre>
113
113
<p>Ok, this was very optimistic. This try will probably have ended with
114
114
<strong>configure</strong> complaining about several missing libraries.</p>
119
119
<p>If your OS lets you install additional packages from a software repository,
120
120
you may get away with installing the missing packages. When the packages are
121
121
installed, run configure again and try to compile again. Below you find some
122
 
hints on getting your OS ready for the rrdtool compilation.</p>
123
 
<p>Additions to this list are welcome. In general rrdtool should work with the
 
122
hints on getting your OS ready for compiling RRDtool.</p>
 
123
<p>Additions to this list are welcome. In general RRDtool should work with the
124
124
latest versions of the libraries. The versions listed here are just what was
125
125
current when I tested this.</p>
126
126
<p>
136
136
fix this:</p>
137
137
<pre>
138
138
 perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc</pre>
139
 
<p>Make sure rrdtool finds your new compiler</p>
 
139
<p>Make sure the RRDtool build system finds your new compiler</p>
140
140
<pre>
141
141
 export PATH=/opt/SunStudioExpress/bin</pre>
142
142
<p>Since there does not seem to be a viable msgfmt tool on OpenSolaris (short
154
154
<p>
155
155
</p>
156
156
<h2><a name="gentoo">Gentoo</a></h2>
157
 
<p>In Gentoo installing rrdtool is really simple you just need to <strong>emerge
 
157
<p>In Gentoo installing RRDtool is really simple you just need to <strong>emerge
158
158
rrdtool</strong>. All dependencies will be handled automatically by the portage
159
159
system. The only thing you should care about are USE flags, which allow you
160
 
fine tune features rrdtool will be built with. Currently the following USE
 
160
fine tune features RRDtool will be built with. Currently the following USE
161
161
flags are available:</p>
162
162
<pre>
163
163
 doc    - install .html and .txt documentation
188
188
<h2><a name="general_build_tips_for_aix">General build tips for AIX</a></h2>
189
189
<p>If you are working with AIX, you may find the <strong>--disable-shared</strong> option
190
190
will cause things to break for you. In that case you may have to install the
191
 
shared libraries into the rrdtool PREFIX and work with <strong>--disable-static</strong>
 
191
shared libraries into the RRDtool PREFIX and work with <strong>--disable-static</strong>
192
192
instead.</p>
193
 
<p>Another hint to get rrdtool working on AIX is to use the IBM XL C Compiler:</p>
 
193
<p>Another hint to get RRDtool working on AIX is to use the IBM XL C Compiler:</p>
194
194
<pre>
195
195
 export CC=/usr/vac/bin/cc
196
196
 export PERLCC=$CC</pre>
216
216
 export LDFLAGS=-R${INSTALL_DIR}/lib</pre>
217
217
<p>if you are using the Sun Studio/Forte compiler, you may also want to set</p>
218
218
<pre>
219
 
 export CFLAGS=&quot;-xO3 -xcode=pic13&quot;   (SPARC)
220
 
 export CFLAGS=&quot;-xO3 -Kpic&quot;          (x86)</pre>
 
219
 CFLAGS=&quot;-xO3 -xcode=pic13&quot;   (SPARC)
 
220
 CFLAGS=&quot;-xO3 -Kpic&quot;          (x86)</pre>
221
221
</dd>
222
222
<dt><strong><a name="linux" class="item">Linux</a></strong></dt>
223
223
 
224
224
<dd>
225
225
<pre>
226
 
 export CFLAGS=&quot;-O3 -fPIC&quot;
227
226
 export LDFLAGS=&quot;-Wl,--rpath -Wl,${INSTALL_DIR}/lib&quot;</pre>
228
227
</dd>
229
228
<dt><strong><a name="hpux" class="item">HPUX</a></strong></dt>
257
256
 wget <a href="http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz">http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz</a>
258
257
 gunzip -c pkg-config-0.23.tar.gz | tar xf -
259
258
 cd pkg-config-0.23
260
 
 ./configure --prefix=$INSTALL_DIR
 
259
 ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
261
260
 $MAKE
262
261
 $MAKE install</pre>
263
262
<p>After installing pkgconfig in a custom directory, setting up the corresponding
273
272
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz</a>
274
273
 gunzip -c zlib-1.2.3.tar.gz | tar xf -
275
274
 cd zlib-1.2.3
276
 
 ./configure --prefix=$INSTALL_DIR --shared
 
275
 ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot; --shared
277
276
 $MAKE
278
277
 $MAKE install</pre>
279
278
<p>
287
286
 cd $BUILD_DIR
288
287
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz</a>
289
288
 gunzip -c libpng-1.2.18.tar.gz | tar xf -
290
 
 cd libpng-1.2.18
291
 
 ./configure --prefix=$INSTALL_DIR
 
289
 cd libpng-1.2.10
 
290
 env CFLAGS=&quot;-O3 -fPIC&quot; ./configure --prefix=$INSTALL_DIR
292
291
 $MAKE
293
292
 $MAKE install</pre>
294
293
<p>
314
313
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz</a>
315
314
 gunzip -c libxml2-2.6.32.tar.gz | tar xf -
316
315
 cd libxml2-2.6.32
317
 
 ./configure --prefix=$INSTALL_DIR
 
316
 ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
318
317
 $MAKE
319
318
 $MAKE install</pre>
320
319
<p>
329
328
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz</a>
330
329
 gunzip -c fontconfig-2.4.2.tar.gz   | tar xf -
331
330
 cd fontconfig-2.4.2
332
 
 ./configure --prefix=$INSTALL_DIR --with-freetype-config=$INSTALL_DIR/bin/freetype-config
 
331
 ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot; --with-freetype-config=$INSTALL_DIR/bin/freetype-config
333
332
 $MAKE
334
333
 $MAKE install</pre>
335
334
<p>
340
339
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz</a>
341
340
 gunzip -c pixman-0.10.0.tar.gz  | tar xf -
342
341
 cd pixman-0.10.0
343
 
 ./configure --prefix=$INSTALL_DIR
 
342
 ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
344
343
 $MAKE
345
344
 $MAKE install</pre>
346
345
<p>
354
353
 ./configure --prefix=$INSTALL_DIR \
355
354
    --enable-xlib=no \
356
355
    --enable-xlib-render=no \
357
 
    --enable-win32=no
 
356
    --enable-win32=no \
 
357
    CFLAGS=&quot;-O3 -fPIC&quot;
358
358
 $MAKE
359
359
 $MAKE install</pre>
360
360
<p>
365
365
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz</a>
366
366
 gunzip -c glib-2.15.4.tar.gz  | tar xf -
367
367
 cd glib-2.15.4
368
 
 ./configure --prefix=$INSTALL_DIR
 
368
 ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
369
369
 $MAKE
370
370
 $MAKE install</pre>
371
371
<p>
376
376
 wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2">http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2</a>
377
377
 bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
378
378
 cd pango-1.21.1
379
 
 ./configure --prefix=$INSTALL_DIR --without-x
 
379
 ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot; --without-x
380
380
 $MAKE
381
381
 $MAKE install</pre>
382
382
<p>
388
388
are running, the syntax for setting environment variables is different.</p>
389
389
<p>And finally try building again. We disable the python and tcl bindings
390
390
because it seems that a fair number of people have ill configured python and
391
 
tcl setups that would prevent rrdtool from building if they are included in
 
391
tcl setups that would prevent RRDtool from building if they are included in
392
392
their current state.</p>
393
393
<pre>
394
 
 cd $BUILD_DIR/rrdtool-1.3.8
 
394
 cd $BUILD_DIR/rrdtool-1.4.3
395
395
 ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
396
396
 $MAKE clean
397
397
 $MAKE