Problems compiling on RHEL 5 (flex error)
I'm getting the following error trying to build packages for RHEL5: flex `test -f cfg-lex.l || echo './'`cfg-lex.l "cfg-lex.l", line 1: unrecognized '%' directive "cfg-lex.l", line 3: bad character: # "cfg-lex.l", line 3: unknown error processing section 1 "cfg-lex.l", line 3: bad character: " "cfg-lex.l", line 3: bad character: . "cfg-lex.l", line 3: bad character: " "cfg-lex.l", line 5: bad character: } make[2]: *** [cfg-lex.c] Error 1 make[2]: Any ideas on what I can do here? -Doug
On Fri, 2008-10-17 at 15:03 -0400, Douglas E. Warner wrote:
I'm getting the following error trying to build packages for RHEL5:
flex `test -f cfg-lex.l || echo './'`cfg-lex.l "cfg-lex.l", line 1: unrecognized '%' directive "cfg-lex.l", line 3: bad character: # "cfg-lex.l", line 3: unknown error processing section 1 "cfg-lex.l", line 3: bad character: " "cfg-lex.l", line 3: bad character: . "cfg-lex.l", line 3: bad character: " "cfg-lex.l", line 5: bad character: } make[2]: *** [cfg-lex.c] Error 1 make[2]:
Any ideas on what I can do here?
The distribution tarball should contain an already generated .c file suitable for compiling syslog-ng. It is present there to avoid the build dependency on flex (only needed if you change the lexer file). I'm using flex 2.5.34 myself, and it works fine here. -- Bazsi
Balazs Scheidler wrote:
The distribution tarball should contain an already generated .c file suitable for compiling syslog-ng. It is present there to avoid the build dependency on flex (only needed if you change the lexer file).
I'm using flex 2.5.34 myself, and it works fine here.
Right, I see that, but for some reason (most likely timestamp issues) the file still wants to be regenerated. The flex version I'm having problems with is 2.5.4 on RHEL 5 (and lower). -Doug
Douglas E. Warner wrote:
Balazs Scheidler wrote:
The distribution tarball should contain an already generated .c file suitable for compiling syslog-ng. It is present there to avoid the build dependency on flex (only needed if you change the lexer file).
I'm using flex 2.5.34 myself, and it works fine here.
Right, I see that, but for some reason (most likely timestamp issues) the file still wants to be regenerated.
The flex version I'm having problems with is 2.5.4 on RHEL 5 (and lower).
The workaround I've found is to touch the files generated by flex (cfg-grammer.c and cfg-lex.c) before configuring/building the packages (in the spec file's %prep section). This prevents make from trying to rebuild these files. -Doug
On Wed, 2008-11-05 at 12:26 -0500, Douglas E. Warner wrote:
Douglas E. Warner wrote:
Balazs Scheidler wrote:
The distribution tarball should contain an already generated .c file suitable for compiling syslog-ng. It is present there to avoid the build dependency on flex (only needed if you change the lexer file).
I'm using flex 2.5.34 myself, and it works fine here.
Right, I see that, but for some reason (most likely timestamp issues) the file still wants to be regenerated.
The flex version I'm having problems with is 2.5.4 on RHEL 5 (and lower).
The workaround I've found is to touch the files generated by flex (cfg-grammer.c and cfg-lex.c) before configuring/building the packages (in the spec file's %prep section). This prevents make from trying to rebuild these files.
In the meanwhile I've found that the problem is caused by the '%top' directive, that only recent flex versions support. As I see it was added as a workaround for an AIX compilation issue. I'm testing a patch that removes the "%top" directive, but should still compile on AIX. If it works out, I'll remove the flex 2.5.34 dependency. -- Bazsi
participants (2)
-
Balazs Scheidler
-
Douglas E. Warner