Problem compiling nagios-1.2 on Tru64 5.1B

Pham, Zoong zpham at kpmg.com.au
Mon Dec 13 07:16:04 CET 2004


I have problem with compiling Nagios-1.2 on Tru64 5.1B.

I failed to compile it with HP C compiler and HP make.

I also tried gcc-3.3.2 and gmake-3.79.1
Here are how I congigured and compiled with gcc and gmake:

CC=/opt/TWWfsw/bin/gcc ./configure --prefix=/usr/local/nagios
--with-nagios-user=nagios --with-nagios-grp=nagios
The output from the above command:

   creating cache ./config.cache
   checking for a BSD compatible install... ./install-sh -c
   checking for gcc... /opt/TWWfsw/bin/gcc
   checking whether the C compiler (/opt/TWWfsw/bin/gcc  ) works... yes
   checking whether the C compiler (/opt/TWWfsw/bin/gcc  ) is a
cross-compiler... no
   checking whether we are using GNU C... yes
   checking whether /opt/TWWfsw/bin/gcc accepts -g... yes
   checking whether make sets ${MAKE}... yes
   checking for strip... /usr/bin/strip
   checking how to run the C preprocessor... /opt/TWWfsw/bin/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 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 pwd.h... yes
   checking for signal.h... yes
   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/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/stat.h... yes
   checking for sys/ipc.h... yes
   checking for sys/msg.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 strdup... yes
   checking for strstr... yes
   checking for strtoul... yes
   checking for initgroups... yes
   checking for type of socket size... size_t
   checking for mail... /usr/bin/mail
   Init script directory:  /sbin/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 template-based routines (in xdata/xedtemplate.*) for
extended 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)... yes
   GD library was found!
   checking for traceroute... no
   checking for snprintf... yes
   checking for type va_list... yes
   checking for perl... /usr/bin/perl
   updating cache ./config.cache
   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 xdata/Makefile
   creating daemon-init
   creating html/index.html
   creating html/side.html
   creating common/config.h
   creating common/snprintf.h
   creating base/nagios.h
   creating cgi/cgiutils.h
   
   Creating sample config files in sample-config/ ...
   
   
   *** Configuration summary for nagios 1.2 02-02-2004 ***:
   
    General Options:
    -------------------------
           Nagios executable:  nagios
           Nagios user/group:  nagios,nagios
          Command user/group:  nagios,nagios
               Embedded Perl:  no
           Install ${prefix}:  /usr/local/nagios
                   Lock file:  ${prefix}/var/nagios.lock
              Init directory:  /sbin/init.d
   
    Web Interface Options:
    ------------------------
                    HTML URL:  http://localhost/nagios/
                     CGI URL:  http://localhost/nagios/cgi-bin/
    Traceroute (used by WAP):  
   
    External Data Routines:
    ------------------------
                 Status data:  Default (text file)
                 Object data:  Template-based (text file)
                Comment data:  Default (text file)
               Downtime data:  Default (text file)
              Retention data:  Default (text file)
             Peformance data:  Default (external commands)
          Extended info data:  Template-based (text file)
   
   
   Review the options above for accuracy.  If they look okay,
   type 'make all' to compile the main program and CGIs.
   
And here is how I compiled:
/usr/local/bin/gmake all

The output from gmake:
   cd ./base && /usr/local/bin/gmake
   gmake[1]: Entering directory
