1 RRDBUILD(1) rrdtool RRDBUILD(1)
6 rrdbuild - Instructions for building RRDtool
9 If you downloaded the source of rrdtool you have to compile it. This
10 document will give some information on how this is done.
12 RRDtool relies on services of thrid part libraries. Some of these
13 libraries may already be installed on your system. You have to compile
14 copies of the other ones before you can build RRDtool.
16 This document will tell you about all the necessary steps to get going.
20 pilation or if you know what you are doing just replace the export bits
21 with setenv.
23 We further assume that your copies of t\bta\bar\br and m\bma\bak\bke\be are actually G\bGN\bNU\bU t\bta\bar\br
24 and G\bGN\bNU\bU m\bma\bak\bke\be respectively. It could be that they are installed as g\bgt\bta\bar\br
28 Before you start to build RRDtool, you have to decide two things:
30 1. In which directory you want to build the software.
32 2. Where you want to install the software.
34 Once you have decided. Save the two locations into environment vari-
35 ables.
37 BUILD_DIR=/tmp/rrdbuild
38 INSTALL_DIR=/usr/local/rrdtool-1.3rc4
41 you have to choose a different directory!
43 Now make sure the BUILD_DIR exists and go there:
45 mkdir -p $BUILD_DIR
46 cd $BUILD_DIR
48 Lets first assume you already have all the necessary libraries
49 pre-installed.
51 wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3rc4.tar.gz
52 gunzip -c rrdtool-1.3rc4.tar.gz | tar xf -
53 cd rrdtool-1.3rc4
54 ./configure --prefix=$INSTALL_DIR && make && make install
56 Ok, this was very optimistic. This try will probably have ended with
60 If your OS lets you install additional packages from a software reposi-
61 tory, you may get away with installing the missing packages. When the
62 packages are installed, run configure again and try to compile again.
63 Below you find some hints on getting your OS ready for the rrdtool com-
64 pilation. Additions to this list are welcome.
68 Just add a compiler and the gnome development package:
70 pkg install sunstudioexpress
71 pkg install SUNWgnome-common-devel
74 xrender is required for compilation with cairo. This is not true and
75 also bad since opensolaris does not include an _\bx_\br_\be_\bn_\bd_\be_\br_\b._\bp_\bc file. Use
76 perl to fix this:
78 perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc
82 Use apt-get to make sure you have all that is required. A number of
83 packages will get added through dependencies.
85 apt-get install libpango1.0-dev libxml2-dev
88 But again this may have been too optimistic still, and you actually
89 have to compile your own copies of some of the required libraries.
90 Things like libpng and zlib are pretty standard so you will probably
91 have them on your system anyway. Freetype, Fontinst, Cairo, Pango may
92 be installed, but it is possible that they are pretty old and thus
93 don't live up to the expectations, so you may want to compile their
94 latest versions.
98 If you are woking with AIX, you may find the the -\b--\b-d\bdi\bis\bsa\bab\bbl\ble\be-\b-s\bsh\bha\bar\bre\bed\bd
99 option will cause things to break for you. In that case you may have to
100 install the shared libraries into the rrdtool PREFIX and work with
103 Another hint to get rrdtool working on AIX is to use the IBM XL C Com-
104 piler:
106 export CC=/usr/vac/bin/cc
107 export PERLCC=$CC
109 (Better instructions for AIX welcome!)
113 In order to build the libraries you need a compiler on your system.
114 Unfortunately compilers are not all alike. This has an effect on the
115 CFLAGS you want to set. The examples below are for the popular GCC com-
116 piler suite. If you have an other compile you have to use the follow-
117 ing settings:
119 Sun Forte
120 CFLAGS="-xO3 -kPIC"
122 Some libraries want to know where other libraries are. For this to
123 work, set the following environamen variable
125 export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
126 export PATH=$INSTALL_DIR/bin:$PATH
128 Since we are compiling libraries dynamically, you they must further
129 know where to find each other. This is done by setting an appropri-
130 ate LDFLAG. Unfortunatly the syntax differs from system to system:
132 Solaris
133 export LDFLAGS=-R${INSTALL_DIR}/lib
135 Linux
136 export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
138 If you are on a 64bit platform, but would like to continue to
139 use the rrd files created on your old 32bit linux, you may be
140 able
142 HPUX
143 export LDFLAGS="+b${INSTALL_DIR}/lib"
145 AIX
146 export LDFLAGS="-Wl,-blibpath:${INSTALL_DIR}/lib"
148 If you have GNUmake installed and it is not called 'make', then do
150 export MAKE=gmake
151 export GNUMAKE=gmake
153 otherwhise just do
155 export MAKE=make
157 Building zlib
158 Chances are very high that you already have that on your system ...
160 cd $BUILD_DIR
161 wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
162 gunzip -c zlib-1.2.3.tar.gz | tar xf -
163 cd zlib-1.2.3
164 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --shared
165 $MAKE
166 $MAKE install
168 Building libpng
169 Libpng itself requires zlib to build, so we need to help a bit. If
170 you already have a copy of zlib on your system (which is very lik-
171 ley) you can drop the settings of LDFLAGS and CPPFLAGS. Note that
172 the backslash (\) at the end of line 4 means that line 4 and line 5
173 are on one line.
175 cd $BUILD_DIR
176 wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
177 gunzip -c libpng-1.2.18.tar.gz | tar xf -
178 cd libpng-1.2.10
179 env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
180 $MAKE
181 $MAKE install
183 Building freetype
184 cd $BUILD_DIR
185 wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz
186 gunzip -c freetype-2.3.5.tar.gz | tar xf -
187 cd freetype-2.3.5
188 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
189 $MAKE
190 $MAKE install
192 If you run into problems building freetype on Solaris, you may want
193 to try to add the following at the start the configure line:
195 env EGREP=egrep
197 Building LibXML2
198 cd $BUILD_DIR
199 wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-sources-2.6.31.tar.gz
200 gunzip -c libxml2-sources-2.6.32.tar.gz | tar xf -
201 cd libxml2-sources-2.6.32
202 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
203 $MAKE
204 $MAKE install
206 Building fontconfig
207 Note that fontconfig has a runtime configuration file in
208 INSTALL_DIR/etc you may want to adjust that so that fontconfig
209 finds the fonts on your system. Run the fc-cache program to build
210 the fontconfig cache after changeing the config file.
212 cd $BUILD_DIR
213 wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
214 gunzip -c fontconfig-2.4.2.tar.gz | tar xf -
215 cd fontconfig-2.4.2
216 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
217 $MAKE
218 $MAKE install
220 Building Pixman
221 cd $BUILD_DIR
222 wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
223 gunzip -c pixman-0.10.0.tar.gz | tar xf -
224 cd fontconfig-2.4.2
225 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
226 $MAKE
227 $MAKE install
229 Building Cairo
230 cd $BUILD_DIR
231 wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
232 gunzip -c cairo-1.4.10.tar.gz | tar xf -
233 cd cairo-1.4.10
234 ./configure --prefix=$INSTALL_DIR \
235 --enable-xlib=no \
236 --enable-xlib-render=no \
237 --enable-win32=no \
238 CFLAGS="-O3 -fPIC"
239 $MAKE
240 $MAKE install
242 Building Glib
243 cd $BUILD_DIR
244 wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
245 gunzip -c glib-2.12.13.tar.gz | tar xf -
246 cd glib-2.12.13
247 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
248 $MAKE
249 $MAKE install
251 Building Pango
252 cd $BUILD_DIR
253 wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.gz
254 gunzip -c pango-1.21.1.tar.gz | tar xf -
255 cd pango-1.21.1
256 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
257 $MAKE
258 $MAKE install
260 Now all the dependent libraries are built and you can try again. This
261 time you tell configure where it should be looking for libraries and
262 include files. This is done via environment variables. Depending on the
263 shell you are running, the syntax for setting environment variables is
264 different.
266 And finally try building again. We disable the python and tcl bindings
267 because it seems that a fair number of people have ill configured
268 python and tcl setups that would prevent rrdtool from building if they
269 are included in their current state.
271 cd $BUILD_DIR/rrdtool-1.3rc4
272 ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
273 $MAKE clean
274 $MAKE
275 $MAKE install
277 SOLARIS HINT: if you want to build the perl module for the native perl
278 (the one shipping with solaris) you will need the sun forte compiler
279 installed on your box or you have to hand-tune bind-
280 ings/perl-shared/Makefile while building!
282 Now go to _\b$_\bI_\bN_\bS_\bT_\bA_\bL_\bL_\b__\bD_\bI_\bR/\b/s\bsh\bha\bar\bre\be/\b/r\brr\brd\bdt\bto\boo\bol\bl/\b/e\bex\bxa\bam\bmp\bpl\ble\bes\bs/\b/ and run them to see if
283 your build has been successful.
286 Tobias Oetiker <tobi@oetiker.ch>
290 1.3rc4 2008-05-18 RRDBUILD(1)