FAQ that covers build and install problems
How do i build perfparse?
./configure && make && make install
Not that short:
A normal build if Nagios is placed in, say, /usr/local/bin:
Further options are possible. These are listed using:
After make you can either:
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.
When I try and run make all , I get a "undefined reference to `gdImageString'" error
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/
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.
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:
When i try to compile, i get errors like:
perfparse-0.105.5/perfparse/storage.c:269: undefined reference to `g_path_get_basename'
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".
When i compile i get errors: "ld: cannot find -lXpm". But i have a libXpm.so.4!
You need the libXpm.so. Usually you forgot to install a devel packet like xorg-x11-devel.
What are the pre-requesite to compile Perfparse ?
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
Compilation problems on Solaris ( Text relocation remains referenced against symbol offset in file /usr/local/mysql/lib/libmysqlclient.a(client.o))
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.
I get the error message: "libtool: install: error: cannot install `libpp_storage_mysql.la' to a directory not ending in /usr/local/nagios/lib"
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.