さくらインターネットでrrdtool 1.2系

rrdtoolの1.3系のコンパイルが私の力ではまだできていないので、とりあえず1.2系。
(glib? pango あたりがうまく通らない)

さくらインターネット内のサーバで必要なライブラリは以下のようですので、rrdtoolの配布先から合わせてとってきます。
libpng (http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz)
libart (http://oss.oetiker.ch/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz)

まずlibpngから。


$ mkdir $HOME/local/rrd
$ wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
$ tar xzvf libpng-1.2.18.tar.gz
$ cd libpng-1.2.18
$ ./configure --prefix=$HOME/local/rrd
$ make
$ make check
...
==================
All 1 tests passed
==================
$ make install

次、libart。


$ wget http://oss.oetiker.ch/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz
$ tar xzvf libart_lgpl-2.3.17.tar.gz
$ cd libart_lgpl-2.3.17
$ ./configure --prefix=$HOME/local/rrd
$ make
$ make install

最後にrrdtool
ざっと試した限りでは、、以下バージョンどれでもmakeまではOKでした。
rrdtool-1.2.15
rrdtool-1.2.27
rrdtool-1.2.28


$ wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.28.tar.gz
$ tar xzvf rrdtool-1.2.28.tar.gz
$ cd rrdtool-1.2.28
$ LDFLAGS="-L$HOME/local/rrd/lib" \
> CPPFLAGS="-I$HOME/local/rrd/include/libart-2.0" \
> ./configure --prefix=$HOME/local/rrd --disable-tcl --disable-python --disable-ruby
...

                                                                                                                              • -

Config is DONE!

With MMAP IO: yes
Perl Modules: perl_piped perl_shared
Perl Binary: $HOME/local/bin/perl
Perl Version: 5.10.0
Perl Options: PREFIX=$HOME/local/rrd LIB=$HOME/local/rrd/lib/perl/5.10.0
Ruby Modules: ruby
Ruby Binary: /usr/local/bin/ruby
Ruby Options: sitedir=$(DESTDIR)$HOME/local/rrd/lib/ruby
Build Tcl Bindings: no
Build Python Bindings: no
Build rrdcgi: yes
Build librrd MT: yes


Type 'make' to compile the software and use 'make install' to
install everything to: $HOME/local/rrd.

... that wishlist is NO JOKE. If you find RRDtool useful
make me happy. Go to http://tobi.oetiker.ch/wish and
place an order.

-- Tobi Oetiker

                                                                                                                              • -

make
make install

起動


$ ~/local/rrd/bin/rrdtool
RRDtool 1.2.28 Copyright 1997-2008 by Tobias Oetiker
Compiled Sep 18 2008 02:42:57

Usage: rrdtool [options] command command_options

Valid commands: create, update, updatev, graph, dump, restore,
last, lastupdate, first, info, fetch, tune,
resize, xport

RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html)

For more information read the RRD manpages
$ ldd ~/local/rrd/bin/rrdtool
$HOME/local/rrd/bin/rrdtool:
librrd.so.2 => $HOME/local/rrd/lib/librrd.so.2 (0x28074000)
libart_lgpl_2.so.5 => $HOME/local/rrd/lib/libart_lgpl_2.so.5 (0x280ba000)
libpng12.so.0 => /$HOME/local/rrd/lib/libpng12.so.0 (0x280ce000)
libm.so.4 => /lib/libm.so.4 (0x280ee000)
libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x28104000)
libz.so.3 => /lib/libz.so.3 (0x2816e000)
libc.so.6 => /lib/libc.so.6 (0x2817e000)

とりあえず、完了。