Re: [syslog-ng] "MSG_DONTWAIT undeclared"-error during compiling libol-0.3.17 on HP-UX 11.00/11.11

Tob_Sch at gmx.de Tob_Sch at gmx.de
Wed Jan 25 18:08:27 CET 2006


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 at balabit.hu>
> An: Syslog-ng users' and developers' mailing list
> <syslog-ng at 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 at 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 at 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


More information about the syslog-ng mailing list