Bug 30783

Summary: Mesa git fails to build
Product: Mesa Reporter: atswartz
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: medium CC: atswartz
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: config.log
config.log after python downgrade

Description atswartz 2010-10-11 14:23:37 UTC
Created attachment 39351 [details]
config.log

I am getting the following error when building

make[2]: Entering directory `/home/andrew/aur/mesa-r600-r700-git/src/mesa-build/src/mesa'
python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES1.1 > main/api_exec_es1.c
python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES2.0 > main/api_exec_es2.c
  File "main/es_generator.py", line 134
    except getopt.GetoptError message:
                                    ^
SyntaxError: invalid syntax
  File "main/es_generator.py", line 134
    except getopt.GetoptError message:
                                    ^
SyntaxError: invalid syntax
make[2]: *** No rule to make target `main/api_exec_es1.c', needed by `depend'.  Stop.
Comment 1 Chia-I Wu 2010-10-11 18:45:35 UTC
There is no recent change to the script.  What is the version of your python?
Comment 2 atswartz 2010-10-11 19:12:01 UTC
  On 10/11/2010 08:45 PM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=30783
>
> --- Comment #1 from Chia-I Wu<olvaffe@gmail.com>  2010-10-11 18:45:35 PDT ---
> There is no recent change to the script.  What is the version of your python?
>

[2010-10-10 10:22] installed python2 (2.7-2)
[2010-10-10 10:29] upgraded python (2.6.5-3 -> 3.1.2-2)

Which one do you think is the problem?
Comment 3 atswartz 2010-10-11 20:05:09 UTC
  On 10/11/2010 09:11 PM, andrew thomas wrote:
>  On 10/11/2010 08:45 PM, bugzilla-daemon@freedesktop.org wrote:
>> https://bugs.freedesktop.org/show_bug.cgi?id=30783
>>
>> --- Comment #1 from Chia-I Wu<olvaffe@gmail.com>  2010-10-11 18:45:35 
>> PDT ---
>> There is no recent change to the script.  What is the version of your 
>> python?
>>
>
> [2010-10-10 10:22] installed python2 (2.7-2)
> [2010-10-10 10:29] upgraded python (2.6.5-3 -> 3.1.2-2)
>
> Which one do you think is the problem?
I removed python2 and downgraded to python-2.6.5-3 and I still have the 
same problem.
The last time I built this package was on Aug 13th.
Comment 4 atswartz 2010-10-11 20:07:21 UTC
Created attachment 39355 [details]
config.log after python downgrade
Comment 5 Chia-I Wu 2010-10-11 23:41:03 UTC
(In reply to comment #0)
> Created an attachment (id=39351) [details]
> config.log
> 
> I am getting the following error when building
> 
> make[2]: Entering directory
> `/home/andrew/aur/mesa-r600-r700-git/src/mesa-build/src/mesa'
> python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES1.1 >
> main/api_exec_es1.c
> python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES2.0 >
> main/api_exec_es2.c
>   File "main/es_generator.py", line 134
>     except getopt.GetoptError message:
>                                     ^
I was wondering whether python 3 changed the syntax for exception catching.  But having a closer look, line 134 should be

  "except getopt.GetoptError, message:"

The comma is missing in your build?
> SyntaxError: invalid syntax
>   File "main/es_generator.py", line 134
>     except getopt.GetoptError message:
>                                     ^
> SyntaxError: invalid syntax
> make[2]: *** No rule to make target `main/api_exec_es1.c', needed by `depend'. 
> Stop.
Comment 6 Vinson Lee 2010-10-11 23:50:14 UTC
Which commit is this copy of mesa? The copy of es_generator.py in comment #0 is
missing a comma in line 134.


This is the current version in mesa master.

mesa: c25fcf5aa5beccd7731706b8f85682170a2eca56 (master)

src/mesa/main/es_generator.py
   132  try:
   133      optlist, args = getopt.getopt(sys.argv[1:], options)
   134  except getopt.GetoptError, message:
   135      sys.stderr.write("%s: %s.  Use -h for help.\n" % (program,
message))
Comment 7 atswartz 2010-10-12 08:37:12 UTC
(In reply to comment #6)
> Which commit is this copy of mesa? The copy of es_generator.py in comment #0 is
> missing a comma in line 134.
> 
> 
> This is the current version in mesa master.
> 
> mesa: c25fcf5aa5beccd7731706b8f85682170a2eca56 (master)
> 
> src/mesa/main/es_generator.py
>    132  try:
>    133      optlist, args = getopt.getopt(sys.argv[1:], options)
>    134  except getopt.GetoptError, message:
>    135      sys.stderr.write("%s: %s.  Use -h for help.\n" % (program,
> message))

Yeah, I was playing around with that comma to try to make it work and forgot to change it back. I fixed it and had a problem with libxml2, I downgraded it to the version that went with the downgraded python and it build successfully.  Thanks for your help

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.