[mod_python] Compiling on X86_64?

Jim Gallacher jpg at jgassociates.ca
Fri Dec 9 16:21:14 EST 2005


Joshua D. Drake wrote:
>>>It GNU no longer supports the version of flex that is actively developed
>>>and it the newer version needs to be retrieved from sourceforge. You may
>>>want to make note in your docs.
>>>
>>
>>You may want to read the output from configure more carefully. You only 
>>need flex if you want to regenerate psp_parser.c after making changes to 
>>psp_parser.l. Otherwise you can use the pre-generated psp_parser.c 
>>provided with the source to accomodate distributions that ship with the 
>>older flex. This is information is also detailed in the docs and README.
> 
> 
> Fair enough :) but that doesn't actually address  my point which is that
> the mod_python docs to not state that the newer version of flex is not
> retrieved from your normal channels for the majority of your users :)

Here is the relevant section of the README (3.2.5b), which is pretty
much duplicated in the html-docs.

----------------------------------------------------------------
2. ./configure will generate a WARNING if it cannot find flex, or it
is the wrong version. Generally you can ignore this warning and still
successfully compile mod_python.

The parser used by psp is written in C generated using flex. This
requires a reentrant version of flex, which at this time is 2.5.31.
Most platforms however ship with version 2.5.4 which is not suitable,
so a pre-generated copy of src/psp_parser.c is included with the source.
If you make changes to src/psp_parser.l and need to recompile the
src/psp_parser.c file, you must get the correct flex version.

You can specify the path the flex binary by using
./configure --with-flex=/path/to/flex/binary.
--------------------------------------------------------------

Any suggestions on how to improve this literary gem are welcome. I agree
that we should mention that the correct flex is available from
http://lex.sourceforge.net. The confusing part is that most people
compiling mod_python will never need flex, since the file that it
generates is included with the source. If someone can come up with the
magic words that convey this I'd be more than happy to change the docs.

Personally, I think the correct answer to the problem is "use Debian"
which seems to be the only platform that *does* ship with the more
recent flex. But since people will insist on using other platforms... ;)

Jim



More information about the Mod_python mailing list