[syslog-ng] Compile 3.0.1 on RHEL 5 with sql support

Balazs Scheidler bazsi at balabit.hu
Sun Feb 8 16:04:35 CET 2009


On Thu, 2009-02-05 at 15:10 +0100, Henk van Lingen wrote:
> Hi,
> 
> I'm new to syslog-ng and I'm trying to compile 3.0.1 on a RHEL 5.3 system.
> I want to use the log to PostgreSQL features so I'm trying to enable
> sql support. For this I've installed the libdbi packages:
> 
> root@:~-# yum list '*libdbi*'
> Loaded plugins: rhnplugin, security
> Installed Packages
> libdbi.i386                        0.8.1-2.1                installed           
> libdbi.x86_64                      0.8.1-2.1                installed           
> libdbi-dbd-pgsql.x86_64            0.8.1a-1.2.2             installed           
> libdbi-devel.i386                  0.8.1-2.1                installed           
> libdbi-devel.x86_64                0.8.1-2.1                installed           
> libdbi-drivers.x86_64              0.8.1a-1.2.2             installed      
> 
> However, a configure gives:
> 
>   SQL support                 : no
> 
> And a "./configure --enable-dynamic-linking --enable-sql" gives a
> 
> /home/henk/syslog-ng-3.0.1/src/afsql.c:672: undefined reference to `dbi_initialize'
> 
> in the make phase.
> 
> Any ideas what or which lib I am missing?

I contributed a patch to libdbi to have a pkg-config file and syslog-ng
relies on the presence of dbi.pc in one of the PKG_CONFIG_PATH
referenced directories.

Please use a newer libdbi. An alternative might be to specify these
environment variables to supply the same information:

  LIBDBI_CFLAGS
              C compiler flags for LIBDBI, overriding pkg-config
  LIBDBI_LIBS linker flags for LIBDBI, overriding pkg-config

> 
> BTW:
> 
> a configure without --enable-dynamic-linking gives a
> 
> configure: error: static OpenSSL libraries not found (libssl.a and libcrypto.a)

hmm... the related config.log snippet could help here. Maybe your libssl
has an external dependency on some lib that syslog-ng does not specify
explicitly.

In syslog-ng OSE 2.1, I've made the switch to use dynamic linking by
default but the OSE 3.0 still uses the 'hybrid linking'. I'll make a
note of this and forward port the related patch.

> 
> although I have those files both in /usr/lib and /usr/lib64
> 
> I have PKG_CONFIG_PATH=/usr/local/lib/pkgconfig, as is needed for eventlog.


-- 
Bazsi




More information about the syslog-ng mailing list