View Single Post
  #1   (View Single Post)  
Old 31st May 2008
roundkat roundkat is offline
Shell Scout
 
Join Date: May 2008
Posts: 115
Default [Solved] Compiling Nagios 3.02

I have gotten back into Nagios with some help from a classmate and
my boss at work really wants me to implement it..

We successfully compiled it on a SunBlade 2000 in the Solaris Class I recently attended..

I tarballed the entire installation but forgot to get all the installed packages..
From my notes I think we have everything but I am running into a compile issue..

I have an Ultra-80 at home to play with so I figured it would be something to do in my free time
this weekend.. :-)

The current version of Nagios is 3.02.
No package at SunFreeware
Older package at Blastwave (2.10)

Here goes
Installing Nagios 3.02
Code:
ultra80# uname -a
SunOS ultra80 5.10 Generic_118833-33 sun4u sparc SUNW,Ultra-80

ultra80# echo $PATH
/usr/libexec:/usr/local/libexec:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/ccs/bin
3.02 compiles and builds on the Ultra80 but it produces a bad binary..
I have narrowed it down to this
Code:
The corrupt binary after make install
ultra80# ldd /opt/nagios/bin/nagios
ldd: /opt/nagios/bin/nagios: file has insecure interpreter ELF

The compiled binary before make install
ultra80# ldd base/nagios 
        libm.so.2 =>     /lib/libm.so.2
        libpthread.so.1 =>       /lib/libpthread.so.1
        libltdl.so.3 =>  (file not found)
        librt.so.1 =>    /lib/librt.so.1
        libglib-2.0.so.0 =>      /usr/lib/libglib-2.0.so.0
        libc.so.1 =>     /lib/libc.so.1
        libaio.so.1 =>   /lib/libaio.so.1
        libmd5.so.1 =>   /lib/libmd5.so.1
        /platform/SUNW,Ultra-80/lib/libc_psr.so.1
        /platform/SUNW,Ultra-80/lib/libmd5_psr.so.1

No Errors in the ./configure with options
Code:
./configure \
--prefix=/opt/nagios \
--enable-event-broker \
--with-gd-lib=/usr/local/lib \
--with-gd-inc=/usr/local/include \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--with-command-user=nobody \
--with-command-group=nobody \
--with-checkresult-dir=/opt/nagios/tmp/results \
--with-temp-dir=/opt/nagios/tmp \
--with-init-dir=/etc/init.d \
--with-lockfile=/opt/nagios/var/nagios.lock \
--with-cgiurl=/nagios/cgi-bin \
--with-htmurl=/nagios
SunFreeWare packages
Quote:
-- binutils-2.17
-- gd-2.0.35
-- libiconv-1.9.2
-- freetype-2.3.1
-- make-3.81
-- libtool-1.5.24
-- libintl (3.4.0)
-- gcc-3.4.6
-- coreutils-6.4
-- zlib-1.2.3
-- libpng-1.2.8
-- libbcc-3.4.6 (this may not be needed since gcc is installed)
The make install is stripping something needed from the compiled binaries
and between my friend and I we have not figured it out..

Code:
ultra80# file /opt/nagios/bin/nagios  
/opt/nagios/bin/nagios: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped

ultra80# file base/nagios
base/nagios:  ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
This is really more of a compiling from source issue and I am very new to this area..

I can post the ./configure results and the make all output if needed..

much thanks
rk

Last edited by roundkat; 11th June 2008 at 01:03 PM.
Reply With Quote