[Nagiosplug-help] Can't compile check_pgsql on OS X

Mark Duling mark.duling at biola.edu
Mon Nov 15 23:56:56 CET 2010


I am trying to enable check_pgsql on OS X, and I can't get the configure
script to recognize my postgresql 9.0 install even though I've hacked my
configure script to have the correct paths.

But before I get too deep into that, I tried to compile check_pgsql manually

cd nagios-plugins-1.4.15/plugins

make check_pgsql LDFLAGS="-L/opt/local/lib -L/opt/local/lib/postgresql90"
CPPFLAGS="-I. -I/opt/local/include -I/opt/local/include/postgresql90 -I../gl
-I../lib" CFLAGS="-I. -I/opt/local/include

When I do that I get this:

cc -I. -I/opt/local/include -I/opt/local/include/postgresql90 -I.
-I/opt/local/include -I/opt/local/include/postgresql90 -I../gl
-I../lib -L/opt/local/lib -L/opt/local/lib/postgresql90  check_pgsql.c   -o
In file included from check_pgsql.c:36:
utils.h:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
utils.h:64: error: redefinition of ‘struct timeval’
utils.h:71: warning: ‘struct timezone’ declared inside parameter list
utils.h:71: warning: its scope is only this definition or declaration, which
is probably not what you want
In file included from check_pgsql.c:38:
netutils.h:91: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘socket_timeout_alarm_handler’
check_pgsql.c: In function ‘main’:
check_pgsql.c:146: error: ‘LC_ALL’ undeclared (first use in this function)
check_pgsql.c:146: error: (Each undeclared identifier is reported only once
check_pgsql.c:146: error: for each function it appears in.)
check_pgsql.c:159: error: ‘timeout_alarm_handler’ undeclared (first use in
this function)
check_pgsql.c: In function ‘process_arguments’:
check_pgsql.c:246: error: ‘NP_VERSION’ undeclared (first use in this
check_pgsql.c: In function ‘print_help’:
check_pgsql.c:422: error: ‘NP_VERSION’ undeclared (first use in this
make: *** [check_pgsql] Error 1

Does anyone know what might be causing the build problem?  Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20101115/51a643e8/attachment.html>

More information about the Help mailing list