Build and Install

FAQ that covers build and install problems



Question: How do i build perfparse?
Answer  Short:

./configure && make && make install

Not that short:

A normal build if Nagios is placed in, say, /usr/local/bin:

./configure \
--prefix=/usr/local/nagios \
--with-imagedir=/usr/local/nagios/share/images/ \
--with-cgidir=/usr/local/nagios/sbin \

Further options are possible. These are listed using:

./configure --help

After make you can either:

make install


make install-strip

The latter provides smaller binary files which therefore load through a http server faster. However they do not contain any debugging information which can be used if the program crashes.

Question: When I try and run make all , I get a "undefined reference to `gdImageString'" error
Answer  The gd library is probably not installed yet on your system. Or you are missing the development package such as libgd-devel or libgd-dev.

Install gd and try again.

libgd is available on http://www.boutell.com/gd/Question
Question: When I run make all, I get the following: config_file.c:40:18: glib.h: No such file or directory config_file.c: In function 'config_argv': followed by a few other errors and warnings, then it errors out.
Answer  You have to install the glib2-devel package. On rpm based systems, you can check this with
rpm -qa |grep glib2-devel
Some distributions install glib2 in unusual places. To find out where your glib2 is, try this:
rpm -ql glib2-devel | grep glib.h
and use the path you found here in your perfparse configure script. Example for Suse:
... --with-glib12=/opt/gnome/include/glib-2.0

Question: When i try to compile, i get errors like: perfparse-0.105.5/perfparse/storage.c:269: undefined reference to `g_path_get_basename'
Answer  Try this:
cd perfparse
copy & paste the "/bin/sh ../libtool ...." line and add "/opt/gnome/lib64/libglib-2.0.so" at the end. The path may vary. Try to find the libglib-2.0.so. Then try again with "make".
Question: When i compile i get errors: "ld: cannot find -lXpm". But i have a libXpm.so.4!
Answer  You need the libXpm.so. Usually you forgot to install a devel packet like xorg-x11-devel.
Question: What are the pre-requesite to compile Perfparse ?
Answer  You will need :
- glib-2.X (glib-1.X also works, but there is a compatibility layer)
- mysql-4.0.X (or 4.1.X but the development team has not tested 4.1.X yet)
- pkg-config (for use to check glib)
- libgd (>= 2.X even if some users have managed to use an older version)

Solaris users should also read this.
Question: Compilation problems on Solaris ( Text relocation remains referenced against symbol offset in file /usr/local/mysql/lib/libmysqlclient.a(client.o))
Answer  This is because the mysql package is compiled with one other compiler then GCC. Compile mysql from source or use another package. You may also try to compile perfparse with the same compiler mysql was compiled.
Question: I get the error message: "libtool: install: error: cannot install `libpp_storage_mysql.la' to a directory not ending in /usr/local/nagios/lib"
Answer  This is because you did a configure && make without a prefix and then tried with prefix. Do a "make clean" and try again with prefix.


redflo, 14:25 UTC, Sun 10 of Apr, 2005: No, lneuxyuhje, this shall write to a pipe not to a file and so ">" is o.k.
lneuxyuhje, 15:14 UTC, Thu 07 of Apr, 2005: is ">" meant to be ">>" in /usr/local/perfparse/bin/perfparse_nagios_pipe_command.pl ?
redflo, 08:35 UTC, Tue 05 of Apr, 2005: fhdplbvjipsld, it works now. Permissions were wrong.
fhdplbvjipsld, 14:42 UTC, Wed 30 of Mar, 2005: How to post to Forums->Help?
benclewett, 09:27 UTC, Thu 03 of Feb, 2005: Hi Jon! I hope you like our wiki site.