pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43921: [net/nagios-nrpe] build error on Solaris 10



>Number:         43921
>Category:       pkg
>Synopsis:       [net/nagios-nrpe] build error on Solaris 10
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 28 22:40:00 +0000 2010
>Originator:     Youssef Ghorbal
>Release:        Solaris 10
>Organization:
Institut Pasteur
>Environment:
SunOS 5.10 Generic_142900-03 sun4v sparc SUNW,SPARC-Enterprise-T5120
>Description:
nagios-nrpe does not build on Solaris 10 (Sparc and x86) for two reasons : 

1 - in configure phase the ./configure needs some extra arguments to point to 
the right openssl installation location (native or pkgsrc one). The options.mk 
already provides a facility to activate ssl support but needs more options to 
point to the openssl include and lib dirs. Something like :
  CONFIGURE_ARGS+=       --with-ssl=${SSLBASE}
  CONFIGURE_ARGS+=       --with-ssl-lib=${SSLBASE}/lib
  CONFIGURE_ARGS+=       --with-ssl-inc=${SSLBASE}/include

if these arguments are not provided, the build stops with this error message : 
...
checking for SSL libraries... configure: error: Cannot find ssl librarie
...

2 - Solaris syslog does not provide LOG_FTP and LOG_AUTHPRIV facilities. The 
nrpe.c code (lines 616 -> 619) assumes that these facilities exist leeding to a 
build error on systemes that does not provide these facilities in syslog.h 
(Solaris and HP-UX for example) To avoid this I propose a patch that add a 
section in include.h.in just after the #include of syslog.h in order to 
workaround this issue. Something like :
#ifndef LOG_FTP
#define LOG_FTP LOG_DAEMON
#endif
#ifndef LOG_AUTHPRIV
#define LOG_AUTHPRIV LOG_AUTH
#endif

With these two patchs build works fine on Solaris 10.
>How-To-Repeat:
Build net/nagios-nrpe on Solaris 10
>Fix:
1 - pkgdiff options.mk.orig options.mk

--- options.mk.orig     2010-09-28 22:18:57.858741866 +0000
+++ options.mk
@@ -9,6 +9,9 @@ PKG_SUGGESTED_OPTIONS=  tcpwrappers
 .if !empty(PKG_OPTIONS:Mssl)
 CONFIGURE_ARGS+=       --enable-ssl
 .  include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-ssl=${SSLBASE}
+CONFIGURE_ARGS+=       --with-ssl-lib=${SSLBASE}/lib
+CONFIGURE_ARGS+=       --with-ssl-inc=${SSLBASE}/include
 .else
 CONFIGURE_ARGS+=       --disable-ssl
 .endif


2 - patch-ab file : 

--- include/config.h.in.orig    2010-09-28 21:42:39.217935371 +0000
+++ include/config.h.in
@@ -132,6 +132,13 @@ typedef int int32_t;
 #include <syslog.h>
 #endif
 
+#ifndef LOG_FTP
+#define LOG_FTP LOG_DAEMON
+#endif
+#ifndef LOG_AUTHPRIV
+#define LOG_AUTHPRIV LOG_AUTH
+#endif
+
 #undef HAVE_SYS_STAT_H
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>



Home | Main Index | Thread Index | Old Index