[Nagiosplug-devel] AIx 5.2 and nagios-plugins

Ton Voon tonvoon at mac.com
Thu Nov 11 16:55:07 CET 2004


Trevor,

Can you try the latest CVS HEAD. I've just updated some of the  
libraries from coreutils and snprintf.c from samba. This incorporates  
the patch that Eric had provided in an earlier email (fortunately,  
archived in my mail). Here's Eric's patch if you prefer to use this:

diff -Paru nagios-plugins-1.4.0alpha1-orig/lib/mountlist.c
nagios-plugins-1.4.0alpha1/lib/mountlist.c
--- nagios-plugins-1.4.0alpha1-orig/lib/mountlist.c	2003-10-29
21:18:12.000000000 -0500
+++ nagios-plugins-1.4.0alpha1/lib/mountlist.c	2004-05-27
15:35:46.000000000 -0400
@@ -719,7 +719,7 @@
      /* Get the list of mounted filesystems.  */
      mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries);

-    for (thisent = entries; thisent < entries + bufsize;
+    for (thisent = entries; thisent < entries + bufsize && ((struct
vmount *) thisent)->vmt_length;
  	 thisent += vmp->vmt_length)
        {
  	char *options, *ignore;
diff -Paru nagios-plugins-1.4.0alpha1-orig/lib/snprintf.c
nagios-plugins-1.4.0alpha1/lib/snprintf.c
--- nagios-plugins-1.4.0alpha1-orig/lib/snprintf.c	2003-03-07
20:59:30.000000000 -0500
+++ nagios-plugins-1.4.0alpha1/lib/snprintf.c	2004-05-27
15:30:53.000000000 -0400
@@ -85,6 +85,14 @@
  #include <stdlib.h>
  #endif

+#ifndef VA_COPY
+#ifdef HAVE_VA_COPY
+#define VA_COPY(dest, src) __va_copy(dest, src)
+#else
+#define VA_COPY(dest, src) (dest) = (src)
+#endif
+#endif
+
  #if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) &&
defined(HAVE_C99_VSNPRINTF)
  /* only include stdio.h if we are not re-defining snprintf or
vsnprintf */
  #include <stdio.h>
@@ -109,13 +117,6 @@
  #define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} }
while(0)
  #endif

-#ifndef VA_COPY
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) __va_copy(dest, src)
-#else
-#define VA_COPY(dest, src) (dest) = (src)
-#endif
-#endif

  static size_t dopr(char *buffer, size_t maxlen, const char *format,
  		   va_list args_in);


Ton

On 11 Nov 2004, at 03:14, Trevor Warren wrote:

> Hiyee there Eric,
>
>    Thanks for taking the time to read this email. I had some issues
> with compilation of the Nagios plugins on AIX 5.2. I am using GCC and
> these are the errors i have encountered on all my AIX 5.2 32/64 bit
> boxes.
>
> Making all in plugins
>        source='check_disk.c' object='check_disk.o' libtool=no
> depfile='.deps/check_disk.Po' tmpdepfile='.deps/check_disk.TPo'
> depmode=gcc
> /bin/sh ../depcomp  gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\"
> -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl       -g -O2
> -maix32  -c `test -f 'check_disk.c' || echo './'`check_disk.c
>        source='utils.c' object='utils.o' libtool=no
> depfile='.deps/utils.Po' tmpdepfile='.deps/utils.TPo'  depmode=gcc
> /bin/sh ../depcomp
> gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I.
> -I. -I.. -I.. -I../lib -I../intl       -g -O2 -maix32  -c `test -f
> 'utils.c' || echo './'`utils.c
>        source='popen.c' object='popen.o' libtool=no
> depfile='.deps/popen.Po' tmpdepfile='.deps/popen.TPo'  depmode=gcc
> /bin/sh ../depcomp
> gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I.
> -I. -I.. -I.. -I../lib -I../intl       -g -O2 -maix32  -c `test -f
> 'popen.c' || echo './'`popen.c
>        gcc  -g -O2 -maix32   -L. -o check_disk  check_disk.o utils.o
> ../lib/libnagiosplug.a popen.o ../intl/libintl.a -liconv
> ld: 0711-317 ERROR: Undefined symbol: ..libintl_bindtextdomain
> ld: 0711-317 ERROR: Undefined symbol: ..libintl_textdomain
> ld: 0711-317 ERROR: Undefined symbol: ..libintl_gettext
> ld: 0711-317 ERROR: Undefined symbol: .VA_COPY
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more  
> information.
> collect2: ld returned 8 exit status
> make: 1254-004 The error code from the last command is 1.
>
>   Your email written sometime ago talks about a patch you had written.
> Is it for this same issue Eric. If you don't mind can you pls point me
> to that patch......i am in a production env here at bombay with quite
> a few AIX 5.2 32/64 bit boxes to maintain. Please lemme know how i can
> pull out of this situation.
>
> ######################
> #Eric wrote a long time ago.....
> ######################
> http://sourceforge.net/mailarchive/forum.php? 
> thread_id=4854545&forum_id=8499
> From: Eric Lauriault <elauri at la...>
> aix 5.2 patch for nagios-plugins-1.4.0alpha1
> 2004-05-27 13:03
>
>  Hi,
>
>  Here"s a small patch I wrote for aix 5.2. It fixes compilation issues
>  due to misplacement of a VA_COPY and an infinite loop while in
>  read_filesystem_list.
>
>  Enjoy!
>
>  Eric Lauriault, eric at la...
>  Analyste/Administrateur UNIX/telecom/reseau
>  La Cite collegiale
> ######################
> #Eric wrote a long time ago.....
> ######################
>
>  Thanks in advance and pls revert back Eric.
>
> Trevor
>
> -- 
>          ___________________________________
> ( >-   /  Scaling FreeSoftware & OpenSource        \   -< )
> /~\   /           In the Enterprise                               \    
> /~\
> |  \) \      | www.fsf.org | www.opensource.org |         /  (/ |
> |_|_   \____________________________________/  _|_|
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Nagiosplug-devel mailing list
> Nagiosplug-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any  
> issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>





More information about the Devel mailing list