Nagios/CVS HEAD compilation issues on Solaris (nanosleep patch)

Ethan Galstad nagios at nagios.org
Wed Dec 3 03:45:58 CET 2003


Thanks - will get this applied to CVS tonight.

On 22 Nov 2003 at 14:20, Joe Rhett wrote:

> gcc -g -O2 -I/opt/imagelib/include -DHAVE_CONFIG_H -DNSCORE -o nagios
> nagios.c broker.o nebmods.o checks.o config.o commands.o events.o
> flapping.o logging.o notifications.o sehandlers.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   
> -L/opt/imagelib/lib  -lm -lnsl -lsocket -lpthread -ldl Undefined      
>                 first referenced
>  symbol                             in file
> nanosleep                           events.o
> ld: fatal: Symbol referencing errors. No output written to nagios
> collect2: ld returned 1 exit status
> 
> To get nanosleep on Solaris, so you have to link with -lrt.
> (it's also in -lposix4, but will be removed in future versions)
> This should be tested for by autoconf.
> 
> I was prepared to provide an autoconf patch, but configure.ac was not
> included in the CVS sources.  However, something like this is probably
> all that is needed. 
> 
> AC_SEARCH_LIBS(nanosleep, [rt], [posix4], [], [
>  echo "nanosleep() required for timing operations."
>  exit 1
> ])
> 
> 
> -- 
> Joe Rhett                                   Chief Geek
> JRhett at Isite.Net                                   Isite Services,
> Inc.
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/




More information about the Developers mailing list