[syslog-ng] linking changes

Corinna Vinschen vinschen at redhat.com
Thu Feb 24 10:59:09 CET 2011


On Feb 24 10:31, Balazs Scheidler wrote:
> On Wed, 2011-02-23 at 17:29 +0100, Corinna Vinschen wrote:
> > ivykis and libmongo-client are not available for Cygwin.  Is there
> > no way around using these libs by using conditional compilation?
> 
> There's a way, mongodb can be disabled using --disable-mongodb configure
> option (but is enabled by default with the bundled libmongo-client
> library).
> 
> ivykis is not so simple, syslog-ng core depends on that heavily. ivykis
> is compiled as a static library (with -fPIC) and then linked into
> libsyslog-ng.so
> 
> The staticlib is just a convenience library, however I'd like that to be
> created by the ivykis configure/automake stuff, and would like to avoid
> having to rewrite the build system for ivykis. Also, I wouldn't want to
> install ivykis (as a shared object) from the syslog-ng tree, as I could
> perhaps break people's setup if ivykis becomes more widely available.
> (e.g. installed on the system).
> 
> Do you perhaps have an idea how to solve that differently?

If you don't provide a shared ivykis lib, building libsyslog-ng.so on
Cygwin will break.  Assuming ivykis builds on Cygwin, which nobody
tested yet either...

Off the top my head I can see two ways around the shared/static problem.

- Add the ivykis source files to libsyslog_ng_la_SOURCES.

- Don't link libsyslog-ng.so against ivykis at all.  Instead,
  build ivykis as a module which gets installed into /usr/lib/syslog-ng
  and use dlopen/dlsym to call its functions.

> > Btw., I'm seeing a lot of
> > 
> >   foo.y: warning: X nonterminals useless in grammar
> >   foo.y: warning: Y rules useless in grammar
> > 
> > messages.  Aren't the grep calls in build/lex-rules.am wrong?
> > 
> >   grep -E -v "warning: (nonterminals|rules) useless in grammar
> > 
> > instead of 
> > 
> >   grep -E -v "warning: (nonterminal|rule) useless in grammar
> > 
> > ?  Or does the message depend on the version of yacc/bison used, perhaps?
> 
> Well, it seems to matter which bison version you are using. 3.3 has a
> fix for this (where it accepts both the pural and the singular forms).

Any chance to fix this in 3.2, too?  It's just adding a "s?" to
the regex:

  grep -E -v "warning: (nonterminal|rule)s? useless in grammar"


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


More information about the syslog-ng mailing list