Compiling w/ DB support

Joe Rhett jrhett at isite.net
Thu Nov 20 19:33:52 CET 2003


You need to compile and install mysql, then point those variables to the
installation directories.  For it to use mysql, you'll need a working mysql
daemon running, and (binary) shared libraries for nagios to use.

If you don't know how to install mysql, back up and use files instead.  The
mysql documentation is practically non-existant.  If you're not comfortable
with mysql you'll get lost quickly.

On Wed, Nov 19, 2003 at 05:52:18PM -0700, Jamie Bohr wrote:
> Silly question, now that I downloaded the source for MySQL where do I
> point --with-mysql-lib and --with-mysql-inc to?  The downloaded source
> for MySQL is in /tmp/mysql, the mysql.h file is located in
> /tmp/mysql/include/mysql.h.  I tried to use "--with-mysql-inc=/tmp
> --with-mysql-lib=/tmp" along with other  directories but nothing seemed
> to help.  I am not a compiler person so I'm not sure why "/tmp" did not
> work.  I copied the contents of /tmp/mysql/include to /tmp/mysql/mysql
> but now make complains "mysql_version.h: No such file or directory" - is
> true there is no mysql_version.h file, there is a mysql_version.h.in
> file.  Arg, this should not be that difficult.  I am using MySQL 3.23.58
> if that makes a difference.
> 
> On Wed, 2003-11-19 at 15:26, Marc Powell wrote:
> > > -----Original Message-----
> > > From: Jamie Bohr [mailto:jbohr at cos.agilent.com]
> > > Sent: Wednesday, November 19, 2003 4:17 PM
> > > To: nagios-users at lists.sourceforge.net
> > > 
> > > I get an error what I try to compile Nagios to use a MySQL data base,
> > > any ideas as to why?  The configure command I ran is "./configure
> > > --with-mysql-xdata  --with-mysql-status --with-mysql-retention
> > > --with-mysql-extinfo" then I do a make all and I get the following
> > > error:
> > > 
> > > # make all
> > > cd ./base && make
> > > make[1]: Entering directory `/tmp/nagios/base'
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o checks.o checks.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o config.o config.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o commands.o commands.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o flapping.o flapping.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o logging.o logging.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o notifications.o
> > > notifications.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o sehandlers.o sehandlers.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o utils.o utils.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o sretention.o sretention.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o perfdata.o perfdata.c
> > > gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE  nagios.c checks.o config.o
> > > commands.o flapping.o logging.o notifications.o sehandlers.o utils.o
> > > sretention.o ../xdata/xrddb.c ../common/comments.c ../xdata/xcddb.c
> > > ../common/objects.c ../xdata/xodtemplate.c ../common/statusdata.c
> > > ../xdata/xsddb.c perfdata.o ../xdata/xpddefault.c ../common/downtime.c
> > > ../xdata/xdddb.c    -lm -o nagios
> > > ../xdata/xrddb.c:41:25: mysql/mysql.h: No such file or directory
> > > 
> > > This is just the start of a very long list or error messages.  Any
> > clues
> > > as to why?  A pointer to documentation would be great.
> > 
> > The reason is right above -- mysql/mysql.h: No such file or directory.
> > Gcc can't find the mysql lib or include files. You'll need to specify
> > the path to them with the --with-mysql-lib and --with-mysql-inc
> > configure directives. Note that nagios is going to append /mysql to
> > whatever paths you specify.
> > 
> > --
> > Marc
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > Does SourceForge.net help you be more productive?  Does it
> > help you create better code?  SHARE THE LOVE, and help us help
> > YOU!  Click Here: http://sourceforge.net/donate/
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> > ::: Messages without supporting info will risk being sent to /dev/null
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

-- 
Joe Rhett                                                      Chief Geek
JRhett at Isite.Net                                      Isite Services, Inc.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list