Compiling Nagios with PostgreSQL

Andreas Ericsson ae at op5.se
Thu Dec 2 23:59:44 CET 2004


swaugh at reachusa.com wrote:
> Nagios version 1.2
> PostgreSQL version 8.0.0beta5
> Fedora Core version 2.6.5-1.358
> 

A not-so wild guess here is that the library versions of postgresql and 
invocation syntax (and possibly names) of various functions has changed 
sufficiently enough betweek 7.x.x and 8.x(beta) to cause the errors 
shown below.

As a rule of thumb, most programs don't compile well along with bleeding 
edge major releases (a 'major' being one where the first digit is 
incremented) of other software with which it was previously compatible.

I suggest you downgrade PostgreSQL to latest 7.4, install 
postgresql-devel and its dependencies and try again.

> I am trying to compile Nagios with PostgreSQL support and when I run 'make 
> all' after running through the configure script I get the following 
> output:
> 
> sretention.o(.text+0x27): In function `save_state_information':
> /nagios/nagios-1.2/base/sretention.c:86: undefined reference to 
> `xrddefault_save_state_information'
> sretention.o(.text+0x87): In function `read_initial_state_information':
> /nagios/nagios-1.2/base/sretention.c:122: undefined reference to 
> `xrddefault_read_state_information'
> /tmp/ccdEBQIe.o(.text+0x3c6): In function `xrddb_connect':
> ../xdata/xrddb.c:268: undefined reference to `PQconnectdb'
> /tmp/ccdEBQIe.o(.text+0x3d3):../xdata/xrddb.c:270: undefined reference to 
> `PQstatus'
> /tmp/ccdEBQIe.o(.text+0x3f0):../xdata/xrddb.c:272: undefined reference to 
> `PQfinish'
> /tmp/ccdEBQIe.o(.text+0x449): In function `xrddb_disconnect':
> ../xdata/xrddb.c:304: undefined reference to `PQstatus'
> /tmp/ccdEBQIe.o(.text+0x45d):../xdata/xrddb.c:305: undefined reference to 
> `PQfinish'
> /tmp/ccdEBQIe.o(.text+0x479): In function `xrddb_query':
> ../xdata/xrddb.c:334: undefined reference to `PQexec'
> /tmp/ccdEBQIe.o(.text+0x490):../xdata/xrddb.c:335: undefined reference to 
> `PQresultStatus'
> /tmp/ccdEBQIe.o(.text+0x4a6):../xdata/xrddb.c:335: undefined reference to 
> `PQresultStatus'
> /tmp/ccdEBQIe.o(.text+0x4c6):../xdata/xrddb.c:336: undefined reference to 
> `PQclear'
> /tmp/ccdEBQIe.o(.text+0x4e1): In function `xrddb_free_query_memory':
> ../xdata/xrddb.c:363: undefined reference to `PQclear'
> /tmp/ccdEBQIe.o(.text+0xe71): In function 
> `xrddb_read_program_information':
> ../xdata/xrddb.c:873: undefined reference to `PQntuples'
> /tmp/ccdEBQIe.o(.text+0xe91): In function 
> `xrddb_read_program_information':
> /usr/include/stdlib.h:382: undefined reference to `PQgetvalue'
> 
> There are more errors before it quits, but they are all undefined 
> reference errors.  Any help or ideas on what is wrong would be greatly 
> appreciated.
> 
> 
> Sean Waugh
> Network Specialist
> Reach USA
> swaugh at reachusa.com
> (513) 794-4165

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
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