[syslog-ng] Syslog-3.0.2 build failure on OS X

Balazs Scheidler bazsi at balabit.hu
Mon Jun 8 11:32:14 CEST 2009


On Wed, 2009-06-03 at 09:19 -0700, Mark Duling wrote:
> Hello,
> 
> Syslog-ng 2.1.4 compiles fine on OS X, but 3.0.2 does not.  Below is
> the error I get.  Any idea what the problem might be?  Thanks.
> 
> Mark
> 
> 
> syslog-ng Open Source Edition 3.0.2 configured
>  Compiler options:
>   compiler                    : /usr/bin/gcc-4.0
>   compiler options            : -O2 -Wall -I/opt/local/include
> -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include
> -I/opt/local/include   -I/opt/local/include/eventlog
>   -I/opt/local/include   -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS
> -DLIBNET_BSD_BYTE_SWAP  -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64
>   linker flags                : -L/opt/local/lib 
>   prefix                      : /opt/local
>   linking mode                : dynamic
>  Features:
>   Sun STREAMS support         : no
>   Sun Door support            : no
>   Debug symbols               : no
>   GCC profiling               : no
>   Memtrace                    : no
>   IPV6 support                : yes
>   spoof-source support        : yes
>   tcp-wrapper support         : yes
>   SSL support                 : yes
>   SQL support                 : no
>   Linux capability support    : no
>   PCRE support                : no
>   Env wrapper support         : no
> --->  Building syslog-ng
> 
> ........
> 
> rm -f libsyslog-ng.a
> ar cru libsyslog-ng.a misc.o utils.o messages.o syslog-names.o cfg.o
> filter.o logmsg.o logstamp.o logpipe.o logsource.o driver.o sgroup.o
> dgroup.o center.o templates.o logreader.o logwriter.o affile.o
> afstreams.o afuser.o afprog.o afsocket.o afunix.o afinet.o afinter.o
> children.o stats.o gsockaddr.o gsocket.o logtransport.o logproto.o
> memtrace.o dnscache.o serialize.o apphook.o radix.o logpatterns.o
> cfg-lex.o cfg-grammar.o timeutils.o alarms.o logparser.o logprocess.o
> logmpx.o logrewrite.o logmatcher.o gprocess.o globals.o control.o
> compat.o logqueue.o afsql.o tlscontext.o tlstransport.o 
> ranlib: file: libsyslog-ng.a(afstreams.o) has no symbols
> ranlib: file: libsyslog-ng.a(compat.o) has no symbols
> ranlib: file: libsyslog-ng.a(afsql.o) has no symbols
> ranlib libsyslog-ng.a
> ranlib: file: libsyslog-ng.a(afstreams.o) has no symbols
> ranlib: file: libsyslog-ng.a(compat.o) has no symbols
> ranlib: file: libsyslog-ng.a(afsql.o) has no symbols
> if /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I..
>   -I/opt/local/include -I/opt/local/include/glib-2.0
> -I/opt/local/lib/glib-2.0/include -I/opt/local/include
>   -I/opt/local/include/eventlog   -I/opt/local/include
>   -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP
>  -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -Wall
> -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.c; \
>     then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f
> ".deps/main.Tpo"; exit 1; fi
> /usr/bin/gcc-4.0  -O2 -Wall  -L/opt/local/lib -o syslog-ng  main.o
> libsyslog-ng.a   -lfl -L/opt/local/lib -lglib-2.0 -lintl -liconv
>   -L/opt/local/lib -levtlog   -L/opt/local/lib -lssl -lcrypto -lz
>   -lz -lnet -lwrap  -lresolv    
> Undefined symbols:
>   "_configuration", referenced from:
>       _configuration$non_lazy_ptr in libsyslog-ng.a(stats.o)
>       _configuration$non_lazy_ptr in libsyslog-ng.a(cfg.o)
>       _configuration$non_lazy_ptr in libsyslog-ng.a(templates.o)
>       _configuration$non_lazy_ptr in libsyslog-ng.a(cfg-lex.o)
>       _configuration$non_lazy_ptr in libsyslog-ng.a(cfg-grammar.o)
>       _configuration$non_lazy_ptr in libsyslog-ng.a(affile.o)
>       _configuration$non_lazy_ptr in libsyslog-ng.a(logmatcher.o)
>       _configuration$non_lazy_ptr in libsyslog-ng.a(logreader.o)
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[2]: *** [syslog-ng] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2

Hmm.. the configuration variable is global, and is defined in globals.c.
As I see globals.o is included in the libsyslog-ng.a archive, thus it
should link ok.

Can you try if passing globals.o explicitly on the link command line
solves your problem? 

Also, can you check if specifying libsyslog-ng.a twice solves the
problem?

Thanks.

-- 
Bazsi



More information about the syslog-ng mailing list