[syslog-ng] Make throws link errors over glib2 when compiling syslog-ng 3.0.1

Balazs Scheidler bazsi at balabit.hu
Wed Jan 14 12:52:34 CET 2009

On Wed, 2009-01-14 at 08:51 +0100, Joost De Cock wrote:
> Hello all,
> I know that the issue of rewriting syslog messages is a recurring debate 
> here on the list :-) but I'm trying to get 3.0.1 up and running as we 
> need to strip out some info to protect the privacy of our users (there, 
> good cause flag set).
> I'm having a go under Cygwin and configure runs fine, but make dies on 
> me in a flurry of messages (see below).
> I'm not much of a devhead, but these seem to be glib2 issue to me. Yet 
> I'm a but stumped on how to beat some sense into it, and any pointer 
> would be hugely appreciated.
> Thanks in advance,
> Joost
> tail of configure output:
> syslog-ng Open Source Edition 3.0.1 configured
>  Compiler options:
>   compiler                    : gcc
>   compiler options            : -g -O2 -Wall  -I/usr/include/glib-2.0 
> -I/usr/lib
> /glib-2.0/include   -I/usr/include/eventlog       -D_GNU_SOURCE 
>   linker flags                :
>   prefix                      : /usr/local
>  Features:
>   Sun STREAMS support         : no
>   Sun Door support            : no
>   Debug symbols               : no
>   GCC profiling               : no
>   Memtrace                    : no
>   IPV6 support                : no
>   spoof-source support        : no
>   tcp-wrapper support         : no
>   SSL support                 : yes
>   SQL support                 : no
>   Linux capability support    : no
>   PCRE support                : no
>   Env wrapper support         : no
> the part where make goes of the rails:
> gcc  -g -O2 -Wall   -o syslog-ng.exe  main.o libsyslog-ng.a    
> -Wl,-Bstatic -lfl
>  -lglib-2.0 -lintl -liconv   -levtlog   -lssl -lcrypto        
> -Wl,-Bdynamic  -ld
> l

hmm.. syslog-ng decides to be threaded/non-threaded based on the
--enable-sql setting (e.g. if SQL destinations are enabled, syslog-ng
becomes threaded).

As it seems your glib is missing threading related symbols:
__imp__g_thread_use_default_impl, however syslog-ng should not be
threaded at all.

hmm...hmm.. the above variable is defined inside glib and not in gthread, 
and still the linking phase does not find it.

Maybe it is a consequence of this error message:

text+0x260): multiple definition of `_DllMain at 12'
xt+0x2c0): first defined here

and this causes glib to be dropped from the link. can you attempt configure syslog-ng
using --enable-dynamic-linking ? Checking out the glib source, glib does not seem
to be prepared to be used in static linking, but I may be wrong here.


More information about the syslog-ng mailing list