b284bde7db59541718ee2b177b3241f3100e7abb
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 third 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.3.2
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.3.2.tar.gz
52 gunzip -c rrdtool-1.3.2.tar.gz | tar xf -
53 cd rrdtool-1.3.2
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.
66 Additions to this list are welcome. In general rrdtool should work with
67 the latest versions of the libraries. The versions listed here are just
68 what was current when I tested this.
72 Just add a compiler and the gnome development package:
74 pkg install sunstudioexpress
75 pkg install SUNWgnome-common-devel
78 der is required for compilation with cairo. This is not true and also
79 bad since OpenSolaris does not include an _\bx_\br_\be_\bn_\bd_\be_\br_\b._\bp_\bc file. Use Perl to
80 fix this:
82 perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc
84 Make sure rrdtool finds your new compiler
86 export PATH=/opt/SunStudioExpress/bin
88 Since there does not seem to be a viable msgfmt tool on OpenSolaris
89 (short of installing it yourself). You have to call configure with the
91 --disable-libintl
93 option.
97 Use apt-get to make sure you have all that is required. A number of
98 packages will get added through dependencies.
100 apt-get install libpango1.0-dev libxml2-dev
106 system. The only thing you should care about are USE flags, which allow
107 you fine tune features rrdtool will be built with. Currently the fol-
108 lowing USE flags are available:
110 doc - install .html and .txt documentation
111 into /usr/share/doc/rrdtool-1.x.xx/
112 perl - build and install perl language bindings
113 python - build and install python language bindings
114 ruby - build and install ruby language bindings
115 tcl - build and install tcl language bindings
116 rrdcgi - build and install rrdcgi
118 After you've decided which USE flags you need, set them either in
119 _\bm_\ba_\bk_\be_\b._\bc_\bo_\bn_\bf or _\b/_\be_\bt_\bc_\b/_\bp_\bo_\br_\bt_\ba_\bg_\be_\b/_\bp_\ba_\bc_\bk_\ba_\bg_\be_\b._\bu_\bs_\be and finally run:
121 # emerge -va rrdtool
123 Take a look at Gentoo handbook for further details on how to manage USE
124 flags: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2
127 But again this may have been too optimistic still, and you actually
128 have to compile your own copies of some of the required libraries.
129 Things like libpng and zlib are pretty standard so you will probably
130 have them on your system anyway. Freetype, Fontinst, Cairo, Pango may
131 be installed, but it is possible that they are pretty old and thus
132 don't live up to our expectations, so you may want to compile their
133 latest versions.
137 If you are working with AIX, you may find the -\b--\b-d\bdi\bis\bsa\bab\bbl\ble\be-\b-s\bsh\bha\bar\bre\bed\bd option
138 will cause things to break for you. In that case you may have to
139 install the shared libraries into the rrdtool PREFIX and work with
142 Another hint to get rrdtool working on AIX is to use the IBM XL C Com-
143 piler:
145 export CC=/usr/vac/bin/cc
146 export PERLCC=$CC
148 (Better instructions for AIX welcome!)
152 Some libraries want to know where other libraries are. For this to
153 work, set the following environment variable
155 export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
156 export PATH=$INSTALL_DIR/bin:$PATH
159 find instructions on how to compile pkgconfig.
161 Since we are compiling libraries dynamically, they must know where to
162 find each other. This is done by setting an appropriate LDFLAGS. Unfor-
163 tunately, the syntax again differs from system to system:
165 Solaris
166 export LDFLAGS=-R${INSTALL_DIR}/lib
168 if you are using the Sun Studio/Forte compiler, you may also want
169 to set
171 CFLAGS="-xO3 -xcode=pic13" (SPARC)
172 CFLAGS="-xO3 -Kpic" (x86)
174 Linux
175 export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
177 HPUX
178 export LDFLAGS="+b${INSTALL_DIR}/lib"
180 AIX
181 export LDFLAGS="-Wl,-blibpath:${INSTALL_DIR}/lib"
183 If you have GNU make installed and it is not called 'make', then do
185 export MAKE=gmake
186 export GNUMAKE=gmake
188 otherwise just do
190 export MAKE=make
194 As mentioned above, without pkgconfig the whole build process will be
195 lots of pain and suffering, so make sure you have a copy on your sys-
196 tem. If it is not available natively, here is how to compile it.
198 wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
199 gunzip -c pkg-config-0.23.tar.gz | tar xf -
200 cd pkg-config-0.23
201 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
202 $MAKE
203 $MAKE install
205 After installing pkgconfig in a custom directory, setting up the corre-
206 sponding environment variable will be helpful.
208 export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
212 Chances are very high that you already have that on your system ...
214 cd $BUILD_DIR
215 wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
216 gunzip -c zlib-1.2.3.tar.gz | tar xf -
217 cd zlib-1.2.3
218 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --shared
219 $MAKE
220 $MAKE install
224 Libpng itself requires zlib to build, so we need to help a bit. If you
225 already have a copy of zlib on your system (which is very likely) you
226 can drop the settings of LDFLAGS and CPPFLAGS. Note that the backslash
227 (\) at the end of line 4 means that line 4 and line 5 are on one line.
229 cd $BUILD_DIR
230 wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
231 gunzip -c libpng-1.2.18.tar.gz | tar xf -
232 cd libpng-1.2.10
233 env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
234 $MAKE
235 $MAKE install
239 cd $BUILD_DIR
240 wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz
241 gunzip -c freetype-2.3.5.tar.gz | tar xf -
242 cd freetype-2.3.5
243 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
244 $MAKE
245 $MAKE install
247 If you run into problems building freetype on Solaris, you may want to
248 try to add the following at the start the configure line:
250 env EGREP=egrep
254 cd $BUILD_DIR
255 wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
256 gunzip -c libxml2-2.6.32.tar.gz | tar xf -
257 cd libxml2-2.6.32
258 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
259 $MAKE
260 $MAKE install
264 Note that fontconfig has a run time configuration file in
265 INSTALL_DIR/etc you may want to adjust that so that fontconfig finds
266 the fonts on your system. Run the fc-cache program to build the font-
267 config cache after changing the config file.
269 cd $BUILD_DIR
270 wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
271 gunzip -c fontconfig-2.4.2.tar.gz | tar xf -
272 cd fontconfig-2.4.2
273 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config
274 $MAKE
275 $MAKE install
279 cd $BUILD_DIR
280 wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
281 gunzip -c pixman-0.10.0.tar.gz | tar xf -
282 cd pixman-0.10.0
283 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
284 $MAKE
285 $MAKE install
289 cd $BUILD_DIR
290 wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
291 gunzip -c cairo-1.6.4.tar.gz | tar xf -
292 cd cairo-1.4.10
293 ./configure --prefix=$INSTALL_DIR \
294 --enable-xlib=no \
295 --enable-xlib-render=no \
296 --enable-win32=no \
297 CFLAGS="-O3 -fPIC"
298 $MAKE
299 $MAKE install
303 cd $BUILD_DIR
304 wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
305 gunzip -c glib-2.15.4.tar.gz | tar xf -
306 cd glib-2.15.4
307 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
308 $MAKE
309 $MAKE install
313 cd $BUILD_DIR
314 wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
315 bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
316 cd pango-1.21.1
317 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
318 $MAKE
319 $MAKE install
321 B\bBu\bui\bil\bld\bdi\bin\bng\bg r\brr\brd\bdt\bto\boo\bol\bl (\b(s\bse\bec\bco\bon\bnd\bd t\btr\bry\by)\b)
323 Now all the dependent libraries are built and you can try again. This
324 time you tell configure where it should be looking for libraries and
325 include files. This is done via environment variables. Depending on the
326 shell you are running, the syntax for setting environment variables is
327 different.
329 And finally try building again. We disable the python and tcl bindings
330 because it seems that a fair number of people have ill configured
331 python and tcl setups that would prevent rrdtool from building if they
332 are included in their current state.
334 cd $BUILD_DIR/rrdtool-1.3.2
335 ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
336 $MAKE clean
337 $MAKE
338 $MAKE install
340 SOLARIS HINT: if you want to build the Perl module for the native Perl
341 (the one shipping with Solaris) you will need the Sun Forte compiler
342 installed on your box or you have to hand-tune bind-
343 ings/perl-shared/Makefile while building!
345 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
346 your build has been successful.
349 Tobias Oetiker <tobi@oetiker.ch>
353 1.3.99909060808 2008-12-26 RRDBUILD(1)