View FAQ

[ Return To FAQ Index | Search The FAQs ]


FAQ Database : Nagios : Compiling

Title:Trouble compiling Nagios due to missing snprintf(), strncat(), or strncpy() functions
FAQ ID:F0012
Submitted By:Ethan Galstad 
Last Updated:08/29/2002

Description:

Compiling Nagios on different operating systems doesn't really seem to be much of a problem anymore, unless you're missing some string functions. Nagios makes extensive use of the following string functions: snprintf(), strncat(), and strncpy(). If your C library doesn't include these functions, you'll be unable to compile Nagios.

 

Solution:

If you're getting errors about the strncat(), strncpy(), or snprintf() functions, you probably don't have the glibc libraries installed on your system. This tends to happen most often on HP-UX and Solaris boxes. I've tried to prevent potential buffer overflows in Nagios and the CGIs by using these functions, so they are all over the code. If you don't want to install the glibc libraries for some reason, you'll have to find some other way to get everything compiled.

 

Keywords:compile compiling snprintf strncpy strncat solaris hp-ux