Gregory (Grisha) Trubetskoy wrote:

OK, here is the flex scoop - as the the docs point out, anything before 2.5.31 is not reentrant and I think even uses a slightly different interface so older flex won't even process the psp_parser.l file correctly.

Looking at Fedora Core 4, it still has flex 2.5.4a. (Note that 2.5.31 > 2.5.4 because 31 > 4 - I for a while had trouble seeing that for some reason), so the new flex is still not commonplace.

So until reentrant flex becomes commonplace, the solution was to include
a pre-parsed psp_parser.c so that you woudln't need flex at all to compile mod_python. Looks like this still should be the case.

The ./configure should just print a warning that if flex is not found or too old, should you need to rebuild psp_parser.c you will need to get the right version of flex.


I've made the changes to configure.in, but before I commit I wanted to get some feedback. Are the following configure messages unclear or too verbose?

For the case of the missing flex, ./configure will generate:
...
checking for --with-flex... no
checking for flex... no
configure: WARNING: flex  not found
  You can generally ignore this warning unless you need to regenerate
  psp_parser.c from psp_parse.l. If you do need regenerate psp_parser.c,
  use --with-flex to specify the location of flex.
  See the README for more information.
...

For the case of the wrong flex version, ./configure will generate:
...
checking for --with-flex... no
checking for flex... /usr/local/sbin/flex
found /usr/local/sbin/flex, we'll use this. Use --with-flex to specify another.
checking flex version... configure: WARNING: Flex version 2.5.4 found.
  Version 2.5.31 or greater is required.
  You can generally ignore this warning unless you need to regenerate
  psp_parser.c from psp_parse.l. If you do need regenerate psp_parser.c,
  use --with-flex to specify the location of the correct flex version.
  See the README for more information.
...

Any comments?

Jim

Reply via email to