RRDBUILD(1)

πŸ› οΈ rrdbuild(1) β€” building RRDtool, a girl's guide πŸ’…

okay so you're holding the manual page for rrdbuild (that's the rrdtool manual, bestie, in case the header wasn't obvious) β€” and it's literally just Instructions for building RRDtool. welcome to the build era of your life ✨


🌸 NAME 🌸

rrdbuild β€” Instructions for building RRDtool


πŸ¦‹ OVERVIEW πŸ¦‹

so you downloaded the RRDtool source? iconic. now you gotta compile it, and this doc is gonna walk you through the whole thing, no cap.

RRDtool leans on services from third-party libraries. some of these might already be chilling on your system, lucky you πŸ“ β€” but the rest? you gotta compile your own copies of those before RRDtool will even consider building.

This document tells you about all the necessary steps to get going. all of them. every single one. periodt.

Quick assumptions check, bestie 🫢 β€” these instructions assume you're using a bash shell. if you're on csh/tcsh, you can either type bash to switch over for the compilation, or β€” if you know what you're doing β€” just replace the export bits with setenv.

We also assume your copies of tar and make are actually GNU tar and GNU make respectively. ngl, it's possible they're installed as gtar and gmake on your system instead, so do a vibe check πŸ‘€


✨ OPTIMISTIC BUILD ✨

Before you start building RRDtool, you gotta decide two things β€” main character decisions only:

  1. In which directory you want to build the software.
  2. Where you want to install the software.

Once you've decided (slay), save the two locations into environment variables:

BUILD_DIR=/tmp/rrdbuild
INSTALL_DIR=/opt/rrdtool-1.11.0
🚨 heads up: if your /tmp is mounted with the option noexec (RHEL seems to do that 😭), you have to choose a different directory!

Now make sure the BUILD_DIR exists and go there:

mkdir -p $BUILD_DIR
cd $BUILD_DIR

Let's first assume you already have all the necessary libraries pre-installed πŸ™ˆ (we're being delusional and hopeful):

wget https://github.com/oetiker/rrdtool-1.x/releases/download/v1.11.0/rrdtool-1.11.0.tar.gz
gunzip -c rrdtool-1.11.0.tar.gz | tar xf -
cd rrdtool-1.11.0
./configure --prefix=$INSTALL_DIR && make && make install

Ok. that was very optimistic. πŸ’€ This try will probably have ended with configure complaining about several missing libraries. not me getting read to filth by a configure script.


πŸŽ€ INSTALLING DEPENDENCIES πŸŽ€

If your OS lets you install additional packages from a software repository, you may get away with just installing the missing packages. Once they're installed, run configure again and try to compile again β€” rinse, repeat, you got this πŸ’ͺ

Below you'll find some hints on getting your OS ready for compiling RRDtool:

Additions to this list are welcome 🫢 In general RRDtool should work with the latest versions of the libraries. The versions listed here are just what was current when I tested this.


🌈 OpenSolaris 2008.05

Just add a compiler and the gnome development package:

pkg install sunstudioexpress
pkg install SUNWgnome-common-devel

There's a problem with cairo.pc on OpenSolaris 😭 It suggests that xrender is required for compilation with cairo. This is not true β€” and it's also bad, since OpenSolaris does not include an xrender.pc file. Use Perl to fix this:

perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc

Make sure the RRDtool build system finds your new compiler:

export PATH=/opt/SunStudioExpress/bin

πŸ’œ Debian / Ubuntu

Use apt-get to make sure you have all that is required. A number of packages will get added through dependencies (the friend group expands automatically, love that for us):

apt-get install autoconf autopoint build-essential dc
apt-get install groff-base libtool libpango1.0-dev libxml2-dev
apt-get install python3-dev python3-setuptools

🧚 Gentoo

In Gentoo, installing RRDtool is really simple β€” you just need to emerge rrdtool. All dependencies will be handled automatically by the portage system. iconic behaviour tbh πŸ‘‘

The only thing you should care about are USE flags, which let you fine tune the features RRDtool will be built with. Currently the following USE flags are available:

  • doc β€” install .html and .txt documentation into /usr/share/doc/rrdtool-1.x.xx/
  • perl β€” build and install perl language bindings
  • python β€” build and install python language bindings
  • ruby β€” build and install ruby language bindings
  • tcl β€” build and install tcl language bindings
  • rrdcgi β€” build and install rrdcgi

After you've decided which USE flags you need, set them either in make.conf or /etc/portage/package.use, and finally run:

# emerge -va rrdtool

Take a look at the 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 πŸ”¨

Okay so bestie… but like, what if even that was too optimistic? 😭 Yeah. Sometimes you genuinely gotta compile your own copies of the required libraries, no cap. Stuff like libpng and zlib is pretty standard so you'll probably have them on your system anyway. Freetype, Fontinst, Cairo, Pango may be installed already β€” but it's possible they're pretty old and thus don't live up to our expectations, so you may want to compile their latest versions. Vibe check your library versions, fr fr. πŸ’…


πŸ–₯️ General build tips for AIX

So if you're working with AIX, you may find the --disable-shared option will cause things to break for you. Not cute. In that case you may have to install the shared libraries into the RRDtool PREFIX and work with --disable-static instead. Switcheroo. πŸ’«

Another hint to get RRDtool working on AIX is to use the IBM XL C Compiler:

export CC=/usr/vac/bin/cc
export PERLCC=$CC

