Page 1 of 1

[Nagios-devel] nagios 3.0rc1 compile problems on Solaris 10

Posted: Tue Jan 08, 2008 1:42 am
by Guest
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.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]