[syslog-ng] Syslog 1.6.8 compile error

Roberto Nibali ratz at tac.ch
Mon Oct 3 15:48:27 CEST 2005


> gcc  -g -O2 -Wall -I/usr/local/include/libol -D_GNU_SOURCE   -o syslog-ng  main
> o sources.o center.o filters.o destinations.o log.o cfgfile.o cfg-grammar.o cfg
> lex.o affile.o afsocket.o afunix.o afinet.o afinter.o afuser.o afstreams.o afpr
> gram.o afremctrl.o nscache.o utils.o syslog-names.o macros.o  -lnsl -lresolv  /
> sr/local/lib/libol.a -lnsl -Wl,-Bstatic      -Wl,-Bdynamic
> cfg-lex.o(.text+0x45f): In function `yylex':
> /root/rpm/syslog-ng/syslog-ng-1.6.8/src/cfg-lex.c:1123: undefined reference to
> yywrap'
> cfg-lex.o(.text+0xb33): In function `input':
> /root/rpm/syslog-ng/syslog-ng-1.6.8/src/cfg-lex.c:1450: undefined reference to
> yywrap'

As previously noted by another poster this is a problem with the flex
version on your system. If you use a flex with a higher version than
2.5.4 you're out of luck, unless you patch the sources. The reason for
this is that the people developing flex had the "interesting" idea of
changing the way the lexer parses the language file.

The fix is to downgrade your flex or to patch cfg-lex.l with a %option
field disabling yywarp. From the top of my head it should read:

%option noyywrap

Or you define the options as follows (I think):

%{
prototype functionname(parameters);
%}

Just my 2 cents since this issue turns up on almost every OSS project
out there and people hit this very problem all the time and I thus want
to enlarge the information and have google find it once and forever ;).

[google ahoi: linux-ha-dev mailinglist, syslog-ng mailinglist]

Best regards,
Roberto Nibali, ratz

ps.: Let's hope I got it right
-- 
-------------------------------------------------------------
addr://Kasinostrasse 30, CH-5001 Aarau tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------


More information about the syslog-ng mailing list