"MSG_DONTWAIT undeclared"-error during compiling libol-0.3.17 on HP-UX 11.00/11.11
Hi, compiling libol-0.3.16 (and syslog-ng-1.6.8) on HP-UX 11.00/11.11 worked without any problems. Today, I tried to compile libol-0.3.17 (and syslog-ng-1.6.9). I got following errors during 'make': Making all in src make all-am source='io.c' object='io.lo' libtool=yes \ depfile='.deps/io.Plo' tmpdepfile='.deps/io.TPlo' \ depmode=hp /bin/sh /tmp/libol-0.3.17/depcomp \ /bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -Wall -O2 -c -o io.lo `test -f 'io.c' || echo '/tmp/libol-0.3.17/src/'`io.c cc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -Wall -O2 -c io.c -Wp,-M.deps/io.TPlo +Z -DPIC -o .libs/io.o cc: "io.c", line 493: error 1588: "MSG_DONTWAIT" undefined. cc: "io.c", line 493: warning 563: Argument #4 is not the correct type. *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. It seems, that there is no MSG_DONTWAIT variable defined in the socket.h file on HP-UX like for example on SUSE 10.0. It seems, that the reference to MSG_DONTWAIT came new with libol-0.3.17. -- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen f�r GMX Partner: http://www.gmx.net/de/go/partner
On Fri, 2006-01-20 at 15:37 +0100, Tob_Sch@gmx.de wrote:
Hi,
compiling libol-0.3.16 (and syslog-ng-1.6.8) on HP-UX 11.00/11.11 worked without any problems. Today, I tried to compile libol-0.3.17 (and syslog-ng-1.6.9).
Can you check if the below patch works? diff -u -r1.45 io.c --- io.c 23 Nov 2005 08:49:21 -0000 1.45 +++ io.c 23 Jan 2006 09:01:03 -0000 @@ -490,13 +490,27 @@ int res; UINT8 eofbuf[1]; +#ifdef MSG_DONTWAIT res = recv(self->fd, eofbuf, 1, MSG_PEEK | MSG_DONTWAIT); +#else + { + int old_flags; + + old_flags = fcntl(self->fd, F_GETFL); + fcntl(self->fd, F_SETFL, old_flags | O_NONBLOCK); + res = recv(self->fd, eofbuf, 1, MSG_PEEK); + if ((old_flags & O_NONBLOCK) == 0) + fcntl(self->fd, F_SETFL, old_flags); + } +#endif + if (res == 0) { /* EOF detected */ werror("io.c: do_write: write() failed, EOF detected\n"); errno = ECONNRESET; return -1; } + res = write(self->fd, data, length); saved_errno = errno; -- Bazsi
Hi, it now works with HP-UX, but now I get a little error at the end of "make" with SLES 9 x86_64, although libol.la is created (without the patch, it works): Making all in utils make[1]: Entering directory `/tmp/libol-0.3.17/utils' sed -e "s,_SCSH_,/usr/bin/scsh," make_class.in >make_class chmod +x make_class make[1]: Leaving directory `/tmp/libol-0.3.17/utils' Making all in src make[1]: Entering directory `/tmp/libol-0.3.17/src' make all-am make[2]: Entering directory `/tmp/libol-0.3.17/src' if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT format.lo -MD -MP -MF ".deps/format.Tpo" \ -c -o format.lo `test -f 'format.c' || echo '/tmp/libol-0.3.17/src/'`format.c; \ then mv -f ".deps/format.Tpo" ".deps/format.Plo"; \ else rm -f ".deps/format.Tpo"; exit 1; \ fi mkdir .libs gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT format.lo -MD -MP -MF .deps/format.Tpo -c format.c -fPIC -DPIC -o .libs/format.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT format.lo -MD -MP -MF .deps/format.Tpo -c format.c -o format.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT io.lo -MD -MP -MF ".deps/io.Tpo" \ -c -o io.lo `test -f 'io.c' || echo '/tmp/libol-0.3.17/src/'`io.c; \ then mv -f ".deps/io.Tpo" ".deps/io.Plo"; \ else rm -f ".deps/io.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT io.lo -MD -MP -MF .deps/io.Tpo -c io.c -fPIC -DPIC -o .libs/io.o io.c: In function `read_callback': io.c:436: warning: initialization from incompatible pointer type gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT io.lo -MD -MP -MF .deps/io.Tpo -c io.c -o io.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT werror.lo -MD -MP -MF ".deps/werror.Tpo" \ -c -o werror.lo `test -f 'werror.c' || echo '/tmp/libol-0.3.17/src/'`werror.c; \ then mv -f ".deps/werror.Tpo" ".deps/werror.Plo"; \ else rm -f ".deps/werror.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT werror.lo -MD -MP -MF .deps/werror.Tpo -c werror.c -fPIC -DPIC -o .libs/werror.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT werror.lo -MD -MP -MF .deps/werror.Tpo -c werror.c -o werror.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT queue.lo -MD -MP -MF ".deps/queue.Tpo" \ -c -o queue.lo `test -f 'queue.c' || echo '/tmp/libol-0.3.17/src/'`queue.c; \ then mv -f ".deps/queue.Tpo" ".deps/queue.Plo"; \ else rm -f ".deps/queue.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT queue.lo -MD -MP -MF .deps/queue.Tpo -c queue.c -fPIC -DPIC -o .libs/queue.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT queue.lo -MD -MP -MF .deps/queue.Tpo -c queue.c -o queue.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT abstract_io.lo -MD -MP -MF ".deps/abstract_io.Tpo" \ -c -o abstract_io.lo `test -f 'abstract_io.c' || echo '/tmp/libol-0.3.17/src/'`abstract_io.c; \ then mv -f ".deps/abstract_io.Tpo" ".deps/abstract_io.Plo"; \ else rm -f ".deps/abstract_io.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT abstract_io.lo -MD -MP -MF .deps/abstract_io.Tpo -c abstract_io.c -fPIC -DPIC -o .libs/abstract_io.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT abstract_io.lo -MD -MP -MF .deps/abstract_io.Tpo -c abstract_io.c -o abstract_io.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT gc.lo -MD -MP -MF ".deps/gc.Tpo" \ -c -o gc.lo `test -f 'gc.c' || echo '/tmp/libol-0.3.17/src/'`gc.c; \ then mv -f ".deps/gc.Tpo" ".deps/gc.Plo"; \ else rm -f ".deps/gc.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT gc.lo -MD -MP -MF .deps/gc.Tpo -c gc.c -fPIC -DPIC -o .libs/gc.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT gc.lo -MD -MP -MF .deps/gc.Tpo -c gc.c -o gc.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT list.lo -MD -MP -MF ".deps/list.Tpo" \ -c -o list.lo `test -f 'list.c' || echo '/tmp/libol-0.3.17/src/'`list.c; \ then mv -f ".deps/list.Tpo" ".deps/list.Plo"; \ else rm -f ".deps/list.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT list.lo -MD -MP -MF .deps/list.Tpo -c list.c -fPIC -DPIC -o .libs/list.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT list.lo -MD -MP -MF .deps/list.Tpo -c list.c -o list.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT read_line.lo -MD -MP -MF ".deps/read_line.Tpo" \ -c -o read_line.lo `test -f 'read_line.c' || echo '/tmp/libol-0.3.17/src/'`read_line.c; \ then mv -f ".deps/read_line.Tpo" ".deps/read_line.Plo"; \ else rm -f ".deps/read_line.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT read_line.lo -MD -MP -MF .deps/read_line.Tpo -c read_line.c -fPIC -DPIC -o .libs/read_line.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT read_line.lo -MD -MP -MF .deps/read_line.Tpo -c read_line.c -o read_line.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT xalloc.lo -MD -MP -MF ".deps/xalloc.Tpo" \ -c -o xalloc.lo `test -f 'xalloc.c' || echo '/tmp/libol-0.3.17/src/'`xalloc.c; \ then mv -f ".deps/xalloc.Tpo" ".deps/xalloc.Plo"; \ else rm -f ".deps/xalloc.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT xalloc.lo -MD -MP -MF .deps/xalloc.Tpo -c xalloc.c -fPIC -DPIC -o .libs/xalloc.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT xalloc.lo -MD -MP -MF .deps/xalloc.Tpo -c xalloc.c -o xalloc.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT alist.lo -MD -MP -MF ".deps/alist.Tpo" \ -c -o alist.lo `test -f 'alist.c' || echo '/tmp/libol-0.3.17/src/'`alist.c; \ then mv -f ".deps/alist.Tpo" ".deps/alist.Plo"; \ else rm -f ".deps/alist.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT alist.lo -MD -MP -MF .deps/alist.Tpo -c alist.c -fPIC -DPIC -o .libs/alist.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT alist.lo -MD -MP -MF .deps/alist.Tpo -c alist.c -o alist.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT stream_buffer.lo -MD -MP -MF ".deps/stream_buffer.Tpo" \ -c -o stream_buffer.lo `test -f 'stream_buffer.c' || echo '/tmp/libol-0.3.17/src/'`stream_buffer.c; \ then mv -f ".deps/stream_buffer.Tpo" ".deps/stream_buffer.Plo"; \ else rm -f ".deps/stream_buffer.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT stream_buffer.lo -MD -MP -MF .deps/stream_buffer.Tpo -c stream_buffer.c -fPIC -DPIC -o .libs/stream_buffer.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT stream_buffer.lo -MD -MP -MF .deps/stream_buffer.Tpo -c stream_buffer.c -o stream_buffer.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT pkt_buffer.lo -MD -MP -MF ".deps/pkt_buffer.Tpo" \ -c -o pkt_buffer.lo `test -f 'pkt_buffer.c' || echo '/tmp/libol-0.3.17/src/'`pkt_buffer.c; \ then mv -f ".deps/pkt_buffer.Tpo" ".deps/pkt_buffer.Plo"; \ else rm -f ".deps/pkt_buffer.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT pkt_buffer.lo -MD -MP -MF .deps/pkt_buffer.Tpo -c pkt_buffer.c -fPIC -DPIC -o .libs/pkt_buffer.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT pkt_buffer.lo -MD -MP -MF .deps/pkt_buffer.Tpo -c pkt_buffer.c -o pkt_buffer.o >/dev/null 2>&1 if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT resource.lo -MD -MP -MF ".deps/resource.Tpo" \ -c -o resource.lo `test -f 'resource.c' || echo '/tmp/libol-0.3.17/src/'`resource.c; \ then mv -f ".deps/resource.Tpo" ".deps/resource.Plo"; \ else rm -f ".deps/resource.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT resource.lo -MD -MP -MF .deps/resource.Tpo -c resource.c -fPIC -DPIC -o .libs/resource.o gcc -DHAVE_CONFIG_H -I. -I/tmp/libol-0.3.17/src -I. -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -g -O2 -Wall -O2 -MT resource.lo -MD -MP -MF .deps/resource.Tpo -c resource.c -o resource.o >/dev/null 2>&1 /bin/sh ../libtool --mode=link gcc -g -O2 -Wall -O2 -o libol.la -rpath /usr/local/lib format.lo io.lo werror.lo queue.lo abstract_io.lo gc.lo list.lo read_line.lo xalloc.lo alist.lo stream_buffer.lo pkt_buffer.lo resource.lo -lnsl gcc -shared .libs/format.o .libs/io.o .libs/werror.o .libs/queue.o .libs/abstract_io.o .libs/gc.o .libs/list.o .libs/read_line.o .libs/xalloc.o .libs/alist.o .libs/stream_buffer.o .libs/pkt_buffer.o .libs/resource.o -lnsl -Wl,-soname -Wl,libol.so.0 -o .libs/libol.so.0.0.0 (cd .libs && rm -f libol.so.0 && ln -s libol.so.0.0.0 libol.so.0) (cd .libs && rm -f libol.so && ln -s libol.so.0.0.0 libol.so) ar cru .libs/libol.a format.o io.o werror.o queue.o abstract_io.o gc.o list.o read_line.o xalloc.o alist.o stream_buffer.o pkt_buffer.o resource.o ranlib .libs/libol.a creating libol.la (cd .libs && rm -f libol.la && ln -s ../libol.la libol.la) /tmp/libol-0.3.17/utils/make_class <io.c >io.c.xt /bin/sh: /tmp/libol-0.3.17/utils/make_class: /usr/bin/scsh: bad interpreter: No such file or directory make[2]: *** [io.c.x] Error 126 make[2]: Leaving directory `/tmp/libol-0.3.17/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/tmp/libol-0.3.17/src' make: *** [all-recursive] Error 1
--- Ursprüngliche Nachricht --- Von: Balazs Scheidler <bazsi@balabit.hu> An: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Betreff: Re: [syslog-ng] "MSG_DONTWAIT undeclared"-error during compiling libol-0.3.17 on HP-UX 11.00/11.11 Datum: Mon, 23 Jan 2006 10:01:51 +0100
On Fri, 2006-01-20 at 15:37 +0100, Tob_Sch@gmx.de wrote:
Hi,
compiling libol-0.3.16 (and syslog-ng-1.6.8) on HP-UX 11.00/11.11 worked without any problems. Today, I tried to compile libol-0.3.17 (and syslog-ng-1.6.9).
Can you check if the below patch works?
diff -u -r1.45 io.c --- io.c 23 Nov 2005 08:49:21 -0000 1.45 +++ io.c 23 Jan 2006 09:01:03 -0000 @@ -490,13 +490,27 @@ int res; UINT8 eofbuf[1];
+#ifdef MSG_DONTWAIT res = recv(self->fd, eofbuf, 1, MSG_PEEK | MSG_DONTWAIT); +#else + { + int old_flags; + + old_flags = fcntl(self->fd, F_GETFL); + fcntl(self->fd, F_SETFL, old_flags | O_NONBLOCK); + res = recv(self->fd, eofbuf, 1, MSG_PEEK); + if ((old_flags & O_NONBLOCK) == 0) + fcntl(self->fd, F_SETFL, old_flags); + } +#endif + if (res == 0) { /* EOF detected */ werror("io.c: do_write: write() failed, EOF detected\n"); errno = ECONNRESET; return -1; } + res = write(self->fd, data, length); saved_errno = errno;
-- Bazsi
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
Touch io.c.x after patching or install scsh. (or read the FAQ on scsh) On Wed, 2006-01-25 at 18:08 +0100, Tob_Sch@gmx.de wrote:
Hi,
it now works with HP-UX, but now I get a little error at the end of "make" with SLES 9 x86_64, although libol.la is created (without the patch, it works):
-- Bazsi
Thank you, Bazsi! It works! Tobias
--- Ursprüngliche Nachricht --- Von: Balazs Scheidler <bazsi@balabit.hu> An: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Betreff: Re: [syslog-ng] "MSG_DONTWAIT undeclared"-error during compiling libol-0.3.17 on HP-UX 11.00/11.11 Datum: Wed, 25 Jan 2006 18:17:10 +0100
Touch io.c.x after patching or install scsh. (or read the FAQ on scsh)
On Wed, 2006-01-25 at 18:08 +0100, Tob_Sch@gmx.de wrote:
Hi,
it now works with HP-UX, but now I get a little error at the end of "make" with SLES 9 x86_64, although libol.la is created (without the patch, it works):
-- Bazsi
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
Hi, we compiled libol-0.3.17 / syslog-ng-1.6.9 on AIX 5.3. When using following entry in syslog-ng.conf: destination tempfile { file("/tmp/syslog-ng-test.log" template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(yes)); }; tail -f /tmp/syslog-ng-test.log : 2006-03-16 12:36:39 aixserver auth|security:info sshd[258116]: Connection from 111.111.111.111 port 48948 : When using following entry in syslog-ng.conf: destination tempfile { file("/tmp/syslog-ng-test.log" template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSGONLY\n") template-escape(yes)); }; tail -f /tmp/syslog-ng-test.log : 2006-03-16 12:38:47 aixserver nfo sshd[143710]: Connection from 111.111.111.111 port 64747 : If the destination is not a tempfile but a socket on a remote server, the remote syslog-ng daemon ignores both logs produced with the help parameter $MSG and $MSGONLY. Thanks in advance for help or a patch. -- "Feel free" mit GMX FreeMail! Monat f�r Monat 10 FreeSMS inklusive! http://www.gmx.net
Hi, I forgot to say following: It seems, that $MSGONLY only cuts the first 15 characters of $MSG (please see output below) --- Weitergeleitete Nachricht --- Von: Tob_Sch@gmx.de An: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Betreff: Parameter MSGONLY in syslog-ng.conf doesn't work properly Datum: Thu, 16 Mar 2006 13:08:01 +0100 (MET) Hi, we compiled libol-0.3.17 / syslog-ng-1.6.9 on AIX 5.3. When using following entry in syslog-ng.conf: destination tempfile { file("/tmp/syslog-ng-test.log" template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(yes)); }; tail -f /tmp/syslog-ng-test.log : 2006-03-16 12:36:39 aixserver auth|security:info sshd[258116]: Connection
from 111.111.111.111 port 48948 :
When using following entry in syslog-ng.conf: destination tempfile { file("/tmp/syslog-ng-test.log" template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSGONLY\n") template-escape(yes)); }; tail -f /tmp/syslog-ng-test.log : 2006-03-16 12:38:47 aixserver nfo sshd[143710]: Connection from 111.111.111.111 port 64747 : If the destination is not a tempfile but a socket on a remote server, the remote syslog-ng daemon ignores both logs produced with the help parameter $MSG and $MSGONLY. Thanks in advance for help or a patch. -- Echte DSL-Flatrate dauerhaft f�r 0,- Euro*! "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
Hi, System information where this problem has been discovered: OS: AIX 5.3 Syslog NG version: 1.6.9 libol: 0.3.17 aixhost53: <13>Mar 22 10:11:50 src@aixhost53 auth|security:info sshd[454900]: Connection from 192.168.10.20 port 42498 <13>Mar 22 10:11:50 src@aixhost53 auth|security:info sshd[454900]: Failed none for root from 192.168.10.20 port 42498 ssh2 As you can see above, the AIX 5.3 system syslogd appends the facility and priority level to the message. I found no way to stop AIX's syslogd doing this nasty thing. Nevertheless when syslog-ng receives this message it is unable to parse the fields correctly because it reads eg. "auth|security:info" as program name. I've spend a quick look at the code, namely 'macros.c' where it reads "colon = memchr(msg->msg->data, ':', msg->msg->length);" in line 398 macros.c: ... case M_MSGONLY: { char *colon; int ofs; colon = memchr(msg->msg->data, ':', msg->msg->length); if (!colon) { ofs = 0; } else { // origofs = (colon - (char *) msg->msg->data) + 2; ofs = (colon - (char *) msg->msg->data) +6; if (ofs > msg->msg->length) ofs = msg->msg->length; } length = append_string(dest, left, (char *) msg->msg->data + ofs, msg->msg->length - ofs, escape); break; } ... syslog-ng.conf: destination tempfile { file("/tmp/syslog-ng.debug" template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSGONLY\n") template-esc ape(yes)); }; The syslog-ng.conf destination entry above causes that the message is cut off at "nfo sshd ...." and thus MSGONLY would read 'nfo sshd[454900]: Connection from 192.168.10.20 port 42498' instead of "Connection from 192.168.10.20 port 42498" @Balazs: could you investigate this, if there is a fix possible for this "parsing error" ? thx Jochen
Just out of curiousity, what compiler did you use to compile syslog-ng. For our AIX hosts, we tried to use the xlc IBM compiler, and although we don't get any uncorrectable errors during compilation, we just get a core dump any time we try to start it. Any AIX users out there that care to share the build script with me? -- Evan Rempel erempel@uvic.ca Senior Programmer Analyst 250.721.7691 Computing Services University of Victoria
participants (4)
-
Balazs Scheidler
-
Evan Rempel
-
Jochen Kirn
-
Tob_Sch@gmx.de