[Nagios-devel] bug: cgi compilation fails with gd library version 1.7.3

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
Guest

[Nagios-devel] bug: cgi compilation fails with gd library version 1.7.3

Post by Guest »

statusmap.cgi fails to compile:

gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI statusmap.c getcgi.o cgiutils.o auth.o popen.o ../common/objects.c ../xdata/xodtemplate.c ../common/statusdata.c
../xdata/xsddefault.c -lgd -lz -lm -lpng -ljpeg edata.o ../xdata/xedtemplate.c -o statusmap.cgi
statusmap.c: In function `load_image_from_file':
statusmap.c:2192: warning: assignment makes pointer from integer without a cast
/tmp/ccJptAaG.o: In function `load_image_from_file':
/home/vsanz/nagios-1.0b3/cgi/statusmap.c:2192: undefined reference to `gdImageCreateFromJpeg'
collect2: ld returned 1 exit status
make: *** [statusmap.cgi] Error 1

System: Debian GNU 2.2 Potato.

Documentation says gd library 1.6.3 or higher is required by CGIs, but jpeg support is included only after versions >=1.8

A suggested solution is check the version of the gd library and drop jpeg support when needed. (Sorry, but I don't have the autoconf skills ).

A workaround: comment offending lines in statusmap.c:

/* else if(!strcasecmp(ext,".jpg") || !strcasecmp(ext,".jpeg"))
im=gdImageCreateFromJpeg(fp);
*/


Regards.






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: msanzg@equifax.e
Locked