`/usr/users/zpham/src/nagios/nagios-1.2/base'
   /opt/TWWfsw/bin/gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE  nagios.c
checks.o config.o commands.o flapping.o logging.o notifications.o
sehandlers.o utils.o sretention.o ../xdata/xrddefault.c
../common/comments.c ../xdata/xcddefault.c ../common/objects.c
../xdata/xodtemplate.c ../common/statusdata.c ../xdata/xsddefault.c
perfdata.o ../xdata/xpddefault.c ../common/downtime.c
../xdata/xdddefault.c    -lm -o nagios
   nagios.c: In function `main':
   nagios.c:301: error: elements of array `long_options' have incomplete
type
   nagios.c:303: warning: excess elements in struct initializer
   nagios.c:303: warning: (near initialization for `long_options[0]')
   nagios.c:303: error: `no_argument' undeclared (first use in this
function)
   nagios.c:303: error: (Each undeclared identifier is reported only
once
   nagios.c:303: error: for each function it appears in.)
   nagios.c:303: warning: excess elements in struct initializer
   nagios.c:303: warning: (near initialization for `long_options[0]')
   nagios.c:303: warning: excess elements in struct initializer
   nagios.c:303: warning: (near initialization for `long_options[0]')
   nagios.c:303: warning: excess elements in struct initializer
   nagios.c:303: warning: (near initialization for `long_options[0]')
   nagios.c:304: warning: excess elements in struct initializer
   nagios.c:304: warning: (near initialization for `long_options[1]')
   nagios.c:304: warning: excess elements in struct initializer
   nagios.c:304: warning: (near initialization for `long_options[1]')
   nagios.c:304: warning: excess elements in struct initializer
   nagios.c:304: warning: (near initialization for `long_options[1]')
   nagios.c:304: warning: excess elements in struct initializer
   nagios.c:304: warning: (near initialization for `long_options[1]')
   nagios.c:305: warning: excess elements in struct initializer
   nagios.c:305: warning: (near initialization for `long_options[2]')
   nagios.c:305: warning: excess elements in struct initializer
   nagios.c:305: warning: (near initialization for `long_options[2]')
   nagios.c:305: warning: excess elements in struct initializer
   nagios.c:305: warning: (near initialization for `long_options[2]')
   nagios.c:305: warning: excess elements in struct initializer
   nagios.c:305: warning: (near initialization for `long_options[2]')
   nagios.c:306: warning: excess elements in struct initializer
   nagios.c:306: warning: (near initialization for `long_options[3]')
   nagios.c:306: warning: excess elements in struct initializer
   nagios.c:306: warning: (near initialization for `long_options[3]')
   nagios.c:306: warning: excess elements in struct initializer
   nagios.c:306: warning: (near initialization for `long_options[3]')
   nagios.c:306: warning: excess elements in struct initializer
   nagios.c:306: warning: (near initialization for `long_options[3]')
   nagios.c:307: warning: excess elements in struct initializer
   nagios.c:307: warning: (near initialization for `long_options[4]')
   nagios.c:307: warning: excess elements in struct initializer
   nagios.c:307: warning: (near initialization for `long_options[4]')
   nagios.c:307: warning: excess elements in struct initializer
   nagios.c:307: warning: (near initialization for `long_options[4]')
   nagios.c:307: warning: excess elements in struct initializer
   nagios.c:307: warning: (near initialization for `long_options[4]')
   nagios.c:308: warning: excess elements in struct initializer
   nagios.c:308: warning: (near initialization for `long_options[5]')
   nagios.c:308: warning: excess elements in struct initializer
   nagios.c:308: warning: (near initialization for `long_options[5]')
   nagios.c:308: warning: excess elements in struct initializer
   nagios.c:308: warning: (near initialization for `long_options[5]')
   nagios.c:308: warning: excess elements in struct initializer
   nagios.c:308: warning: (near initialization for `long_options[5]')
   nagios.c:309: warning: excess elements in struct initializer
   nagios.c:309: warning: (near initialization for `long_options[6]')
   nagios.c:309: warning: excess elements in struct initializer
   nagios.c:309: warning: (near initialization for `long_options[6]')
   nagios.c:309: warning: excess elements in struct initializer
   nagios.c:309: warning: (near initialization for `long_options[6]')
   nagios.c:309: warning: excess elements in struct initializer
   nagios.c:309: warning: (near initialization for `long_options[6]')
   nagios.c:301: error: storage size of `long_options' isn't known
   gmake[1]: *** [nagios] Error 1
   gmake[1]: Leaving directory
`/usr/users/zpham/src/nagios/nagios-1.2/base'
   gmake: *** [all] Error 2

TIA,
Zoong Pham






**********************************************************************
This email is intended only for the use of the individual or entity
named above and may contain information that is confidential and
privileged. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this Email is strictly prohibited. When addressed to our clients, any opinions or advice contained in this Email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. If you have received this Email in error, please notify us immediately by return email or telephone +61 2 93357000 and destroy the original message. Thank You. 
**********************************************************************M



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
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