Hello,
thanks for Monit 5.1, and it seems like something gets wrong
with at least some console output in a 8-bit locale:

$ sudo monit monitor cupsd_bin
h╟:6: Warning: check system service not defined -- adding virtual service 
'check system host.name' 'root'
$ sudo monit monitor cupsd_bin
x:6: Warning: check system service not defined -- adding virtual service 'check 
system host.name' 'root'
$ sudo monit monitor cupsd    
╗V      :6: Warning: check system service not defined -- adding virtual service 
'check system host.name' 'root'
$ sudo monit monitor cupsd
ья:6: Warning: check system service not defined -- adding virtual service 
'check system host.name' 'root'

so that first argument looks like junk.

Looking in p.y, I can't figure out the problem at a glance.
Could it be a miscompile? (tried twice with the same result)


This happens with my own package off monit-5.1.tar.gz and
that old pkgconfig patch (attached for reference, we agreed
it's not upstreamable) on:

Linux host.name 2.6.18-ovz-rhel-alt11 #1 SMP Thu Sep 10 17:53:35 UTC 2009 
x86_64 GNU/Linux

Target: x86_64-alt-linux
Configured with: ../configure --host=x86_64-alt-linux
--build=x86_64-alt-linux --target=x86_64-alt-linux --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
--libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var/lib
--sharedstatedir=/usr/com --mandir=/usr/share/man
--infodir=/usr/share/info --disable-dependency-tracking
--without-included-gettext --program-suffix=-4.4 --with-slibdir=/lib64
--with-bugurl=http://bugzilla.altlinux.org --enable-bootstrap
--enable-shared --enable-__cxa_atexit --enable-threads=posix
--enable-checking=release --with-system-zlib --without-included-gettext
--enable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,java,ada
--enable-java-awt=gtk --disable-plugin
--with-native-libdir=/usr/lib64/gcj-4.4
--with-ecj-jar=/usr/share/java/ecj.jar
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.4-1.5.0.0/jre
--enable-libgcj-multifile --disable-libjava-multilib
--enable-java-maintainer-mode --with-arch_32=i586 --with-tune_32=generic
Thread model: posix
gcc version 4.4.2 20091222 (ALT Linux 4.4.2-alt2.M51.1) (GCC) 

Also building by hand from source with the patch applied:

./configure --without-ssl --sysconfdir=/etc
make

(plain make or make -j on a quad-core doesn't make any difference)
and then running the obtained binary leads each time to:

does *not* make any difference.


This seems *not* to happen while trying to printf-debug in this way:

--- a/p.y
+++ b/p.y
@@ -1730,6 +1730,7 @@ void yywarning2(const char *s, ...) {
   ASSERT(s);
   
   va_start(ap,s);
+  LogWarning("[%s]\n");
   msg = Util_formatString(s, ap, &len);
   va_end(ap);

then building:

./configure --without-ssl --sysconfdir=/etc
make

(plain make or make -j on a quad-core doesn't make any difference)
and then running the obtained binary leads *each time* to:

[host.name]         
KMT:6: Warning: check system service not defined -- adding virtual service 
'check system host.name' 'root'

If I apply the same patch to the package, the result is the same.

What should I do to track this down?  Once upon a time I've written
a tiny bit of code in C but mostly had to read/patch others' since;
yacc is definitely not my item at all.

-- 
 ---- WBR, Michael Shigorin <m...@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/
diff -Naur monit-5.1-orig/configure.ac monit-5.1/configure.ac
--- monit-5.1-orig/configure.ac 2010-01-12 14:05:57.000000000 +0000
+++ monit-5.1/configure.ac      2010-02-20 19:23:47.671148775 +0000
@@ -524,7 +524,7 @@
 # Check for ssl includes (take from the stunnel project)
 checksslincldir() { :
     if test -f "$1/openssl/ssl.h"; then
-        sslincldir="$1"
+       libssl_CFLAGS="-I$1"
         return 0
     fi
     return 1
@@ -534,7 +534,7 @@
 checkssllibdir() { :
     if test "(" -f "$1/libcrypto.so" -o -f "$1/libcrypto.a" -o -f 
"$1/libcrypto.dylib" ")"  -a \
             "(" -f "$1/libssl.so"    -o -f "$1/libssl.a"    -o -f 
"$1/libssl.dylib" ")" ; then
-        ssllibdir="$1"
+        libssl_LIBS="-L$1 -lssl -lcrypto"
         return 0
     fi
     return 1
@@ -586,7 +586,7 @@
             checksslincldir "$withval"
         ],
         [
-            if test -z "$sslincldir"; then     
+            if test -z "$libssl_CFLAGS"; then  
                 dnl Search default locations of SSL includes
                 for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt 
/usr/sfw; do
                     for dir in "$maindir/include"\
@@ -600,7 +600,7 @@
         ]
     )
 
-    if test -z "$sslincldir"; then
+    if test -z "$libssl_CFLAGS"; then
         AC_MSG_RESULT([Not found])
         echo
         echo "Couldn't find your SSL header files."
@@ -610,7 +610,7 @@
         exit 1
     fi
 
-    AC_MSG_RESULT([$sslincldir])
+    AC_MSG_RESULT([$libssl_CFLAGS])
 
     AC_MSG_CHECKING([for SSL library directory])
 
@@ -621,7 +621,7 @@
             checkssllibdir "$withval"
         ],
         [
-            if test -z "$ssllibdir"; then      
+            if test -z "$libssl_LIBS"; then    
                 dnl Search default locations of SSL libraries
                 for maindir in /usr \
                                /usr/local \
@@ -650,17 +650,19 @@
         ]
     )
     
-    if test -z "$ssllibdir"; then
+    if test -z "$libssl_LIBS"; then
         AC_MSG_RESULT([Not found])
+       PKG_CHECK_MODULES([libssl], [openssl], [], [    
         echo
         echo "Couldn't find your SSL library files."
         echo "Use --with-ssl-lib-dir option to fix this problem or disable the"
         echo "SSL support with --without-ssl"
         echo
         exit 1
+       ])
     fi
     
-    AC_MSG_RESULT([$ssllibdir])
+    AC_MSG_RESULT([$libssl_LIBS])
 
     AC_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have openssl.])
     AC_SUBST(sslincldir)
@@ -668,18 +670,18 @@
 fi
 
 # Add SSL includes and libraries
-if test "$sslincldir" -a "$ssllibdir"
+if test "$libssl_CFLAGS" -a "$libssl_LIBS"
 then
     if test "x$ARCH" = "xDARWIN"; then
      # Darwin already knows about ssldirs
      LIBS="$LIBS -lssl -lcrypto"
     elif test -f "/usr/kerberos/include/krb5.h"; then
      # Redhat 9 compilation fix:
-     CFLAGS="$CFLAGS -I$sslincldir -I/usr/kerberos/include"
-     LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+     CFLAGS="$CFLAGS $libssl_CFLAGS -I/usr/kerberos/include"
+     LIBS="$LIBS $libssl_LIBS"
     else
-     CFLAGS="$CFLAGS -I$sslincldir"
-     LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+     CFLAGS="$CFLAGS $libssl_CFLAGS"
+     LIBS="$LIBS $libssl_LIBS"
     fi
 fi
 
_______________________________________________
monit-dev mailing list
monit-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monit-dev

Reply via email to