Nagios and GD compiling issue
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Wed Mar 26 02:51:41 CET 2003
Dear Sir,
I am writing to thank you for your letter and say,
On Tue, Mar 25, 2003 at 03:07:16PM -0800, jark wrote:
> I have successfully setup Nagios on a SuSE 8.1 box and got it all up
> and running, with one exception: statusmap. I have installed GB,
> libpng, libjpeg and zlib, all without issue. In fact, a number of other
> applications are using them fine.
>
> If I run ./configure as follows then I get an error during compile:
>
> ./configure --prefix=/usr/local/nagios --with-mysql-xdata
> --with-mysql-status --with-mysql-comments --with-mysql-retention
> --with-mysql-downtime --with-htmurl=/nagios --with-cgiurl=/cgi-bin
> --disable-statuswrl --with-gd-lib=../gd-2.0.11
> --with-gd-inc=../gd-2.0.11
>
> The error that I get during compile is as follows:
>
> gcc -g -O2 -I../gd-2.0.11 -DHAVE_CONFIG_H -DNSCGI -L../gd-2.0.11
> -lmysqlclient statusmap.c getcgi.o cgiutils.o auth.o popen.o
> ../common/objects.c ../xdata/xodtemplate.c ../common/statusdata.c
> ../xdata/xsddb.c -lgd -lz -lm -lpng -ljpeg edata.o ../xdata/xeddb.c -o
> statusmap.cgi
> /tmp/ccs1Eh2T.o: In function `load_image_from_file':
> /home/jark/nagios-1.0/cgi/statusmap.c:2220: undefined reference to
> `gdImageCreateFromPng'
> /tmp/ccs1Eh2T.o: In function `write_graphics':
> /home/jark/nagios-1.0/cgi/statusmap.c:2253: undefined reference to
> `gdImagePng'
> collect2: ld returned 1 exit status
> make[1]: *** [statusmap.cgi] Error 1
> make[1]: Leaving directory `/home/jark/nagios-1.0/cgi'
> make: *** [all] Error 2
>
> If I run ./configure as follows then it can not locate GD, even though
> it does reside there:
>
> ./configure --prefix=/usr/local/nagios --with-mysql-xdata
> --with-mysql-status --with-mysql-comments --with-mysql-retention
> --with-mysql-downtime --with-htmurl=/nagios --with-cgiurl=/cgi-bin
> --disable-statuswrl --with-gd-lib=/usr/local/lib
> --with-gd-inc=/usr/local/include
>
> Any ideas how I can get GD compiled in to this properly, so that I can
> use the status map and other areas of Nagios that require GD?
>
that unfortunately, Nagios may not work with gd-2.0.x.
Most people are using gd-1.8.x I think.
You can find out if your gd library has the function the linker
is complaining about with 'nm'.
eg for my Nag systems gd-1.8.4 in /usr/local/lib. Yours is probably
somewehere else.
tsitc> nm /usr/local/lib/libgd.so.2 | grep gdImageCreateFromPng
000083c0 T gdImageCreateFromPng
00008404 T gdImageCreateFromPngCtx
000080f4 T gdImageCreateFromPngSource
tsitc>
If your library does not show a symbol type of T, it is not going to
work and you have located a bug.
If that is the case, please let the list know.
It should be possible to build Nagios with an older gd library but I
don't know how to do that without the possibility of negative impact on
your other applications.
>
> Regards,
>
> Scott
>
Yours sincerely.
--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------
'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'
from Meditation 17, J Donne.
-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list