Hello, While trying to compile on FreeBSD 9.1, I ran into this problem: /bin/sh ../../libtool --tag=CC --mode=compile cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/modules/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -I/usr/local/include/libnet116 -I/usr/local/include -fno-strict-aliasing -Wall -g -pthread -MT libafsocket_notls_la-afinet-dest.lo -MD -MP -MF .deps/libafsocket_notls_la-afinet-dest.Tpo -c -o libafsocket_notls_la-afinet-dest.lo `test -f 'afinet-dest.c' || echo './'`afinet-dest.c libtool: compile: cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/modules/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -I/usr/local/include/libnet116 -I/usr/local/include -fno-strict-aliasing -Wall -g -pthread -MT libafsocket_notls_la-afinet-dest.lo -MD -MP -MF .deps/libafsocket_notls_la-afinet-dest.Tpo -c afinet-dest.c -fPIC -DPIC -o .libs/libafsocket_notls_la-afinet-dest.o In file included from /usr/local/include/libnet116/libnet.h:120, from afinet-dest.c:43: /usr/local/include/libnet116/./libnet/libnet-structures.h:235: error: redefinition of typedef 'libnet_t' afinet-dest.h:35: error: previous declaration of 'libnet_t' was here gmake[4]: *** [libafsocket_notls_la-afinet-dest.lo] Error 1 gmake[4]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3/modules/afsocket' gmake[3]: *** [all] Error 2 gmake[3]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3/modules/afsocket' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3/modules' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3' gmake: *** [all] Error 2 *** [do-build] Error code 1 Disabling libnet support results in a successful build, but it can't be started: root@fb91:/root/syslog-ng-devel # /usr/local/etc/rc.d/syslog-ng onerestart syslog_ng not running? (check /var/run/syslog.pid). Starting syslog_ng. WARNING: Configuration file format is too old, syslog-ng is running in compatibility mode Please update it to use the syslog-ng 3.4 format at your time of convinience, compatibility mode can operate less efficiently in some cases. To upgrade the configuration, please review the warnings about incompatible changes printed by syslog-ng, and once completed change the @version header at the top of the configuration file.; Unable to determine how to monitor this fd, follow_freq() not set and it is not possible to poll it with the current ivykis polling method, try changing IV_EXCLUDE_POLL_METHOD environment variable; fd='11' Error initializing log_reader, closing fd; fd='11' Error initializing message pipeline; /usr/local/etc/rc.d/syslog-ng: WARNING: failed to start syslog_ng FreeBSD installs syslog-ng-3.4.0alpha3/scl/syslog-ng.conf by default, so it needs a version bump. It can easily be fixed by me. But system() is now in C instead of shell scripts... Bye, -- Peter Czanik (CzP) <czanik@balabit.hu> BalaBit IT Security / syslog-ng upstream http://czanik.blogs.balabit.com/
Peter Czanik <czanik@balabit.hu> writes:
/bin/sh ../../libtool --tag=CC --mode=compile cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/modules/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -I/usr/local/include/libnet116 -I/usr/local/include -fno-strict-aliasing -Wall -g -pthread -MT libafsocket_notls_la-afinet-dest.lo -MD -MP -MF .deps/libafsocket_notls_la-afinet-dest.Tpo -c -o libafsocket_notls_la-afinet-dest.lo `test -f 'afinet-dest.c' || echo './'`afinet-dest.c libtool: compile: cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/modules/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -I/usr/local/include/libnet116 -I/usr/local/include -fno-strict-aliasing -Wall -g -pthread -MT libafsocket_notls_la-afinet-dest.lo -MD -MP -MF .deps/libafsocket_notls_la-afinet-dest.Tpo -c afinet-dest.c -fPIC -DPIC -o .libs/libafsocket_notls_la-afinet-dest.o In file included from /usr/local/include/libnet116/libnet.h:120, from afinet-dest.c:43: /usr/local/include/libnet116/./libnet/libnet-structures.h:235: error: redefinition of typedef 'libnet_t' afinet-dest.h:35: error: previous declaration of 'libnet_t' was here
This will be a bit tricky to fix, but a quick workaround is to guard the typedef in afinet-dest.h with an #ifndef libnet_t (or something similar).
root@fb91:/root/syslog-ng-devel # /usr/local/etc/rc.d/syslog-ng onerestart syslog_ng not running? (check /var/run/syslog.pid). Unable to determine how to monitor this fd, follow_freq() not set and it is not possible to poll it with the current ivykis polling method, try changing IV_EXCLUDE_POLL_METHOD environment variable; fd='11' Error initializing log_reader, closing fd; fd='11' Error initializing message pipeline; /usr/local/etc/rc.d/syslog-ng: WARNING: failed to start syslog_ng
This is interesting, on 9.1RC3, uname -r should return 9.1RC3, which should trigger the follow-freq(1) stuff. I'll try to double check the logic.
FreeBSD installs syslog-ng-3.4.0alpha3/scl/syslog-ng.conf by default, so it needs a version bump.
ACK. -- |8]
Hello, On 12/10/2012 11:27 AM, Gergely Nagy wrote:
root@fb91:/root/syslog-ng-devel # /usr/local/etc/rc.d/syslog-ng onerestart syslog_ng not running? (check /var/run/syslog.pid). Unable to determine how to monitor this fd, follow_freq() not set and it is not possible to poll it with the current ivykis polling method, try changing IV_EXCLUDE_POLL_METHOD environment variable; fd='11' Error initializing log_reader, closing fd; fd='11' Error initializing message pipeline; /usr/local/etc/rc.d/syslog-ng: WARNING: failed to start syslog_ng This is interesting, on 9.1RC3, uname -r should return 9.1RC3, which should trigger the follow-freq(1) stuff. I'll try to double check the logic.
Oddly enough, it seems to be fixed by https://github.com/balabit/syslog-ng-3.4/commit/06fe6ea00df758fef6060931eb3f... which is an update in ivykis. The related code in syslog-ng stayed the same. Algernon gave me some code to help debugging: fprintf(stderr, "FREEBSD RELEASE: %s\n", release); and it printed the same info both before and after: FREEBSD RELEASE: 9.1-RC3 Just tested also on FreeBSD 7, and it also seems to work (but there it needs one little patch: http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/sysutils/syslog-ng/fi... ). Bye, -- Peter Czanik (CzP) <czanik@balabit.hu> BalaBit IT Security / syslog-ng upstream http://czanik.blogs.balabit.com/
On 12/10/2012 10:54 AM, Peter Czanik wrote:
Hello,
While trying to compile on FreeBSD 9.1, I ran into this problem:
/bin/sh ../../libtool --tag=CC --mode=compile cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/modules/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -I/usr/local/include/libnet116 -I/usr/local/include -fno-strict-aliasing -Wall -g -pthread -MT libafsocket_notls_la-afinet-dest.lo -MD -MP -MF .deps/libafsocket_notls_la-afinet-dest.Tpo -c -o libafsocket_notls_la-afinet-dest.lo `test -f 'afinet-dest.c' || echo './'`afinet-dest.c libtool: compile: cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/lib/include -I../../lib/ivykis/modules/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -I/usr/local/include/libnet116 -I/usr/local/include -fno-strict-aliasing -Wall -g -pthread -MT libafsocket_notls_la-afinet-dest.lo -MD -MP -MF .deps/libafsocket_notls_la-afinet-dest.Tpo -c afinet-dest.c -fPIC -DPIC -o .libs/libafsocket_notls_la-afinet-dest.o In file included from /usr/local/include/libnet116/libnet.h:120, from afinet-dest.c:43: /usr/local/include/libnet116/./libnet/libnet-structures.h:235: error: redefinition of typedef 'libnet_t' afinet-dest.h:35: error: previous declaration of 'libnet_t' was here gmake[4]: *** [libafsocket_notls_la-afinet-dest.lo] Error 1 gmake[4]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3/modules/afsocket' gmake[3]: *** [all] Error 2 gmake[3]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3/modules/afsocket' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3/modules' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/root/syslog-ng-devel/work/syslog-ng-3.4.0alpha3' gmake: *** [all] Error 2 *** [do-build] Error code 1
And this patch from Algernon solves the compile problem: https://github.com/algernon/syslog-ng/commit/04387b2f373337bb582acb68eb4facb... With this patch the beta has the green light also from FreeBSD :) Bye, -- Peter Czanik (CzP) <czanik@balabit.hu> BalaBit IT Security / syslog-ng upstream http://czanik.blogs.balabit.com/
participants (2)
-
Gergely Nagy
-
Peter Czanik