can't add GD2 to nagios config path and the make cgi fails

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ofillmore
Posts: 3
Joined: Mon Sep 10, 2012 10:11 am

can't add GD2 to nagios config path and the make cgi fails

Post by ofillmore »

Hello,

I am currently trying to get Nagios Core 3.4.1 to install on OSX 10.8 using the following install/tutorial guide but am running into errors on the "make all" command. The tutorial is listed here:

http://www.mactech.com/articles/mactech ... index.html

Here is what I get in the terminal when I run the command. I cant seem to get add the GD2 path to the nagios config file...my gut is that this is the problem.

Code: Select all

Starmac:nagios orionfillmore$ make all
cd ./base && make
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o broker.o broker.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o nebmods.o nebmods.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o ../common/shared.o ../common/shared.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o checks.o checks.c
checks.c: In function ‘run_async_service_check’:
checks.c:519: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
checks.c:519: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
checks.c:823: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
checks.c:823: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
checks.c: In function ‘run_async_host_check_3x’:
checks.c:3100: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
checks.c:3100: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
checks.c:3225: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
checks.c:3225: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o config.o config.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o commands.o commands.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o events.o events.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o flapping.o flapping.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o logging.o logging.c
logging.c: In function ‘log_debug_info’:
logging.c:530: warning: format ‘%06lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
logging.c:530: warning: format ‘%06lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o macros-base.o ../common/macros.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o netutils.o netutils.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o notifications.o notifications.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o sehandlers.o sehandlers.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o skiplist.o ../common/skiplist.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE   -c -o utils.o utils.c
utils.c: In function ‘service_check_sighandler’:
utils.c:1857: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
utils.c:1857: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
utils.c: In function ‘host_check_sighandler’:
utils.c:1897: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
utils.c:1897: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__darwin_suseconds_t’
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o retention-base.o sretention.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o xretention-base.o ../xdata/xrddefault.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o comments-base.o ../common/comments.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o xcomments-base.o ../xdata/xcddefault.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o objects-base.o ../common/objects.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o xobjects-base.o ../xdata/xodtemplate.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o statusdata-base.o ../common/statusdata.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o xstatusdata-base.o ../xdata/xsddefault.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o perfdata-base.o perfdata.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o xperfdata-base.o ../xdata/xpddefault.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o downtime-base.o ../common/downtime.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -c -o xdowntime-base.o ../xdata/xdddefault.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o ../common/shared.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o netutils.o notifications.o sehandlers.o skiplist.o utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o     -L/opt/local/lib  -lm  -lpthread -ldl 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCORE -o nagiostats nagiostats.c -L/opt/local/lib -lm 
cd ./cgi && make
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI   -c -o getcgi.o getcgi.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI   -c -o cgiutils.o cgiutils.c
cgiutils.c: In function ‘include_ssi_files’:
cgiutils.c:1500: warning: unused variable ‘x’
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI   -c -o cgiauth.o cgiauth.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o macros-cgi.o ../common/macros.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o skiplist.o ../common/skiplist.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o objects-cgi.o ../common/objects.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o xobjects-cgi.o ../xdata/xodtemplate.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o statusdata-cgi.o ../common/statusdata.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o xstatusdata-cgi.o ../xdata/xsddefault.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o comments-cgi.o ../common/comments.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -c -o downtime-cgi.o ../common/downtime.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o avail.cgi avail.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI   -c -o extcmd_list.o extcmd_list.c
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o cmd.cgi cmd.c extcmd_list.o ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o   
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o config.cgi config.c  ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o extinfo.cgi extinfo.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o   
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o history.cgi history.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o notifications.cgi notifications.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o outages.cgi outages.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o  
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o showlog.cgi showlog.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o status.cgi status.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o  
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o statuswml.cgi statuswml.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o summary.cgi summary.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o tac.cgi tac.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o  
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o statuswrl.cgi statuswrl.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lm 
gcc -Wall -g -O2 -I/opt/local -DHAVE_CONFIG_H -DNSCGI -L/opt/local/lib -o statusmap.cgi statusmap.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lgd -liconv -lpng -ljpeg -lz -lm 
statusmap.c:39:54: error: gd.h: No such file or directory
statusmap.c:40:61: error: gdfonts.h: No such file or directory
statusmap.c:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘load_image_from_file’
statusmap.c:159: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unknown_logo_image’
statusmap.c:160: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘logo_image’
statusmap.c:161: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘map_image’
statusmap.c:162: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘background_image’
statusmap.c: In function ‘load_background_image’:
statusmap.c:1380: error: ‘background_image’ undeclared (first use in this function)
statusmap.c:1380: error: (Each undeclared identifier is reported only once
statusmap.c:1380: error: for each function it appears in.)
statusmap.c:1380: warning: implicit declaration of function ‘load_image_from_file’
statusmap.c:1390: warning: implicit declaration of function ‘gdImageDestroy’
statusmap.c: In function ‘draw_background_image’:
statusmap.c:1404: error: ‘background_image’ undeclared (first use in this function)
statusmap.c:1408: warning: implicit declaration of function ‘gdImageCopy’
statusmap.c:1408: error: ‘map_image’ undeclared (first use in this function)
statusmap.c: In function ‘draw_hosts’:
statusmap.c:1617: error: ‘logo_image’ undeclared (first use in this function)
statusmap.c:1621: error: ‘map_image’ undeclared (first use in this function)
statusmap.c:1708: warning: implicit declaration of function ‘gdImageArc’
statusmap.c:1726: warning: implicit declaration of function ‘gdImageFillToBorder’
statusmap.c:1786: error: ‘unknown_logo_image’ undeclared (first use in this function)
statusmap.c: In function ‘draw_text’:
statusmap.c:1846: error: ‘gdFontSmall’ undeclared (first use in this function)
statusmap.c:1849: warning: implicit declaration of function ‘gdImageFilledRectangle’
statusmap.c:1849: error: ‘map_image’ undeclared (first use in this function)
statusmap.c:1850: warning: implicit declaration of function ‘gdImageString’
statusmap.c: In function ‘draw_host_text’:
statusmap.c:1902: error: ‘gdFontSmall’ undeclared (first use in this function)
statusmap.c: In function ‘draw_line’:
statusmap.c:2043: warning: implicit declaration of function ‘gdImageLine’
statusmap.c:2043: error: ‘map_image’ undeclared (first use in this function)
statusmap.c: In function ‘draw_dotted_line’:
statusmap.c:2054: error: ‘gdTransparent’ undeclared (first use in this function)
statusmap.c:2067: warning: implicit declaration of function ‘gdImageSetStyle’
statusmap.c:2067: error: ‘map_image’ undeclared (first use in this function)
statusmap.c:2070: error: ‘gdStyled’ undeclared (first use in this function)
statusmap.c: In function ‘draw_dashed_line’:
statusmap.c:2083: error: ‘gdTransparent’ undeclared (first use in this function)
statusmap.c:2093: error: ‘map_image’ undeclared (first use in this function)
statusmap.c:2096: error: ‘gdStyled’ undeclared (first use in this function)
statusmap.c: In function ‘initialize_graphics’:
statusmap.c:2118: error: ‘map_image’ undeclared (first use in this function)
statusmap.c:2118: warning: implicit declaration of function ‘gdImageCreateTrueColor’
statusmap.c:2124: warning: implicit declaration of function ‘gdImageColorAllocate’
statusmap.c:2141: warning: implicit declaration of function ‘gdImageColorTransparent’
statusmap.c:2144: warning: implicit declaration of function ‘gdImageFill’
statusmap.c:2148: warning: implicit declaration of function ‘gdImageInterlace’
statusmap.c:2157: error: ‘unknown_logo_image’ undeclared (first use in this function)
statusmap.c: At top level:
statusmap.c:2165: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘load_image_from_file’
statusmap.c: In function ‘write_graphics’:
statusmap.c:2218: warning: implicit declaration of function ‘gdImagePng’
statusmap.c:2218: error: ‘map_image’ undeclared (first use in this function)
statusmap.c: In function ‘cleanup_graphics’:
statusmap.c:2234: error: ‘map_image’ undeclared (first use in this function)
statusmap.c: In function ‘draw_circular_layer_markup’:
statusmap.c:2810: error: ‘map_image’ undeclared (first use in this function)
make[1]: *** [statusmap.cgi] Error 1
make: *** [all] Error 2
Any and all help is greatly appreciated as I have hit a wall and not sure what to do at this point.

Thanks in advance.
Locked