[syslog-ng] Can't compile 2.0.8 on Solaris 10

Balazs Scheidler bazsi at balabit.hu
Thu Mar 13 15:17:26 CET 2008


On Thu, 2008-03-13 at 14:36 +0100, Ralf Weber wrote:
> Moin!
> 
> On Mar 12, 2008, at 14:17 , Balazs Scheidler wrote:
> > Hmm. this seems to be ok, although the yylex() symbol is listed as an
> > external reference in your libfl.so file.
> >
> > If you have flex installed, can you please remove the cfg-lex.c file  
> > as
> > supplied in the tarball of syslog-ng, and let the makefile  
> > regenerate it
> > from the lex file (cfg-lex.l) during compilation?
> Hmm that didn't help. I do have flex installed:
> rw at bh2:~/source/syslog-ng-2.0.8$ which flex
> /usr/sfw/bin/flex
> 
> and the build also regenerated the file without problems:
> flex   `test -f cfg-lex.l || echo './'`cfg-lex.l
> sed '/^#/ s|lex.yy\.c|cfg-lex.c|' lex.yy.c >cfg-lex.c
> rm -f lex.yy.c
> if /usr/sfw/bin/gcc -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/include/ 
> glib-2.0 -I/usr/lib/glib-2.0/include   -I/opt/sfw/include/eventlog    - 
> D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O2 -Wall - 
> MT cfg-lex.o -MD -MP -MF ".deps/cfg-lex.Tpo" \
>    -c -o cfg-lex.o `test -f 'cfg-lex.c' || echo './'`cfg-lex.c; \
> then mv -f ".deps/cfg-lex.Tpo" ".deps/cfg-lex.Po"; \
> else rm -f ".deps/cfg-lex.Tpo"; exit 1; \
> fi
> 
> but it still failed with the same error:
> 
> /usr/sfw/bin/gcc  -g -O2 -Wall   -o loggen  loggen.o  -lpthread - 
> lresolv -lnsl -lrt -lsocket -ldoor  -lfl -lglib-2.0   -L/opt/sfw/lib - 
> levtlog
> Undefined                       first referenced
>   symbol                             in file
> yylex                               /usr/sfw/lib/gcc/sparc-sun- 
> solaris2.10/3.4.3/../../../libfl.so
> ld: fatal: Symbol referencing errors. No output written to loggen

As it seems our local syslog-ng compilation uses this link command:

gcc  -m64 -Wall   -o syslog-ng  main.o libsyslog-ng.a -lresolv -lnsl
-lsocket -ldoor -ll -L/usr/lib/amd64 -lgthread-2.0 -lglib-2.0
-L/usr/local/lib -levtlog -L/usr/local/ssl/lib -lssl -lcrypto -lsocket
-lnsl -ldl -L/usr/local/lib -ldbi8 -L/usr/lib/amd64 -L/opt/zorp/lib
-lzlicense -lcrypto -lglib-2.0 -lpthread -lrt 

This means that it is linking against libl.so and not libfl.so

Related configure output:

checking for flex... no
checking for lex... lex
checking lex output file root... lex.yy
checking lex library... -ll

E.g. it is not using flex, but the system supplied lex. Your problem is
probably related to the fact that you use a mismatching lex/flex and
libl/libfl combination.

-- 
Bazsi



More information about the syslog-ng mailing list