Core 3.4.4 statusmap compilation, RHEL 6.4

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
winters
Posts: 2
Joined: Tue May 28, 2013 5:05 pm

Core 3.4.4 statusmap compilation, RHEL 6.4

Post by winters »

Hi. I'm getting errors compiling the statusmap. Looks like it boils down to 'make all' not finding a pair (so far) of libgd .h files.

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
resulted in,
*** 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.

...
At least partially because nothing was placed into the /usr/include directory....

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,
entities.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
and

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
completes, even contains the lines,
checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... yes
GD library was found!
But 'make all' gets to,
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
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.

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: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[1]: Leaving directory `/usr/local/src/nagios/cgi'
make: *** [all] Error 2
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Core 3.4.4 statusmap compilation, RHEL 6.4

Post by slansing »

Have you tried installing the devel versions of those packages? The headers may be incorrect or missing:

Code: Select all

yum install gd-devel
winters
Posts: 2
Joined: Tue May 28, 2013 5:05 pm

Re: Core 3.4.4 statusmap compilation, RHEL 6.4

Post by winters »

Well. This is embarrassing. I suspected the answer might be something small I'd overlooked but not that small and easily corrected. It's up and running now, thank you very much!


D.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Core 3.4.4 statusmap compilation, RHEL 6.4

Post by abrist »

Great! Locking the thread!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked