[syslog-ng]Installing on Mac OS X

Balazs Scheidler bazsi@balabit.hu
Fri, 20 Dec 2002 17:22:51 +0100


On Fri, Dec 20, 2002 at 11:03:12AM -0500, Ken Toney wrote:
> I am trying to install syslog-ng on Mac OS X. I am using version 1.5.24
> of syslog-ng and libol 0.3.6 with autoconf 2.5. After installing libol, I
> configured syslog with no apparent difficulties. When I ran 'make' for
> syslog, I had errors. Anybody know what this means?
> 
> Make output:
> Making all in src
> make  username
> Making all in .
> gcc -DHAVE_CONFIG_H -I. -I/Users/username/syslog-ng-1.5.24/src -I.     -g
> -O2 -Wall -I/Users/username/syslog-ng-1.5.24/libol-0.3.6/src -
> D_GNU_SOURCE -c main.c
> gcc -DHAVE_CONFIG_H -I. -I/Users/username/syslog-ng-1.5.24/src -I.     -g
> -O2 -Wall -I/Users/username/syslog-ng-1.5.24/libol-0.3.6/src -
> D_GNU_SOURCE -c sources.c
> sources.c: In function `do_read_line':
> sources.c:95: warning: passing arg 5 of pointer to function from
> incompatible pointer type
> gcc -DHAVE_CONFIG_H -I. -I/Users/username/syslog-ng-1.5.24/src -I.     -g
> -O2 -Wall -I/Users/username/syslog-ng-1.5.24/libol-0.3.6/src -
> D_GNU_SOURCE -c center.c
> center.c:157: illegal expression, found `}'
> cpp-precomp: warning: errors during smart preprocessing, retrying in
> basic mode
> center.c: In function `do_distribute_log':
> center.c:157: warning: deprecated use of label at end of compound statement
> gcc -DHAVE_CONFIG_H -I. -I/Users/username/syslog-ng-1.5.24/src -I.     -g
> -O2 -Wall -I/Users/username/syslog-ng-1.5.24/libol-0.3.6/src -
> D_GNU_SOURCE -c filters.c
> filters.c:266: undefined type, found `uint32_t'
> filters.c:267: undefined type, found `uint32_t'
> filters.c:268: undefined type, found `uint32_t'
> cpp-precomp: warning: errors during smart preprocessing, retrying in
> basic mode
> filters.c: In function `do_filter_netmask':
> filters.c:266: `uint32_t' undeclared (first use in this function)
> filters.c:266: (Each undeclared identifier is reported only once
> filters.c:266: for each function it appears in.)
> filters.c:266: parse error before "host"
> filters.c:270: `host' undeclared (first use in this function)
> filters.c:271: `netw' undeclared (first use in this function)
> filters.c:272: `mask' undeclared (first use in this function)
> filters.c: In function `do_filter_call':
> filters.c:342: warning: implicit declaration of function `memcmp'
> make[3]: *** [filters.o] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive-am] Error 2
> make: *** [all-recursive] Error 1

As it seems you are using a new version of gcc, please try this patch (you
might need to touch .x files or install scsh to recompile after applying
this):

Index: src/center.c
===================================================================
RCS file: /var/cvs/syslog-ng/syslog-ng/src/center.c,v
retrieving revision 1.19
diff -u -r1.19 center.c
--- src/center.c	25 Aug 2001 13:11:48 -0000	1.19
+++ src/center.c	20 Dec 2002 16:19:14 -0000
@@ -154,6 +154,7 @@
 			}
 			
 		next_connection:
+			;
 		}
 	}
 
Index: src/filters.c
===================================================================
RCS file: /var/cvs/syslog-ng/syslog-ng/src/filters.c,v
retrieving revision 1.16
diff -u -r1.16 filters.c
--- src/filters.c	4 Feb 2002 16:07:50 -0000	1.16
+++ src/filters.c	20 Dec 2002 16:19:14 -0000
@@ -34,6 +34,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <string.h>
 
 #define CLASS_DEFINE
 #include "filters.h.x"
@@ -263,9 +264,9 @@
        
 	if (log->saddr) {
 		CAST(inet_address_info, adrinf, log->saddr);
-		uint32_t host;
-		uint32_t netw;
-		uint32_t mask;
+		unsigned long host;
+		unsigned long netw;
+		unsigned long mask;
 
 		host = adrinf->sa.sin_addr.s_addr;
 		netw = self->network.s_addr;


-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1