RHEL 6.4 (32-bit)
Nagios Core 3.4.4
Nagios Plugins 1.4.16
First:
Installing the php-gd and gd RPMs and configuring with
Code: Select all
./configure --with-command-group=nagcmd --with-gd-lib=/usr/lib --with-gd-include=/usr/include
At least partially because nothing was placed into the /usr/include directory....*** GD, PNG, and/or JPEG libraries could not be located... *********
Boutell's GD library is required to compile the statusmap, trends
and histogram CGIs. Get it from http://www.boutell.com/gd/, compile
it, and use the --with-gd-lib and --with-gd-inc arguments to specify
the locations of the GD library and include files.
...
So, Second:
I pulled down the libgd 2.1.0 RC1 source and installed it into /usr/local/libgd-2.1.0-rc1 with symlinks in /usr/local/bin to /usr/local/libgd-2.1.0-rc1/bin/*.
I also created an /etc/ld.so.conf.d/libgd-2.1.0-rc1.conf file with contents "/usr/local/libgd-2.1.0-rc1/lib" and ran 'ldconfig' before trying again. The contents of /usr/local/libgd-2.1.0-rc1/include look ok,
andentities.h
gdcache.h
gd_color_map.h
gd_errors.h
gdfontg.h
gdfontl.h
gdfontmb.h
gdfonts.h
gdfontt.h
gdfx.h
gd.h
gd_io.h
gdpp.h
Code: Select all
./configure --with-command-group=nagcmd --with-gd-lib=/usr/local/libgd-2.1.0-rc1/lib --with-gd-include=/usr/local/libgd-2.1.0-rc1/include
But 'make all' gets to,checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... yes
GD library was found!
and then ends with a string of errors and warnings (below). The config.{log,status} files contain the mention of the "--with-gd-include=/usr/local/libgd-2.1.0-rc1/include" config option but the compilation errors indicate that directory isn't being searched.gcc -Wall -g -O2 -DHAVE_CONFIG_H -DNSCGI -L/usr/local/libgd-2.1.0-rc1/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 -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
I think there's something relatively simple I'm overlooking here. Can anyone offer any suggestions? Thanks.
D.
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 error: ?background_image? undeclared (first use in this function)
statusmap.c error: (Each undeclared identifier is reported only once
statusmap.c error: for each function it appears in.)
statusmap.c warning: implicit declaration of function ?load_image_from_file?
statusmap.c warning: implicit declaration of function ?gdImageDestroy?
statusmap.c: In function ?draw_background_image?:
statusmap.c error: ?background_image? undeclared (first use in this function)
statusmap.c warning: implicit declaration of function ?gdImageCopy?
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c: In function ?draw_hosts?:
statusmap.c error: ?logo_image? undeclared (first use in this function)
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c warning: implicit declaration of function ?gdImageArc?
statusmap.c warning: implicit declaration of function ?gdImageFillToBorder?
statusmap.c error: ?unknown_logo_image? undeclared (first use in this function)
statusmap.c: In function ?draw_text?:
statusmap.c error: ?gdFontSmall? undeclared (first use in this function)
statusmap.c warning: implicit declaration of function ?gdImageFilledRectangle?
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c warning: implicit declaration of function ?gdImageString?
statusmap.c: In function ?draw_host_text?:
statusmap.c error: ?gdFontSmall? undeclared (first use in this function)
statusmap.c: In function ?draw_line?:
statusmap.c warning: implicit declaration of function ?gdImageLine?
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c: In function ?draw_dotted_line?:
statusmap.c error: ?gdTransparent? undeclared (first use in this function)
statusmap.c warning: implicit declaration of function ?gdImageSetStyle?
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c error: ?gdStyled? undeclared (first use in this function)
statusmap.c: In function ?draw_dashed_line?:
statusmap.c error: ?gdTransparent? undeclared (first use in this function)
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c error: ?gdStyled? undeclared (first use in this function)
statusmap.c: In function ?initialize_graphics?:
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c warning: implicit declaration of function ?gdImageCreateTrueColor?
statusmap.c warning: implicit declaration of function ?gdImageColorAllocate?
statusmap.c warning: implicit declaration of function ?gdImageColorTransparent?
statusmap.c warning: implicit declaration of function ?gdImageFill?
statusmap.c warning: implicit declaration of function ?gdImageInterlace?
statusmap.c error: ?unknown_logo_image? undeclared (first use in this function)
statusmap.c: At top level:
statusmap.c error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?load_image_from_file?
statusmap.c: In function ?write_graphics?:
statusmap.c warning: implicit declaration of function ?gdImagePng?
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c: In function ?cleanup_graphics?:
statusmap.c error: ?map_image? undeclared (first use in this function)
statusmap.c: In function ?draw_circular_layer_markup?:
statusmap.c error: ?map_image? undeclared (first use in this function)
make[1]: *** [statusmap.cgi] Error 1
make[1]: Leaving directory `/usr/local/src/nagios/cgi'
make: *** [all] Error 2