afinet.c:: Compilation help needed on HP-UX 11i
afunix.c: In function 'afunix_sd_init': afunix.c:73: warning: comparison is always true due to limited range of data type if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -g -O2 -Wall -g -MT afinet.o -MD -MP -MF ".deps/afinet.Tpo" \ -c -o afinet.o `test -f 'afinet.c' || echo './'`afinet.c; \ then mv -f ".deps/afinet.Tpo" ".deps/afinet.Po"; \ else rm -f ".deps/afinet.Tpo"; exit 1; \ fi afinet.c: In function 'afinet_setup_socket': afinet.c:156: error: storage size of 'mreq' isn't known afinet.c:156: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. # uname -a HP-UX wlggh010 B.11.23 U 9000/785 2006586620 unlimited-user license # Packages installed on my Machine are # swlist |grep gcc gcc 4.1.1 gcc libgcc 4.1.1 libgcc # swlist |grep glib glib 1.2.10 glib glib2 2.12.8 glib2 # --------------------------------- New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
On Mon, 2007-01-29 at 07:42 +0000, Shamim wrote:
afunix.c: In function 'afunix_sd_init': afunix.c:73: warning: comparison is always true due to limited range of data type if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -g -O2 -Wall -g -MT afinet.o -MD -MP -MF ".deps/afinet.Tpo" \ -c -o afinet.o `test -f 'afinet.c' || echo './'`afinet.c; \ then mv -f ".deps/afinet.Tpo" ".deps/afinet.Po"; \ else rm -f ".deps/afinet.Tpo"; exit 1; \ fi afinet.c: In function 'afinet_setup_socket': afinet.c:156: error: storage size of 'mreq' isn't known afinet.c:156: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop.
struct ip_mreq is required for enabling multicast on a socket. Does HP-UX have IP multicast support? Maybe it's only a missing header? Can you check the output of: find /usr/include -name \*.h | xargs grep "struct ip_mreq" (or wherever system headers are located) -- Bazsi
Hi, output of the command is as below: # find /usr/include -name \*.h | xargs grep "struct ip_mreq" /usr/include/netinet/in.h:struct ip_mreq { # and the value of PATH Variable: # echo $PATH /usr/include:/usr/include/netinet:/opt/soe/local:/usr/local/doc/libgcc:/usr/local/bin:/usr/local/lib:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/kwdb/bin:/opt/graphics:/opt/soe/bos/bin:/opt/tng/services/bin:/opt/tng/services/tools:/opt/tng/agents/bin # It is HP-UX-11.23 PA RISC2 which support IP Multicast. Thanks Balazs Scheidler <bazsi@balabit.hu> wrote: On Mon, 2007-01-29 at 07:42 +0000, Shamim wrote:
afunix.c: In function 'afunix_sd_init': afunix.c:73: warning: comparison is always true due to limited range of data type if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -g -O2 -Wall -g -MT afinet.o -MD -MP -MF ".deps/afinet.Tpo" \ -c -o afinet.o `test -f 'afinet.c' || echo './'`afinet.c; \ then mv -f ".deps/afinet.Tpo" ".deps/afinet.Po"; \ else rm -f ".deps/afinet.Tpo"; exit 1; \ fi afinet.c: In function 'afinet_setup_socket': afinet.c:156: error: storage size of 'mreq' isn't known afinet.c:156: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop.
struct ip_mreq is required for enabling multicast on a socket. Does HP-UX have IP multicast support? Maybe it's only a missing header? Can you check the output of: find /usr/include -name \*.h | xargs grep "struct ip_mreq" (or wherever system headers are located) -- Bazsi --------------------------------- What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
On Tue, 2007-01-30 at 07:41 +0000, Shamim wrote:
Hi,
output of the command is as below:
# find /usr/include -name \*.h | xargs grep "struct ip_mreq" /usr/include/netinet/in.h:struct ip_mreq { #
This patch should fix it: --- orig/src/afinet.c +++ mod/src/afinet.c @@ -27,6 +27,7 @@ #include <sys/socket.h> #include <arpa/inet.h> #include <netdb.h> +#include <netinet/in.h> #include <string.h>
-- Bazsi
Hi Everybody, *************************************************************************************** My System H/w is HP-UX 11.11 Model: 9000/785/B2000 OS mode: 64 bit ************************************************************************************* I'm trying to compile syslog-ng-2.0.2.on HP-UX machine and it give beloe error. afinet.c: In function 'afinet_setup_socket': afinet.c:157: error: storage size of 'mreq' isn't known afinet.c:157: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. # However when I comment this function and it get compiled, but it didn't send message to central server. The out put of includea header file is : ******************************************************************************** # find /usr/include -name \*.h | xargs grep "struct ip_mreq" /usr/include/netinet/in.h:struct ip_mreq { # ********************************************************************************** IF anybody has faced same problem , please share with me, Thanks in advance Shamimuddin CSC Noida --------------------------------- New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
On Mon, 2007-02-26 at 15:50 +0000, Shamim wrote:
Hi Everybody,
*************************************************************************************** My System H/w is HP-UX 11.11 Model: 9000/785/B2000 OS mode: 64 bit ************************************************************************************* I'm trying to compile syslog-ng-2.0.2.on HP-UX machine and it give beloe error.
afinet.c: In function 'afinet_setup_socket': afinet.c:157: error: storage size of 'mreq' isn't known afinet.c:157: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. #
However when I comment this function and it get compiled, but it didn't send message to central server.
The out put of includea header file is : ******************************************************************************** # find /usr/include -name \*.h | xargs grep "struct ip_mreq" /usr/include/netinet/in.h:struct ip_mreq { # **********************************************************************************
IF anybody has faced same problem , please share with me, Thanks in advance
I fixed this problem after 2.0.2 was released. Try a newer snapshot. -- Bazsi
Hi, I'm trying to compile syslog-ng-2.0.2(syslog-ng-2.0.2+20070228.tar, downloaded latest snapshot on 28 Feb 2007) on Solaris 8 (# isainfo -kv 64-bit sparcv9 kernel modules #) when I execute 'make' it gives errors in glib-2.0 libraries , details below: ****************************************************************************************** In file included from /usr/local/include/glib-2.0/glib/galloca.h:30, from /usr/local/include/glib-2.0/glib.h:30, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gtypes.h:32: error: syntax error before "typedef" In file included from /usr/local/include/glib-2.0/glib.h:31, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/garray.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/garray.h:34: error: syntax error before "typedef" In file included from /usr/local/include/glib-2.0/glib/gerror.h:24, from /usr/local/include/glib-2.0/glib/gthread.h:30, from /usr/local/include/glib-2.0/glib/gasyncqueue.h:30, from /usr/local/include/glib-2.0/glib.h:32, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gquark.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gquark.h:34: error: syntax error before "typedef" /usr/local/include/glib-2.0/glib/gquark.h:41: error: syntax error before "gchar" /usr/local/include/glib-2.0/glib/gquark.h:41: error: syntax error before "G_GNUC_CONST" /usr/local/include/glib-2.0/glib/gquark.h:41: warning: type defaults to `int' in declaration of `G_GNUC_CONST' /usr/local/include/glib-2.0/glib/gquark.h:41: warning: data definition has no type or storage class In file included from /usr/local/include/glib-2.0/glib/gthread.h:30, from /usr/local/include/glib-2.0/glib/gasyncqueue.h:30, from /usr/local/include/glib-2.0/glib.h:32, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gerror.h:26: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gerror.h:28: error: syntax error before "typedef" /usr/local/include/glib-2.0/glib/gerror.h:40: error: syntax error before "G_GNUC_PRINTF" /usr/local/include/glib-2.0/glib/gerror.h:40: warning: type defaults to `int' in declaration of `G_GNUC_PRINTF' /usr/local/include/glib-2.0/glib/gerror.h:40: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gerror.h:60: error: syntax error before "G_GNUC_PRINTF" /usr/local/include/glib-2.0/glib/gerror.h:60: warning: type defaults to `int' in declaration of `G_GNUC_PRINTF' /usr/local/include/glib-2.0/glib/gerror.h:60: warning: data definition has no type or storage class In file included from /usr/local/include/glib-2.0/glib/gthread.h:32, from /usr/local/include/glib-2.0/glib/gasyncqueue.h:30, from /usr/local/include/glib-2.0/glib.h:32, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gatomic.h:35: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gatomic.h:37: error: syntax error before "gint" In file included from /usr/local/include/glib-2.0/glib/gasyncqueue.h:30, from /usr/local/include/glib-2.0/glib.h:32, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gthread.h:34: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gthread.h:39: error: syntax error before "extern" /usr/local/include/glib-2.0/glib/gthread.h:255: error: syntax error before "GSystemThread" /usr/local/include/glib-2.0/glib/gthread.h:255: warning: no semicolon at end of struct or union In file included from /usr/local/include/glib-2.0/glib.h:32, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gasyncqueue.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gasyncqueue.h:34: error: syntax error before "typedef" In file included from /usr/local/include/glib-2.0/glib.h:34, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gbacktrace.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gbacktrace.h:43: error: syntax error before "void" In file included from /usr/local/include/glib-2.0/glib/glist.h:30, from /usr/local/include/glib-2.0/glib/gcache.h:30, from /usr/local/include/glib-2.0/glib.h:35, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gmem.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gmem.h:34: error: syntax error before "typedef" /usr/local/include/glib-2.0/glib/gmem.h:48: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gmem.h:48: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gmem.h:48: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gmem.h:49: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gmem.h:49: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gmem.h:49: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gmem.h:53: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gmem.h:53: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gmem.h:53: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gmem.h:74: error: syntax error before "n_bytes" /usr/local/include/glib-2.0/glib/gmem.h:76: error: syntax error before "gsize" /usr/local/include/glib-2.0/glib/gmem.h:79: error: syntax error before "n_blocks" /usr/local/include/glib-2.0/glib/gmem.h:81: error: syntax error before "n_bytes" /usr/local/include/glib-2.0/glib/gmem.h:83: error: syntax error before "gsize" In file included from /usr/local/include/glib-2.0/glib/gcache.h:30, from /usr/local/include/glib-2.0/glib.h:35, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/glist.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/glist.h:34: error: syntax error before "typedef" In file included from /usr/local/include/glib-2.0/glib.h:35, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gcache.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gcache.h:34: error: syntax error before "typedef" In file included from /usr/local/include/glib-2.0/glib.h:36, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gcompletion.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gcompletion.h:34: error: syntax error before "typedef" /usr/local/include/glib-2.0/glib/gcompletion.h:43: error: syntax error before "gsize" In file included from /usr/local/include/glib-2.0/glib/gconvert.h:30, from /usr/local/include/glib-2.0/glib.h:37, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/lib/../lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stddef.h:151: error: syntax error before "typedef" In file included from /usr/local/include/glib-2.0/glib.h:37, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gconvert.h:35: error: syntax error before "typedef" /usr/local/include/glib-2.0/glib/gconvert.h:56: error: syntax error before "gsize" /usr/local/include/glib-2.0/glib/gconvert.h:63: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gconvert.h:68: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:68: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:70: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gconvert.h:74: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:74: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:76: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gconvert.h:82: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:82: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:88: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gconvert.h:91: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:91: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:93: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gconvert.h:96: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:96: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:109: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gconvert.h:112: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:112: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:114: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gconvert.h:117: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:117: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:121: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gconvert.h:121: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:121: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:125: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gconvert.h:125: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:125: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:126: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gconvert.h:126: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:126: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:127: error: syntax error before "gchar" /usr/local/include/glib-2.0/glib/gconvert.h:129: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gconvert.h:129: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:129: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gconvert.h:131: error: syntax error before "G_GNUC_MALLOC" /usr/local/include/glib-2.0/glib/gconvert.h:131: warning: type defaults to `int' in declaration of `G_GNUC_MALLOC' /usr/local/include/glib-2.0/glib/gconvert.h:131: warning: data definition has no type or storage class In file included from /usr/local/include/glib-2.0/glib.h:38, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gdataset.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gdataset.h:34: error: syntax error before "typedef" In file included from /usr/local/include/glib-2.0/glib.h:39, from syslog-ng.h:37, from misc.h:27, from misc.c:24: /usr/local/include/glib-2.0/glib/gdate.h:32: error: syntax error before "G_BEGIN_DECLS" /usr/local/include/glib-2.0/glib/gdate.h:43: error: syntax error before "typedef" /usr/local/include/glib-2.0/glib/gdate.h:130: error: syntax error before "G_GNUC_CONST" /usr/local/include/glib-2.0/glib/gdate.h:130: warning: type defaults to `int' in declaration of `G_GNUC_CONST' /usr/local/include/glib-2.0/glib/gdate.h:130: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gdate.h:131: error: syntax error before "G_GNUC_CONST" /usr/local/include/glib-2.0/glib/gdate.h:131: warning: type defaults to `int' in declaration of `G_GNUC_CONST' /usr/local/include/glib-2.0/glib/gdate.h:131: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gdate.h:132: error: syntax error before "G_GNUC_CONST" /usr/local/include/glib-2.0/glib/gdate.h:132: warning: type defaults to `int' in declaration of `G_GNUC_CONST' /usr/local/include/glib-2.0/glib/gdate.h:132: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gdate.h:133: error: syntax error before "G_GNUC_CONST" /usr/local/include/glib-2.0/glib/gdate.h:133: warning: type defaults to `int' in declaration of `G_GNUC_CONST' /usr/local/include/glib-2.0/glib/gdate.h:133: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gdate.h:134: error: syntax error before "G_GNUC_CONST" ------output truncated----------------------------- /usr/local/include/glib-2.0/glib/gstrfuncs.h:104: error: syntax error before "g_strlcpy" /usr/local/include/glib-2.0/glib/gstrfuncs.h:106: error: syntax error before "gsize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:106: warning: type defaults to `int' in declaration of `g_strlcpy' /usr/local/include/glib-2.0/glib/gstrfuncs.h:106: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gstrfuncs.h:107: error: syntax error before "g_strlcat" /usr/local/include/glib-2.0/glib/gstrfuncs.h:109: error: syntax error before "gsize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:109: warning: type defaults to `int' in declaration of `g_strlcat' /usr/local/include/glib-2.0/glib/gstrfuncs.h:109: warning: data definition has no type or storage class /usr/local/include/glib-2.0/glib/gstrfuncs.h:111: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:116: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:156: error: syntax error before "gsize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:158: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:160: error: syntax error before "gssize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:188: error: syntax error before "gsize" /usr/local/include/glib-2.0/glib/gstrfuncs.h:189: error: syntax error before "length" make: Fatal error: Command failed for target `misc.o' Current working directory /shamim/syslog-ng-2.0.2/src make: Fatal error: Command failed for target `all-recursive' Current working directory /shamim/syslog-ng-2.0.2 make: Fatal error: Command failed for target `all' ******************************************************************************************************** Any suggestion please. Or anyone has done it... Shamimuddin CSC Noida --------------------------------- New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
Hi Bazsi, I downloaded a newer snapshot as per your suggestion from http://www.balabit.com/downloads/syslog-ng/2.0/src-snapshot/ and tried to compile it. It gives me the same problem ******************************************************************************************* afunix.c: In function 'afunix_sd_init': afunix.c:73: warning: comparison is always true due to limited range of data type if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/opt/soe/local/syslog-ng-2.0.2/eventlog/include/eventlog -D_GNU_SOURCE -g -O2 -Wall -g -MT afinet.o -MD -MP -MF ".deps/afinet.Tpo" \ -c -o afinet.o `test -f 'afinet.c' || echo './'`afinet.c; \ then mv -f ".deps/afinet.Tpo" ".deps/afinet.Po"; \ else rm -f ".deps/afinet.Tpo"; exit 1; \ fi afinet.c: In function 'afinet_setup_socket': afinet.c:157: error: storage size of 'mreq' isn't known afinet.c:157: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. # pwd /shamim/syslog-ng-2.0.2+20070201 # *********************************************************************************************************** Then I downloaded even more newer spanshot. Still the same problem ########################################################### # cd syslog-ng-2.0.2+20070228 # ./configure --enable-dynamic-linking --prefix=/opt/soe/local/syslog-ng-2.0.2 checking for a BSD-compatible install... ./install-sh -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for gcc option to accept ANSI C... none needed checking for bison... bison -y checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking whether make sets $(MAKE)... (cached) yes checking for ranlib... ranlib checking how to enable static linking for certain libraries... HP-UX checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... no checking for unistd.h... yes checking dmalloc.h usability... no checking dmalloc.h presence... no checking for dmalloc.h... no checking for strings.h... (cached) yes checking openssl/ssl.h usability... no checking openssl/ssl.h presence... no checking for openssl/ssl.h... no checking getopt.h usability... no checking getopt.h presence... no checking for getopt.h... no checking stropts.h usability... yes checking stropts.h presence... yes checking for stropts.h... yes checking sys/strlog.h usability... yes checking sys/strlog.h presence... yes checking for sys/strlog.h... yes checking door.h usability... no checking door.h presence... no checking for door.h... no checking whether struct tm is in sys/time.h or time.h... time.h checking for struct tm.tm_gmtoff... no checking for I_CONSLOG... no checking for O_LARGEFILE... yes checking for struct sockaddr_storage... yes checking for door_create in -ldoor... no checking for socket in -lsocket... no checking for nanosleep in -lrt... yes checking for gethostbyname in -lnsl... yes checking for regexec in -lregex... no checking for res_init in -lresolv... no checking for strdup... yes checking for strtol... yes checking for inet_aton... yes checking for inet_ntoa... yes checking for getopt_long... no checking for getaddrinfo... yes checking for getutent... yes checking whether to enable Sun STREAMS support... no checking whether to enable Sun door support... no checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for GLIB_CFLAGS... -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include checking for GLIB_LIBS... -L/usr/local/lib -lglib-2.0 -lintl -liconv checking for EVTLOG_CFLAGS... -I/opt/soe/local/syslog-ng-2.0.2/eventlog/include/eventlog checking for EVTLOG_LIBS... -L/opt/soe/local/syslog-ng-2.0.2/eventlog/lib -levtlog checking for LIBNET... yes checking for static GLib libraries... no configure: creating ./config.status config.status: creating dist.conf config.status: creating Makefile config.status: creating syslog-ng.spec.bb config.status: creating src/Makefile config.status: creating doc/Makefile config.status: creating doc/docvars.xml config.status: creating contrib/Makefile config.status: creating tests/Makefile config.status: creating solbuild/Makefile config.status: creating tests/unit/Makefile config.status: creating tests/functional/Makefile config.status: creating config.h config.status: executing depfiles commands # if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/opt/soe/local/syslog-ng-2.0.2/eventlog/include/eventlog -DLIBNET_BIG_ENDIAN -D_GNU_SOURCE -g -O2 -Wall -g -MT afinet.o -MD -MP -MF ".deps/afinet.Tpo" \ -c -o afinet.o `test -f 'afinet.c' || echo './'`afinet.c; \ then mv -f ".deps/afinet.Tpo" ".deps/afinet.Po"; \ else rm -f ".deps/afinet.Tpo"; exit 1; \ fi afinet.c: In function 'afinet_setup_socket': afinet.c:157: error: storage size of 'mreq' isn't known afinet.c:157: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. # ############################################################## Pease advise. Thanks Shamimuddin CSC Noida Balazs Scheidler <bazsi@balabit.hu> wrote: On Mon, 2007-02-26 at 15:50 +0000, Shamim wrote:
Hi Everybody,
*************************************************************************************** My System H/w is HP-UX 11.11 Model: 9000/785/B2000 OS mode: 64 bit ************************************************************************************* I'm trying to compile syslog-ng-2.0.2.on HP-UX machine and it give beloe error.
afinet.c: In function 'afinet_setup_socket': afinet.c:157: error: storage size of 'mreq' isn't known afinet.c:157: warning: unused variable 'mreq' *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. #
However when I comment this function and it get compiled, but it didn't send message to central server.
The out put of includea header file is : ******************************************************************************** # find /usr/include -name \*.h | xargs grep "struct ip_mreq" /usr/include/netinet/in.h:struct ip_mreq { # **********************************************************************************
IF anybody has faced same problem , please share with me, Thanks in advance
I fixed this problem after 2.0.2 was released. Try a newer snapshot. -- Bazsi --------------------------------- Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. Do it now...
On Thu, 2007-03-01 at 09:40 +0000, Shamim wrote:
Hi Bazsi, I downloaded a newer snapshot as per your suggestion from http://www.balabit.com/downloads/syslog-ng/2.0/src-snapshot/ and tried to compile it. It gives me the same problem ******************************************************************************************* afunix.c: In function 'afunix_sd_init': afunix.c:73: warning: comparison is always true due to limited range of data type if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/opt/soe/local/syslog-ng-2.0.2/eventlog/include/eventlog -D_GNU_SOURCE -g -O2 -Wall -g -MT afinet.o -MD -MP -MF ".deps/afinet.Tpo" \ -c -o afinet.o `test -f 'afinet.c' || echo './'`afinet.c; \ then mv -f ".deps/afinet.Tpo" ".deps/afinet.Po"; \ else rm -f ".deps/afinet.Tpo"; exit 1; \ fi afinet.c: In function 'afinet_setup_socket': afinet.c:157: error: storage size of 'mreq' isn't known afinet.c:157: warning: unused variable 'mreq' *** Error exit code 1 Stop.
Does your version of afinet.c #include <netinet/in.h> in the beginning of the file? Mine does. Please post these questions to the mailing list, I'm quite overwhelmed usually, so I'm not always able to respond to compilation problems. Alternatively you can also purchase binary packages for your preferred platform from us. For more information: http://www.balabit.com/products/syslog_ng/offer/euro.bbq -- Bazsi
Sorry, I meant to send this message in private. As I see the original message was also sent to the list. So, do you have the quoted include file in your afinet.c source file? On Thu, 2007-03-01 at 11:37 +0100, Balazs Scheidler wrote:
On Thu, 2007-03-01 at 09:40 +0000, Shamim wrote:
Hi Bazsi, I downloaded a newer snapshot as per your suggestion from http://www.balabit.com/downloads/syslog-ng/2.0/src-snapshot/ and tried to compile it. It gives me the same problem ******************************************************************************************* afunix.c: In function 'afunix_sd_init': afunix.c:73: warning: comparison is always true due to limited range of data type if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/opt/soe/local/syslog-ng-2.0.2/eventlog/include/eventlog -D_GNU_SOURCE -g -O2 -Wall -g -MT afinet.o -MD -MP -MF ".deps/afinet.Tpo" \ -c -o afinet.o `test -f 'afinet.c' || echo './'`afinet.c; \ then mv -f ".deps/afinet.Tpo" ".deps/afinet.Po"; \ else rm -f ".deps/afinet.Tpo"; exit 1; \ fi afinet.c: In function 'afinet_setup_socket': afinet.c:157: error: storage size of 'mreq' isn't known afinet.c:157: warning: unused variable 'mreq' *** Error exit code 1 Stop.
Does your version of afinet.c #include <netinet/in.h> in the beginning of the file? Mine does.
Please post these questions to the mailing list, I'm quite overwhelmed usually, so I'm not always able to respond to compilation problems.
-- Bazsi
participants (2)
-
Balazs Scheidler
-
Shamim