RRDtool - Rrdbuild
RRDtool - Rrdbuild
RRDtool - rrdbuild
Swiss Original. Mirrors: UK TW DE US
rrdbuild
OVERVIEW
If you downloaded the source of RRDtool you have to compile it. This document will give some information on how this is done. RRDtool relies on services of third part libraries. Some of these libraries may already be installed on your system. You have to compile copies of the other ones before you can build RRDtool. This document will tell you about all the necessary steps to get going. These instructions assume you are using a bash shell. If you use csh/tcsh, then you can either type bash to switch to bash for the compilation or if you know what you are doing just replace the export bits with setenv. We further assume that your copies of tar and make are actually GNU tar and GNU make installed as gtar and gmake on your system.
Web ei
Genaue Telefonsu
Nagio
www.re alstu
ELUGA
sm artphon
OPTIMISTIC BUILD
Before you start to build RRDtool, you have to decide two things: 1. In which directory you want to build the software. 2. Where you want to install the software. Once you have decided. Save the two locations into environment variables.
B U I L D _ D I R = / I N S T A L L _ D I R = / / d bid / d 1 . 4 . 5
Tutorials Programming Bugs, Wiki Support Gallery Projects using RRDtool Sponsoring RRDtool License Cast
If your /tmp is mounted with the option noexec (RHEL seems todo that) you have to choose a diffe Now make sure the BUILD_DIR exists and go there:
Web oss.oetiker.ch d i - $ B U I L D _ D I R c d$ B U I L D _ D I R
Google Search
Gold Sponsors
Lets first assume you already have all the necessary libraries pre-installed.
g e h g c d : / / d 1 . 4 . 5 a .eie. c h / d 1 . 4 . 5 .a. g / b / d a f1 . 4 . 5 .a. g
i c d
Ok, this was very optimistic. This try will probably have ended with configure complaining about s
.mrtg.org/rrdtool/doc/rrdbuild.en.html 1/8
3/28/12
RRDtool - rrdbuild
INSTALLING DEPENDENCIES
Silver Sponsors ...
If your OS lets you install additional packages from a software repository, you may get away with i When the packages are installed, run configure again and try to compile again. Below you find so for compiling RRDtool.
Additions to this list are welcome. In general RRDtool should work with the latest versions of the li are just what was current when I tested this.
bandwidth by Init7
OpenSolaris 2008.05
Just add a compiler and the gnome development package:
gi gi a a S U N W g d ie e c e d ee
There is a problem with cairo.pc on OpenSolaris. It suggests that xrender is required for compilat also bad since OpenSolaris does not include an render.pc file. Use Perl to fix this:
e i - e'/ ( R e ie. * ? ) \* ed e. * / $ 1 / '/ /i b / g c f i g / c a i .c
Make sure the RRDtool build system finds your new compiler
e P A T H = / / S S d iE e / b i
Debian / Ubuntu
Use apt-get to make sure you have all that is required. A number of packages will get added throu
a g e i a i bag1 . 0 d e i b 2 d e
Gentoo
In Gentoo installing RRDtool is really simple you just need to emerge rrdtool. All dependencies w
portage system. The only thing you should care about are USE flags, which allow you fine tune fea Currently the following USE flags are available:
.mrtg.org/rrdtool/doc/rrdbuild.en.html 2/8
3/28/12
RRDtool - rrdbuild
dc
-i i
a /
. h
ad.
/h ae / dc / d a a a a a e
e h b c
d c g i-bidadi
d c g i
After you've decided which USE flags you need, set them either in make.conf or /etc/portage/pac
#eeg e-a d
Take a look at Gentoo handbook for further details on how to manage USE flags: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2
BUILDING DEPENDENCIES
But again this may have been too optimistic still, and you actually have to compile your own copie Things like libpng and zlib are pretty standard so you will probably have them on your system anyw Pango may be installed, but it is possible that they are pretty old and thus don't live up to our expe compile their latest versions.
If you are working with AIX, you may find the --disable-shared option will cause things to break fo
P E R L C C = $ C C
Build Instructions
Some libraries want to know where other libraries are. For this to work, set the following environm
e e P K G _ C O N F I G _ P A T H = $I N S T A L L _ D I R/i b / g c f i g P A T H = $ I N S T A L L _ D I R / b i: $ P A T H
The above relies on the presence of the pkgconfig program. Below you find instructions on how to
Since we are compiling libraries dynamically, they must know where to find each other. This is do LDFLAGS. Unfortunately, the syntax again differs from system to system: Solaris
.mrtg.org/rrdtool/doc/rrdbuild.en.html 3/8
3/28/12
RRDtool - rrdbuild
L D F L A G S = R $I N S T A L L _ D I R/i b
if you are using the Sun Studio/Forte compiler, you may also want to set
C F L A G S = " -O 3-cd e =i c 1 3 " C F L A G S = " -O 3Ki c " ( S P A R C ) (8 6 )
Linu
e L D F L A G S = " W, - ahW, $I N S T A L L _ D I R/i b "
HPUX
e L D F L A G S = " + b $I N S T A L L _ D I R/i b "
AIX
e L D F L A G S = " W, bi bah : $I N S T A L L _ D I R/i b "
If you have GNU make installed and it is not called 'make', then do
e e M A K E = gae G N U M A K E = gae
otherwise just do
e M A K E =ae
Building pkgconfig As mentioned above, without pkgconfig the whole build process will be lots of pain and suffering, your system. If it is not available natively, here is how to compile it.
g e h g c d : / / g c f i g . fe e d e g c f i g 0 . 2 3 .a. g . g /ee ae/ g c f i g 0 . 2 3 .a. g a f-
i c
g c f i g 0 . 2 3
. / c f i g e- e f i= $ I N S T A L L _ D I RC F L A G S = " O 3f P I C " $ M A K E $ M A K Ei a
After installing pkgconfig in a custom directory, setting up the corresponding environment variable
e P K G _ C O N F I G = $ I N S T A L L _ D I R / b i/ g c f i g
.mrtg.org/rrdtool/doc/rrdbuild.en.html
4/8
3/28/12
RRDtool - rrdbuild P K G _ C O N F I G = $ I N S T A L L _ D I R / b i/ g c f i g
Building lib Chances are very high that you already have that on your system ...
c d$ B U I L D _ D I R g e h g c d : / / .eie. c h / d a / b /i b/ i b 1 . 2 . 3 .a. g f-
i c
i b 1 . 2 . 3 .a. g
i b 1 . 2 . 3
. / c f i g e- e f i= $ I N S T A L L _ D I RC F L A G S = " O 3f P I C "-h ae d $ M A K E $ M A K Ei a
Building libpng
Libpng itself requires zlib to build, so we need to help a bit. If you already have a copy of zlib on yo you can drop the settings of LDFLAGS and CPPFLAGS. Note that the backslash (\) at the end of are on one line.
c d$ B U I L D _ D I R g e h g : / / .eie. c h / d / b /i b/i b g 1 . 2 . 1 8 .a. g a f-
i c i b g 1 . 2 . 1 8 .a. g
c d i b g 1 . 2 . 1 0 e C F L A G S = " O 3f P I C ". / c f i g e- e f i= $ I N S T A L L _ D I R
$ M A K E $ M A K Ei a
Building freet pe
i cfe e
c dfe e
e 2 . 3 . 5
. / c f i g e- e f i= $ I N S T A L L _ D I RC F L A G S = " O 3f P I C " $ M A K E $ M A K Ei a
If you run into problems building freetype on Solaris, you may want to try to add the following at the
e E G R E P = e ge
Building LibXML2
c d$ B U I L D _ D I R
.mrtg.org/rrdtool/doc/rrdbuild.en.html
g e h
: / /
.eie. c h / d
/ b /i b/i b
2 2 . 6 . 3 2 .a. g
5/8
3/28/12
g e h g
/ b /i b/i b a f-
2 2 . 6 . 3 2 .a. g
i c i b
2 2 . 6 . 3 2 .a. g
c d i b
2 2 . 6 . 3 2
. / c f i g e- e f i= $ I N S T A L L _ D I RC F L A G S = " O 3f P I C " $ M A K E $ M A K Ei a
Building fontconfig
Note that fontconfig has a run time configuration file in INSTALL_DIR/etc you may want to adjust th fonts on your system. Run the fc-cache program to build the fontconfig cache after changing the co
c d$ B U I L D _ D I R g e h g : / / .eie. c h / d c f i g 2 . 4 . 2 .a. g / b /i b/ f a fc f i g 2 . 4 . 2 .a. g
i cf
c df
c f i g 2 . 4 . 2
. / c f i g e- e f i= $ I N S T A L L _ D I RC F L A G S = " O 3f P I C "-ih fe e $ M A K E $ M A K Ei a
e c f i g = $ I N S
Building Pi man
i c i a0 . 1 0 . 0 .a. g
c d i a0 . 1 0 . 0 . / c f i g e- e f i= $ I N S T A L L _ D I RC F L A G S = " O 3f P I C " $ M A K E $ M A K Ei a
Building Cairo
c d$ B U I L D _ D I R g e h g : / / .eie. c h / d / b /i b/ c a i 1 . 6 . 4 .a. g a f-
i cc a i 1 . 6 . 4 .a. g
c dc a i 1 . 6 . 4 . / c f i g e- e f i= $ I N S T A L L _ D I R\ ea be - i b = \ \
ea be - i b -ed e= ea be -i3 2 = \
C F L A G S = " O 3f P I C " $ M A K E $ M A K Ei a
.mrtg.org/rrdtool/doc/rrdbuild.en.html
6/8
3/28/12
RRDtool - rrdbuild . / c f i g e- e f i= $ I N S T A L L _ D I R\
ea be - i b =
\ \
ea be - i b -ed e= ea be -i3 2 = \
C F L A G S = " O 3f P I CD _ P O S I X _ P T H R E A D _ S E M A N T I C S "
Building Glib
c d$ B U I L D _ D I R g e h g : / / .eie. c h / d / b /i b/ gi b 2 . 1 5 . 4 .a. g a f-
i cgi b 2 . 1 5 . 4 .a. g
Building Pango
Now all the dependent libraries are built and you can try again. This time you tell configure where and include files. This is done via environment variables. Depending on the shell you are running, variables is different.
And finally try building again. We disable the python and tcl bindings because it seems that a fair configured python and tcl setups that would prevent RRDtool from building if they are included in t
c d$ B U I L D _ D I R / d 1 . 4 . 5 h
. / c f i g e- e f i= $ I N S T A L L _ D I Rd ia be -c d ia be $ M A K Ece a $ M A K E $ M A K Ei a
SOLARIS HINT: if you want to build the Perl module for the native Perl (the one shipping with Sola compiler installed on your box or you have to hand-tune bindings/perl-shared/Makefile while buildi Now go to $INSTALL_DIR/share/rrdtool/e amples/ and run them to see if your build has been
AUTHOR
.mrtg.org/rrdtool/doc/rrdbuild.en.html 7/8
3/28/12
RRDtool - rrdbuild
.mrtg.org/rrdtool/doc/rrdbuild.en.html
8/8