[syslog-ng] linking changes

Balazs Scheidler bazsi at balabit.hu
Wed Mar 2 17:51:43 CET 2011


On Wed, 2011-03-02 at 14:14 +0100, Corinna Vinschen wrote:
> On Mar  2 13:55, Balazs Scheidler wrote:
> > On Wed, 2011-03-02 at 13:07 +0100, Corinna Vinschen wrote:
> > > On Mar  2 12:52, Corinna Vinschen wrote:
> > > > On Mar  2 10:47, Balazs Scheidler wrote:
> > > > > well, something along the lines of
> > > > > 
> > > > > --enable-static --disable-shared
> > > > > 
> > > > > and some libtool magic to get all .a files linked into the syslog-ng
> > > > > binary with -Wl,--whole-archive
> > > > > 
> > > > > This doesn't need PIC compilation (as the .a files will be linked into
> > > > > the main executable) and can be done even for embedded libraries.
> > > > > 
> > > > > plugin loading would work on platforms where the .so files can use
> > > > > symbols from the executable:
> > > > >   * this is the case on Linux
> > > > >   * this is definitely not the case on AIX
> > > > >   * on cygwin, if my guess is right, this will not work, so there all
> > > > > syslog-ng plugins must be linked in statically too.
> > > > > 
> > > > > The alternative is to introduce ivykis as a separate package on cygwin.
> > > > > Would that be a doable alternative?
> > > > 
> > > > We only allow packages in the distro for which we have a an active
> > > > maintainer.  If you're willing to package and maintain ivykis for
> > > > Cygwin, or if you have somebody who's willing to do so, then that
> > > > would be a doable solution, yes.
> > > > 
> > > > I gave ivykis a quick whirl, but it doesn't build on Cygwin because
> > > > Cygwin has no support for pthread_spinlocks so far.
> > > 
> > > Unfortunately ivykis uses pthread_spinlocks unconditionally, even though
> > > they are marked as optional in POSIX-1.2004 and only moved to the Base
> > > in POSIX-1.2008.
> > 
> > Yes, they are needed because pthread_mutex is not async signal safe.
> > We've also ran into this issue (on our set of ancient UNIX systems), but
> > because syslog-ng is only using statically registered signal handlers
> > (e.g. once at program startup), it's not a real issue, so we simply
> > removed the locking that protected against parallel signal handler
> > execution & registration.
> 
> I'll look into implementing pthread_spinlocks for the next Cygwin
> release.  

It'd be really cool. I guess, then it means something that you are
"Cygwin Project Co-Leader". :)

> But that will take some time, right now we're rather busy
> with two problems in the current release.

Yes, sure.

btw: I once pondered about purchasing a cygwin license, I even went as
far as submitted a form on redhat.com, that we'd be interested. But I
got nothing back. I've since dropped that project, but knowing more
details about cygwin options would be useful. Can you contact me to
someone who can help me? Thanks in advance.

-- 
Bazsi



More information about the syslog-ng mailing list