<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18783"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>OK, for future reference. If anyone has problems 
compiling Nagios 3.1.x on Centos 3 (I know, I know, it's ancient, but it still 
works, and it is still supported), here is what to do. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>Download the latest tarball of gd at <A 
href="http://www.libgd.org/Downloads">http://www.libgd.org/Downloads</A> and 
install it to a location like /opt:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>./configure --prefix=/opt </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>Then compile Nagios pointing to that 
location:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>./configure --with-gd-lib=/opt/lib 
--with-gd-inc=/opt/include</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>This avoids having to remove the old version of gd, 
which will bring you dependency hell.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>Kind regards,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009>Tom</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=555315505-24062009></SPAN></FONT> </DIV>
<DIV> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Tom DE BLENDE (DHL GBS) 
[mailto:tom.deblende@dhl.com] <BR><B>Sent:</B> Tuesday, June 23, 2009 
08:32<BR><B>To:</B> nagios-users@lists.sourceforge.net<BR><B>Subject:</B> 
[Nagios-users] Nagios 3.1.1 compile fails on Centos-3<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>Hi 
all,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>This is where the 
compiler craps out:</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>cd ./base && 
make<BR>make[1]: Entering directory 
`/usr/src/install/nagios/nagios-3.1.1/base'<BR>make[1]: Nothing to be done for 
`all'.<BR>make[1]: Leaving directory 
`/usr/src/install/nagios/nagios-3.1.1/base'<BR>cd ./cgi && 
make<BR>make[1]: Entering directory 
`/usr/src/install/nagios/nagios-3.1.1/cgi'<BR>gcc -g -O2 -DHAVE_CONFIG_H 
-DNSCGI  -o statusmap.cgi statusmap.c 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 
<BR>statusmap.c: In function `initialize_graphics':<BR>statusmap.c:2111: 
warning: assignment makes pointer from integer without a 
cast<BR>/tmp/ccNrEvP7.o(.text+0x33f0): In function 
`initialize_graphics':<BR>/usr/src/install/nagios/nagios-3.1.1/cgi/statusmap.c:2111: 
undefined reference to `gdImageCreateTrueColor'<BR>collect2: ld returned 1 exit 
status<BR>make[1]: *** [statusmap.cgi] Error 1<BR>make[1]: Leaving directory 
`/usr/src/install/nagios/nagios-3.1.1/cgi'<BR>make: *** [all] Error 
2</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>Configure showed no 
problems with gd:</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>[me@box 
nagios-3.1.1]# ./configure | grep gd<BR>checking for gdImagePng in -lgd (order 
1)... no<BR>checking for gdImagePng in -lgd (order 2)... yes</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>This what I have 
from gd on my box:</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>[me@box 
nagios-3.1.1]# rpm -qa | grep 
gd<BR>gdbm-1.8.0-20<BR>sysklogd-1.4.1-26_EL3<BR>libgdiplus-1.2.3-0.rhel3.novell<BR>gd-1.8.4-12.3.1<BR>libgdiplus-debuginfo-1.2.3-0.rhel3.novell<BR>gdb-6.3.0.0-1.138.el3<BR>gdbm-devel-1.8.0-20<BR>gdk-pixbuf-0.22.0-13.el3.3<BR>gd-devel-1.8.4-12.3.1<BR>gdm-2.4.1.6-18.el3</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=783432206-23062009>I'm running a fully 
upgraded Centos-3. Any ideas?</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009>Thanks,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN 
class=783432206-23062009>Tom</SPAN></FONT></DIV>
<P class=MsoNormal> </P>
<DIV> </DIV></BODY></HTML>