Makefile GD lib problem on Centos 4 (aka RHES4)

Luke Johnson luke at rushmore.com
Thu Jun 16 21:35:29 CEST 2005


Hi,

I've setup a few Nagios boxes in years past, and trying it again today, 
however I'm running into a (first time for me, but I'm sure common) 
problem with GD libs on Centos 4 (x86_64, Which should be identical to 
Redhat ES 4).  In the past I've hand compiled GD, but on this box I made 
sure to install the necessary packages (info attached below).

I'm pretty dang sure I got all the libs (gd/png/jpeg) in all the right 
places (also below), I've double checked my /etc/ld.so.conf, I've 
specified the lib paths in the ./configure... and still the ./configure 
says:

checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... no
checking for gdImagePng in -lgd (order 3)... no
checking for gdImagePng in -lgd (order 4)... no

I glared at the Makefile for a bit, but hopefully the mail list will be 
a bit faster...

Any thoughts on why I can't get these dang libs included with my nagios 
would be great.  Thanks,
Luke

My attachments (sorry for the length)
1-location of all the actual libs
2-contents of /etc/ld.so.conf
3- yum's info on my installed packages
4-full output of my ./configure run...

------------------------------------------------

[root at chilkat nagios-2.0b3]# locate libgd.so
/usr/lib/libgd.so.2
/usr/lib/libgd.so.2.0.0
/usr/lib64/libgd.so.2
/usr/lib64/libgd.so.2.0.0
/usr/lib64/libgd.so

[root at chilkat nagios-2.0b3]# locate libpng.so
/usr/lib/libpng.so.2
/usr/lib/libpng.so.3.1.2.7
/usr/lib/libpng.so.2.1.0.16
/usr/lib/libpng.so.3
/usr/lib64/libpng.so.2
/usr/lib64/libpng.so.3.1.2.7
/usr/lib64/libpng.so.2.1.0.16
/usr/lib64/libpng.so.3

[root at chilkat nagios-2.0b3]# locate libjpeg.so
/usr/lib/libjpeg.so.62
/usr/lib/libjpeg.so.62.0.0
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.0.0

[root at chilkat nagios-2.0b3]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/X11R6/lib64
/usr/lib
/usr/lib64

[root at chilkat nagios-2.0b3]# yum info gd-devel
Installed Packages
Name   : gd-devel
Arch   : x86_64
Version: 2.0.28
Release: 4
Size   : 351 k
Repo   : installed
Summary: The development libraries and header files for gd.

[root at chilkat nagios-2.0b3]# yum info libjpeg
Installed Packages
Name   : libjpeg
Arch   : i386
Version: 6b
Release: 33
Size   : 245 k
Repo   : installed
Summary: A library for manipulating JPEG image format files.

Name   : libjpeg
Arch   : x86_64
Version: 6b
Release: 33
Size   : 277 k
Repo   : installed
Summary: A library for manipulating JPEG image format files.


[root at chilkat nagios-2.0b3]# yum info libpng
Installed Packages
Name   : libpng
Arch   : x86_64
Version: 1.2.7
Release: 1
Size   : 406 k
Repo   : installed
Summary: A library of functions for manipulating PNG image format files.

Name   : libpng
Arch   : i386
Version: 1.2.7
Release: 1
Size   : 388 k
Repo   : installed
Summary: A library of functions for manipulating PNG image format files.