(Better instructions for AIX welcome! 🫢 We're literally asking, bestie.)


πŸ› οΈ Build Instructions

Some libraries want to know where other libraries are. For this to work, set the following environment variable:

export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
export PATH=$INSTALL_DIR/bin:$PATH

The above relies on the presence of the pkgconfig program. Below you find instructions on how to compile pkgconfig. πŸ‘‘

Since we are compiling libraries dynamically, they must know where to find each other. This is done by setting an appropriate LDFLAGS. Unfortunately, the syntax again differs from system to system β€” it's giving chaos, honestly πŸ™ˆ:

Solaris

export LDFLAGS=-R${INSTALL_DIR}/lib

if you are using the Sun Studio/Forte compiler, you may also want to set

CFLAGS="-xO3 -xcode=pic13"   (SPARC)
CFLAGS="-xO3 -Kpic"          (x86)

Linux

export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"

HPUX

export LDFLAGS="+b${INSTALL_DIR}/lib"

AIX

export LDFLAGS="-Wl,-blibpath:${INSTALL_DIR}/lib"

If you have GNU make installed and it is not called 'make', then do

export MAKE=gmake
export GNUMAKE=gmake

otherwise just do

export MAKE=make

πŸ“¦ Building pkgconfig

As mentioned above, without pkgconfig the whole build process will be lots of pain and suffering 😭 so make sure you have a copy on your system. If it is not available natively, here is how to compile it. You got this.

wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
gunzip -c pkg-config-0.23.tar.gz | tar xf -
cd pkg-config-0.23
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install

After installing pkgconfig in a custom directory, setting up the corresponding environment variable will be helpful. πŸ’–

export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config

πŸ—œοΈ Building zlib

Chances are very high that you already have that on your system ... πŸ‘€

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
gunzip -c zlib-1.2.3.tar.gz | tar xf -
cd zlib-1.2.3
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --shared
$MAKE
$MAKE install

πŸ–ΌοΈ Building libpng

Libpng itself requires zlib to build, so we need to help a bit. If you already have a copy of zlib on your system (which is very likely) you can drop the settings of LDFLAGS and CPPFLAGS. Note that the backslash (\) at the end of lines means that the command is split over multiple lines. ⭐

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
gunzip -c libpng-1.2.18.tar.gz | tar xf -
cd libpng-1.2.18
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
$MAKE
$MAKE install

πŸ”€ Building freetype

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz
gunzip -c freetype-2.3.5.tar.gz | tar xf -
cd freetype-2.3.5
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install

If you run into problems building freetype on Solaris, you may want to try to add the following at the start the configure line:

env EGREP=egrep

πŸ“œ Building LibXML2

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
gunzip -c libxml2-2.6.32.tar.gz | tar xf -
cd libxml2-2.6.32
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install

πŸ…°οΈ Building fontconfig

Note that fontconfig has a run time configuration file in INSTALL_DIR/etc β€” you may want to adjust that so that fontconfig finds the fonts on your system. Heads up! Run the fc-cache program to build the fontconfig cache after changing the config file. πŸŽ€

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
gunzip -c fontconfig-2.4.2.tar.gz   | tar xf -
cd fontconfig-2.4.2
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config
$MAKE
$MAKE install

🎨 Building Pixman

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
gunzip -c pixman-0.10.0.tar.gz  | tar xf -
cd pixman-0.10.0
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install

🌈 Building Cairo

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
gunzip -c cairo-1.6.4.tar.gz   | tar xf -
cd cairo-1.6.4
./configure --prefix=$INSTALL_DIR \
   --enable-xlib=no \
   --enable-xlib-render=no \
   --enable-win32=no \
   CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install

When building on Solaris you may want to do

./configure --prefix=$INSTALL_DIR \
   --enable-xlib=no \
   --enable-xlib-render=no \
   --enable-win32=no \
   CFLAGS="-O3 -fPIC -D_POSIX_PTHREAD_SEMANTICS"

🧡 Building Glib

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
gunzip -c glib-2.15.4.tar.gz  | tar xf -
cd glib-2.15.4
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install

πŸ¦‹ Building Pango

cd $BUILD_DIR
wget https://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
cd pango-1.21.1
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
$MAKE
$MAKE install

πŸ” Building rrdtool (second try)

Now all the dependent libraries are built and you can try again. Round two, bestie! πŸ₯Š This time you tell configure where it should be looking for libraries and include files. This is done via environment variables. Depending on the shell you are running, the syntax for setting environment variables is different. (iykyk πŸ˜…)

And finally try building again. We disable the python and tcl bindings because it seems that a fair number of people have ill configured python and tcl setups that would prevent RRDtool from building if they are included in their current state. πŸ’€

cd $BUILD_DIR/rrdtool-1.11.0
./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
$MAKE clean
$MAKE
$MAKE install
SOLARIS HINT: if you want to build the Perl module for the native Perl (the one shipping with Solaris) you will need the Sun Forte compiler installed on your box or you have to hand-tune bindings/perl-shared/Makefile while building!

Now go to $INSTALL_DIR/share/rrdtool/examples/ and run them to see if your build has been successful. πŸ‘‘βœ¨ main character energy only 🌈


πŸ‘‘ AUTHOR

Tobias Oetiker <tobi@oetiker.ch>


And that's the whole page, bestie β€” this was RRDBUILD(1) from RRDtool 1.11.0, dated 2026-10-17. Go forth and compile, you absolute icon. πŸ’œπŸ«ΆπŸŽ€

πŸ“¦ where this page comes from