[syslog-ng] linking changes
Corinna Vinschen
vinschen at redhat.com
Wed Feb 23 14:31:43 CET 2011
On Feb 23 14:11, Balazs Scheidler wrote:
> On Wed, 2011-02-23 at 13:57 +0100, Corinna Vinschen wrote:
> > On Feb 23 13:05, Balazs Scheidler wrote:
> > > Hi,
> > >
> > > I've tried to put a closure on how syslog-ng 3.2 and above is being
> > > linked. There were numerous problems as it started to get into Linux
> > > distributions.
> > > [...]
> > > Also, the main syslog-ng executable is not linked against
> > > libssl/libcrypto on purpose, it is only used by the afsocket module
> > > (which implements the tcp/syslog destinations).
> > >
> > > Could anyone who is in charge of maintaining syslog-ng binaries in
> > > various distributions give this a test so 3.2.3 will compile everywhere
> > > out-of-the-box?
> >
> > Sorry, but this won't work for the Cygwin distro. The changes don't
> > take my patch from
> > https://lists.balabit.hu/pipermail/syslog-ng/2011-February/016007.html
> > into account.
>
> I understand that, but pdbtool doesn't open libdbparser.so anymore and
> libsyslog-ng-patterndb.so has been removed and I link that into pdbtool
> statically.
>
> Rechecking the patch you referenced, the only important difference is
> that you mark the convenience library with noinst_ whereas my patch
> installs that publicly (which indeed is a bug).
>
> Am I missing something else?
Well, yes. As outlined in
https://lists.balabit.hu/pipermail/syslog-ng/2011-February/016006.html
there are two problems:
- You can't link against a static lib when creating a shared lib. That
means, creating libdbparser.so will fail. My patch results in
creating a shared libsyslog-ng-patterndb.so for linking libdbparser.so,
and a static libsyslog-ng-patterndb.a for linking pdbtool.
Marking both libsyslog-ng-patterndb as noinst is just to avoid that
both convenience libs are installed.
- The link order is important when creating binaries on the Windows
platform. Since libsyslog-ng-patterndb.a reference symbols in
../../lib/libsyslog-ng.la, you must reorder them on the command line.
Not
../../lib/libsyslog-ng.la libsyslog-ng-patterndb.a
but
libsyslog-ng-patterndb.a ../../lib/libsyslog-ng.la
My patch fixes both problems. The result should work on all platforms.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the syslog-ng
mailing list