Version 3.1.1 installation problem


#1

Hi,

I am unable to install 3.1.0 onwards for the below mentioned errors. I am on solaris 8 SPARC

[quote]bash-2.03# make all
cd ./base && make
make[1]: Entering directory /u01/shyam/nagios-3.1.1/base' gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o netutils.o notifications.o sehandlers.o skiplist.o utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o ../common/snprintf.o -lm -lpthread -ldl -lrt Undefined first referenced symbol in file socket netutils.o recv netutils.o send netutils.o getaddrinfo netutils.o freeaddrinfo netutils.o getsockopt netutils.o connect netutils.o ld: fatal: Symbol referencing errors. No output written to nagios collect2: ld returned 1 exit status make[1]: *** [nagios] Error 1 make[1]: Leaving directory/u01/shyam/nagios-3.1.1/base’
make: *** [all] Error 2
[/quote]

Can anybody throw some light on this please? Thankyou in advance.


#2

what’s the configure output… all ok there?


#3

Thanks Luca for getting back. Looks like it was all ok on configuration. Please find below configuration output anyway.

[quote]bash-2.03# ./configure --with-nagios-user=root --with-nagios-group=nagcmd --with-command-group=nagcmd
checking for a BSD-compatible install… ./install-sh -c
checking build system type… sparc-sun-solaris2.8
checking host system type… sparc-sun-solaris2.8
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking whether make sets $(MAKE)… yes
checking for strip… true
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /usr/xpg4/bin/grep
checking for egrep… /usr/xpg4/bin/grep -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 sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… no
checking for unistd.h… yes
checking arpa/inet.h usability… yes
checking arpa/inet.h presence… yes
checking for arpa/inet.h… yes
checking ctype.h usability… yes
checking ctype.h presence… yes
checking for ctype.h… yes
checking dirent.h usability… yes
checking dirent.h presence… yes
checking for dirent.h… yes
checking errno.h usability… yes
checking errno.h presence… yes
checking for errno.h… yes
checking fcntl.h usability… yes
checking fcntl.h presence… yes
checking for fcntl.h… yes
checking getopt.h usability… no
checking getopt.h presence… no
checking for getopt.h… no
checking grp.h usability… yes
checking grp.h presence… yes
checking for grp.h… yes
checking libgen.h usability… yes
checking libgen.h presence… yes
checking for libgen.h… yes
checking limits.h usability… yes
checking limits.h presence… yes
checking for limits.h… yes
checking math.h usability… yes
checking math.h presence… yes
checking for math.h… yes
checking netdb.h usability… yes
checking netdb.h presence… yes
checking for netdb.h… yes
checking netinet/in.h usability… yes
checking netinet/in.h presence… yes
checking for netinet/in.h… yes
checking pthread.h usability… yes
checking pthread.h presence… yes
checking for pthread.h… yes
checking pthreads.h usability… no
checking pthreads.h presence… no
checking for pthreads.h… no
checking pwd.h usability… yes
checking pwd.h presence… yes
checking for pwd.h… yes
checking regex.h usability… yes
checking regex.h presence… yes
checking for regex.h… yes
checking signal.h usability… yes
checking signal.h presence… yes
checking for signal.h… yes
checking socket.h usability… no
checking socket.h presence… no
checking for socket.h… no
checking stdarg.h usability… yes
checking stdarg.h presence… yes
checking for stdarg.h… yes
checking for string.h… (cached) yes
checking for strings.h… (cached) yes
checking sys/mman.h usability… yes
checking sys/mman.h presence… yes
checking for sys/mman.h… yes
checking for sys/types.h… (cached) yes
checking sys/time.h usability… yes
checking sys/time.h presence… yes
checking for sys/time.h… yes
checking sys/resource.h usability… yes
checking sys/resource.h presence… yes
checking for sys/resource.h… yes
checking for sys/wait.h… (cached) yes
checking sys/socket.h usability… yes
checking sys/socket.h presence… yes
checking for sys/socket.h… yes
checking for sys/stat.h… (cached) yes
checking sys/timeb.h usability… yes
checking sys/timeb.h presence… yes
checking for sys/timeb.h… yes
checking sys/un.h usability… yes
checking sys/un.h presence… yes
checking for sys/un.h… yes
checking sys/ipc.h usability… yes
checking sys/ipc.h presence… yes
checking for sys/ipc.h… yes
checking sys/msg.h usability… yes
checking sys/msg.h presence… yes
checking for sys/msg.h… yes
checking sys/poll.h usability… yes
checking sys/poll.h presence… yes
checking for sys/poll.h… yes
checking syslog.h usability… yes
checking syslog.h presence… yes
checking for syslog.h… yes
checking uio.h usability… no
checking uio.h presence… no
checking for uio.h… no
checking for unistd.h… (cached) yes
checking for an ANSI C-conforming const… yes
checking whether struct tm is in sys/time.h or time.h… time.h
checking for struct tm.tm_zone… no
checking whether tzname is declared… yes
checking for tzname… 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 va_copy… yes
checking for vsnprintf… yes
checking for snprintf… yes
checking for asprintf… no
checking for vasprintf… no
checking for C99 vsnprintf… no
checking for initgroups… yes
checking for setenv… no
checking for strdup… yes
checking for strstr… yes
checking for strtoul… yes
checking for unsetenv… no
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… -lrt
checking for mail… /bin/mail
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… yes
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 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 dblistribution 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 ltdl.h usability… no
checking ltdl.h presence… no
checking for ltdl.h… no
checking dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking for dlopen in -ldl… yes
checking for extra flags needed to export symbols… none
checking for linker flags for loadable modules… -G
checking for traceroute… /usr/sbin/traceroute
checking for type va_list… yes
checking for perl… /bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating subst
config.status: creating pkginfo
config.status: creating base/Makefile
config.status: creating common/Makefile
config.status: creating contrib/Makefile
config.status: creating cgi/Makefile
config.status: creating html/Makefile
config.status: creating module/Makefile
config.status: creating xdata/Makefile
config.status: creating daemon-init
config.status: creating t-tap/Makefile
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: creating include/snprintf.h
config.status: include/snprintf.h is unchanged
config.status: creating include/cgiutils.h
config.status: include/cgiutils.h is unchanged

