[Mesa-dev] [PATCH] glsl: Autogenerate builtin_functions.cpp as part of the build process.

Allin Cottrell cottrell at wfu.edu
Thu Jan 13 07:05:11 PST 2011

Andy Furniss <andyqos <at> ukfsn.org> writes:
> After updating talloc to avoid a build error I am now getting -
> Regenerating builtin_function.cpp...
> python -t -O -O builtins/tools/generate_builtins.py 
> /home/andy/Src/Mesa-git/mesa/src/glsl/builtin_compiler > 
> builtin_function.cpp
> builtins/tools/generate_builtins.py:25: Warning: 'with' will become a 
> reserved keyword in Python 2.6
>    File "builtins/tools/generate_builtins.py", line 25
>      with open(filename) as f:
>              ^
> SyntaxError: invalid syntax
> make[2]: *** [builtin_function.cpp] Error 1

I got the same error, using Python 2.5. It can be fixed by
inserting the following line at the top of generate_builtins.py
(after the initial # lines):

from __future__ import with_statement

Allin Cottrell

More information about the mesa-dev mailing list