nagios 3.0rc1 compile problems on Solaris 10 (+workaround/fix)

Alexander Leidinger Alexander.Leidinger at ext.publications.europa.eu
Tue Jan 8 10:42:36 CET 2008


Hi,

I encountered some compile problems on Solaris 10 with the Sun Studio
compiler/tools:

Error 1:
---snip---
ld: fatal: file ../common/snprintf.o: open failed: No such file or
directory
ld: fatal: File processing errors. No output written to nagios
---snip---

My workaround:
---snip---
cd common
ln -s ../base/snprintf.o .
cd ..
---snip---

Error 2:
---snip---
"helloworld.c", line 39: warning: syntax error:  empty declaration
"helloworld.c", line 76: warning: argument #8 is incompatible with
prototype:
        prototype: pointer to void : "../include/nagios.h", line 491
        argument : pointer to function(pointer to char) returning void
ld: fatal: file helloworld.o: unknown file type
ld: fatal: File processing errors. No output written to helloworld.o
---snip---

My workaround (and probably the right fix):
---snip---
vi include/nagios.h
goto line 491
change
int schedule_new_event(int,int,time_t,int,unsigned long,void *,int,void
*,void *,int);        /* schedules a new timed event */
to
int schedule_new_event(int,int,time_t,int,unsigned long,void *,int,void
(*)(char *),void *,int);        /* schedules a new timed event */

vi include/nebmodules.h
search
#define NEB_API_VERSION(x) int __neb_api_version = x;
change to (remove the semicolon at the end)
#define NEB_API_VERSION(x) int __neb_api_version = x

perl -pi -e 's:helloworld.o:helloworld:g' module/Makefile*
---snip---

Bye,
Alexander.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace




More information about the Developers mailing list