Creating sample config files in sample-config/ …

*** Configuration summary for nagios 3.1.1 06-22-2009 ***:

General Options:

    Nagios executable:  nagios
    Nagios user/group:  root,nagcmd
   Command user/group:  root,nagcmd
        Embedded Perl:  no
         Event Broker:  yes
    Install ${prefix}:  /usr/local/nagios
            Lock file:  ${prefix}/var/nagios.lock

Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/init.d
Apache conf.d directory: /etc/httpd/conf.d
Mail program: /bin/mail
Host OS: solaris2.8

Web Interface Options:

             HTML URL:  [localhost/nagios/](http://localhost/nagios/)
              CGI URL:  [localhost/nagios/cgi-bin/](http://localhost/nagios/cgi-bin/)

Traceroute (used by WAP): /usr/sbin/traceroute

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

[/quote]


#4

GD is not found but that doesn’t have to do with the problem you are seeing…
i only once compiled on solaris and had a colleague help me because it was terryfing, i seem to remeber that for some reason solaris doesn’t find the libraries required for compiling, but i can’t say what was done to fix it. i think i wrote somehwere what we did and and how but i can’t say if it was on this forum or somewhere else, possibly it was only telling the configure command where to find some libs, but i may also be misleading you… sorry :confused:

not sure but this one may help too (google cache version as i can’t find it on nagios.org) :
74.125.77.132/search?q=cache:Ks4 … clnk&gl=it


#5

[quote=“luca”]GD is not found but that doesn’t have to do with the problem you are seeing…
i only once compiled on solaris and had a colleague help me because it was terryfing, i seem to remeber that for some reason solaris doesn’t find the libraries required for compiling, but i can’t say what was done to fix it. i think i wrote somehwere what we did and and how but i can’t say if it was on this forum or somewhere else, possibly it was only telling the configure command where to find some libs, but i may also be misleading you… sorry :confused:

not sure but this one may help too (google cache version as i can’t find it on nagios.org) :
74.125.77.132/search?q=cache:Ks4 … clnk&gl=it[/quote]

Thanks for trying, Luca. Much appreciated! I have 3.0.6 successfully running my end even with GD errors thrown at installation. The problem began with 3.1.0 which introduced ‘Check for updates’ feature. I am assuming this feature triggered the issue though not sure. I have seen couple of threads on google with the same issue but unfortunately no solution hence posting here to catch developers attention. Lets see if we can find any help on this.


#6

I’m not sure the devloper reads this forum but it’s worth a try, the check for update feature is probably only a http check to the nagios.org website… but i’m not sure :slight_smile:


#7

same issue on Solaris 9 box using gcc 3.4.6

I can get it to compile by altering base/Makefile: LIBS-lrt -lsocket

Nagios will run; however, the web interface won’t let me in