[root at chilkat nagios-2.0b3]# make clean > /dev/null
[root at chilkat nagios-2.0b3]# ./configure --prefix=/usr/local/nagios 
--with-cgiurl=/cgi-bin --with-htmurl=/ --with-nagios-user=nagios 
--with-nagios-group=nagios --with-command-group=nagcmd 
--with-gd-lib=/usr/lib --with-gd-inc=/usr/include --enable-embedded-perl 
--with-perlcache
checking for a BSD compatible install... /usr/bin/install -c
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether make sets ${MAKE}... yes
checking for strip... /usr/bin/strip
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for arpa/inet.h... yes
checking for ctype.h... yes
checking for dirent.h... yes
checking for errno.h... yes
checking for fcntl.h... yes
checking for getopt.h... yes
checking for grp.h... yes
checking for limits.h... yes
checking for math.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for pthread.h... yes
checking for pthreads.h... no
checking for pwd.h... yes
checking for regex.h... yes
checking for signal.h... yes
checking for socket.h... no
checking for strings.h... yes
checking for string.h... yes
checking for syslog.h... yes
checking for unistd.h... yes
checking for uio.h... no
checking for sys/mman.h... yes
checking for sys/types.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking for sys/socket.h... yes
checking for sys/stat.h... yes
checking for sys/timeb.h... yes
checking for sys/un.h... yes
checking for sys/ipc.h... yes
checking for sys/msg.h... yes
checking for sys/poll.h... yes
checking for working const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for main in -lnsl... yes
checking for socket in -lsocket... no
checking for initgroups... yes
checking for setenv... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for unsetenv... yes
checking for type of socket size... size_t
checking for pthread_create in -lcma... no
checking for pthread_create in -lpthread... yes
checking for library containing nanosleep... none required
checking for mail... /bin/mail
Init script directory:  /etc/rc.d/init.d
We'll use default routines (in xdata/xsddefault.*) for status data I/O...
We'll use default routines (in xdata/xcddefault.*) for comment data I/O...
We'll use default routines (in xdata/xrddefault.*) for retention data I/O...
We'll use template-based routines (in xdata/xodtemplate.*) for object 
data I/O...
We'll use default routines (in xdata/xpddefault.*) for performance data 
I/O...
We'll use default routines (in xdata/xdddefault.*) for scheduled 
downtime data I/O...
checking for main in -liconv... no
checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... no
checking for gdImagePng in -lgd (order 3)... no
checking for gdImagePng in -lgd (order 4)... no


*** 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.

NOTE: In addition to the gd-devel library, you'll also need to make
      sure you have the png-devel and jpeg-devel libraries installed
      on your system.

NOTE: After you install the necessary libraries on your system:
      1. Make sure /etc/ld.so.conf has an entry for the directory in
         which the GD, PNG, and JPEG libraries are installed.
      2. Run 'ldconfig' to update the run-time linker options.
      3. Run 'make clean' in the Nagios distribution to clean out
         any old references to your previous compile.
      4. Rerun the configure script.

NOTE: If you can't get the configure script to recognize the GD libs
      on your system, get over it and move on to other things.  The
      CGIs that use the GD libs are just a small part of the entire
      Nagios package.  Get everything else working first and then
      revisit the problem.  Make sure to check the nagios-users
      mailing list archives for possible solutions to GD library
      problems when you resume your troubleshooting.

********************************************************************


checking for ltdl.h... yes
checking for lt_dlinit in -lltdl... yes
checking for extra flags needed to export symbols...  -Wl,-export-dynamic
checking for linker flags for loadable modules... -shared
creating base/perlxsi.c
Embedded Perl interpreter will be compiled in...
Internally compiled Perl scripts will be cached...
Using threaded perl
checking for traceroute... /bin/traceroute
checking for snprintf... yes
checking for type va_list... yes
checking for perl... /usr/bin/perl
creating ./config.status
creating Makefile
creating subst
creating pkginfo
creating base/Makefile
creating common/Makefile
creating contrib/Makefile
creating cgi/Makefile
creating html/Makefile
creating module/Makefile
creating include/Makefile
creating xdata/Makefile
creating daemon-init
creating html/index.html
creating html/side.html
creating include/config.h
include/config.h is unchanged
creating include/snprintf.h
include/snprintf.h is unchanged
creating include/nagios.h
creating include/cgiutils.h
include/cgiutils.h is unchanged

Creating sample config files in sample-config/ ...


*** Configuration summary for nagios 2.0b3 04-03-2005 ***:

 General Options:
 -------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagcmd
            Embedded Perl:  yes, with caching
             Event Broker:  yes
        Install ${prefix}:  /usr/local/nagios
                Lock file:  ${prefix}/var/nagios.lock
           Init directory:  /etc/rc.d/init.d
                  Host OS:  linux-gnu

 Web Interface Options:
 ------------------------
                 HTML URL:  http://localhost//
                  CGI URL:  http://localhost/cgi-bin/
 Traceroute (used by WAP):  /bin/traceroute


Review the options above for accuracy.  If they look okay,
type 'make all' to compile the main program and CGIs.

[root at chilkat nagios-2.0b3]#



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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