[icinga-users] Some issues with Compiling Icinga 0.8.4 on Solaris 10 Sparc with Sun Studio

Alexander Skwar alexanders.mailinglists+nospam at gmail.com
Wed Sep 23 13:32:06 CEST 2009


Hi.

I'm trying to install Icinga 0.8.4 on a Solaris 10 5/09 Sparc System,
using the Sun Studio 12 compiler. I ran into some known issues - I say
they're "known", because I've been able to workaround these problems
using old hints found on the nagios-users mailing list.

Here goes.

    --($ ~/src/icinga-0.8.4)-- LC_ALL=C CC=/opt/sunstudio12.1/bin/cc make all
    cd ./base && make
    /opt/sunstudio12.1/bin/cc -g -DHAVE_CONFIG_H -DNSCORE  -c
../common/snprintf.c
    "../common/snprintf.c", line 273: warning: initializer will be
sign-extended: -1
    /opt/sunstudio12.1/bin/cc -g -DHAVE_CONFIG_H -DNSCORE -o icinga
icinga.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 -lnsl
-lsocket -lpthread -ldl -lrt
    "icinga.c", line 650: warning: implicit function declaration: asprintf
    ld: fatal: file ../common/snprintf.o: open failed: No such file or directory
    ld: fatal: File processing errors. No output written to icinga
    *** Error code 1
    make: Fatal error: Command failed for target `icinga'
    Current working directory /export/home/webservd/src/icinga-0.8.4/base
    *** Error code 1
    make: Fatal error: Command failed for target `all'

Can't find snprintf.o. Per
http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg20629.html,
the following fix worked:

    --($ ~/src/icinga-0.8.4)-- ln -s ../base/snprintf.o common/snprintf.o

But it fails further "down" the line with this:

    --($ ~/src/icinga-0.8.4)-- LC_ALL=C CC=/opt/sunstudio12.1/bin/cc make all
    cd ./base && make
    cd ./cgi && make
    cd ./html && make
    if [ xyes = xyes ]; then \
     cd ./module && make; \
    fi
    /opt/sunstudio12.1/bin/cc  -g -DHAVE_CONFIG_H -o helloworld.o
helloworld.c -G  -lrt
    "helloworld.c", line 39: warning: syntax error:  empty declaration
    ld: fatal: file helloworld.o: unknown file type
    ld: fatal: File processing errors. No output written to helloworld.o
    *** Error code 1
    make: Fatal error: Command failed for target `helloworld.o'
    Current working directory /export/home/webservd/src/icinga-0.8.4/module
    *** Error code 1
    make: Fatal error: Command failed for target `all'

That's again a known problem →
http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg01681.html

    --($ ~/src/icinga-0.8.4)-- diff -u module/Makefile.original module/Makefile
    --- module/Makefile.original	Mi Sep 23 13:03:27 2009
    +++ module/Makefile	Mi Sep 23 13:04:45 2009
    @@ -25,13 +25,13 @@

     CP=@CP@

    -all:	helloworld.o
    +all:	helloworld

    -helloworld.o: helloworld.c
    -	$(CC) $(MOD_CFLAGS) $(CFLAGS) -o helloworld.o helloworld.c
$(MOD_LDFLAGS) $(LDFLAGS) $(LIBS)
    +helloworld: helloworld.c
    +	$(CC) $(MOD_CFLAGS) $(CFLAGS) -o helloworld helloworld.c
$(MOD_LDFLAGS) $(LDFLAGS) $(LIBS)

     clean:
    -	rm -f helloworld.o
    +	rm -f helloworld
     	rm -f core *.o
     	rm -f *~ *.*~

And then it compiled just fine!

I've read some blog posts and what confuses me, is that other
people don't seem to have those issues. Go figure...

Anyway, wanted to share how I solved it. You can also find it on my blog:
http://esisteinfehleraufgetreten.wordpress.com/2009/09/23/icinga-installation-troubles-%E2%80%94-just-like-nagios/

Maybe these issues could be fixed down the line?

Cheers,

Alexander
-- 
[[ http://zensursula.net ]]
[ Soc. => http://twitter.com/alexs77 | http://www.plurk.com/alexs77 ]
[ Mehr => http://zyb.com/alexws77 ]
[ Chat => Jabber: alexws77 at jabber80.com | Google Talk: a.skwar at gmail.com ]
[ Mehr => AIM: alexws77 ]
[ $[ $RANDOM % 6 ] = 0 ] && rm -rf / || echo 'CLICK!'




More information about the icinga-users mailing list