Thanks for the pointer, I have had a look at the Oracle documentation and gave it a go, even if it was for Version 4.0.2.
First tried to compile with Sun Studio 12.3, this proved to be a near impossible task. So reverted to GCC, "
gcc version 4.8.2 (GCC)", as the configure script seems to be optimized for GCC.
As the "structure" issue seems to be resolved since Verison 4.1.1 as quoted in the Oracle document:
"
this version of Nagios defines a structure (struct comment) that conflicts with a system structure of the same name in /usr/include/sys/pwd.h. Perform the following steps to fix this issue."
I did not proceed with the changes mentioned in the source and make files.
Run ./configure With the following switches:
./configure --prefix=/usr/local/nagios \
--with-command-group=nagcmd \
--with-httpd-conf=/etc/apache2/2.4/conf.d \
--with-gd-inc=/usr/include/gd2 \
--disable-statuswrl
Configure runs fine and produces the following summary:
*** Configuration summary for nagios 4.2.0 08-01-2016 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Install ${includedir}: /usr/local/nagios/include/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/init.d
Apache conf.d directory: /etc/apache2/2.4/conf.d
Mail program: /usr/bin/mail
Host OS: solaris2.11
IOBroker Method: poll
Web Interface Options:
------------------------
HTML URL:
http://localhost/nagios/
CGI URL:
http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /usr/bin/traceroute
Running "gmake all" compiles all the various components with GCC with no errors and only producing the following warning:
workers.c: In function 'wproc_run_job':
workers.c
6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'ssize_t' [-Wformat=]
wp->name, ret, kvvb->bufsize, written, errno, strerror(errno));
^
After a install of all the files in /usr/local/nagios, I still get the "Bus Error" when doing a verification on the default sample config files:
:nagios# ./bin/nagios -v ./etc/nagios.cfg
Nagios Core 4.2.0
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-01-2016
License: GPL
Website:
https://www.nagios.org
Reading configuration data...
Read main config file okay...
Bus Error
Anything else I can do from my side to shed some more light on the "Bus Error" problem?
Regards