When I'm starting syslog-ng 3.3.1 I got an error saying an afsql error. I compiled it with libdbi and libdbi-drivers but when I do an ldd syslog-ng there is no libdbi found in the link. What's the matter?
Hery Fanomezantsoa <rhfano@gmail.com> writes:
When I'm starting syslog-ng 3.3.1 I got an error saying an afsql error. I compiled it with libdbi and libdbi-drivers but when I do an ldd syslog-ng there is no libdbi found in the link.
syslog-ng 3.3 is modular, the main binary itself is not linked against libdbi. The libafsql.so module should be (usually found under /usr/local/lib/syslog-ng/, or something similar).
What's the matter?
What is the exact error message? -- |8]
may be I compiled it with --enable-dynamic-linking is the cause? Or what should I do On 1/30/12, Gergely Nagy <algernon@balabit.hu> wrote:
Hery Fanomezantsoa <rhfano@gmail.com> writes:
When I'm starting syslog-ng 3.3.1 I got an error saying an afsql error. I compiled it with libdbi and libdbi-drivers but when I do an ldd syslog-ng there is no libdbi found in the link.
syslog-ng 3.3 is modular, the main binary itself is not linked against libdbi. The libafsql.so module should be (usually found under /usr/local/lib/syslog-ng/, or something similar).
What's the matter?
What is the exact error message?
-- |8]
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
Hery Fanomezantsoa <rhfano@gmail.com> writes:
may be I compiled it with --enable-dynamic-linking is the cause? Or what should I do
The syslog-ng binary will _never_ be linked to libdbi, and that is fine. As I wrote, check the libafsql.so plugin, that MUST be linked against libdbi. Showing us the exact error message you get (there are many possible afsql errors) would also help, and make us able to help you better. -- |8]
The error was:
"Error opening plugin module; module='afsql', error='/usr/local/syslog-ng-test/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' #ldd /usr/local/syslog-ng-test/lib/syslog-ng/libafsql.so linux-gate.so.1 => (0xb7749000) libsyslog-ng-3.3.1.so => /usr/local/syslog-ng-test/lib/libsyslog-ng-3.3.1.so(0xb76d1000) libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7686000) libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7532000) libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7519000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb73be000) /lib/ld-linux.so.2 (0xb774a000) libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb73ba000) libz.so.1 => /usr/lib/libz.so.1 (0xb73a5000) I installed libdbi-0.8.4 and libdbi-drivers-0.8.3-1 Syslog-ng version 3.3.1 # ./configure --prefix=/usr/local/syslog-ng-test \
EVTLOG_CFLAGS="-I/usr/local/eventlog/include/eventlog" \ EVTLOG_LIBS="-L/usr/local/eventlog/lib -levtlog" \ GLIB_CFLAGS="-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \ GLIB_LIBS="-L/usr/lib -lglib-2.0 -lintl" \ LIBDBI_CFLAGS="-I/usr/include/dbi" \ LIBDBI_LIBS="-L/usr/lib" \ --enable-sql \ --enable-mixed-linking # make && make install
I found my mistake; I forgot to link the library when compiling by setting -ldbi in LIBDBI_LIBS environment variable. So for now I'm not getting any error about libafsql anymore but when I first started syslog-ng I got this error "Error reading serialized data; error='Error reading file (short read)' Persistent configuration file is in invalid format; ignoring;" I created syslog-ng.persist file in /usr/local/syslog-ng-test/var
participants (2)
-
Gergely Nagy
-
Hery Fanomezantsoa