Mesa >= 23.3.x and python 2.6 ...
Stefan Dirsch
sndirsch at suse.com
Sat Jan 20 13:56:23 UTC 2024
Hi Jordan
On Sat, Jan 20, 2024 at 01:47:58AM -0800, Jordan Justen wrote:
> On 2024-01-19 12:24:24, Stefan Dirsch wrote:
> > Hi Jordan
> >
> > Thanks for digging into this!
> >
> > On Fri, Jan 19, 2024 at 12:10:37PM -0800, Jordan Justen wrote:
> > > On 2024-01-18 04:37:52, Stefan Dirsch wrote:
> > > > Hi
> > > >
> > > > I noticed that with version 23.3.x Mesa no longer can be built with python
> > > > 2.6. It still worked with Mesa 23.2.1.
> > >
> > > As mentioned in other emails, this was typo where 3.6 was intended.
> > >
> > > >
> > > > It fails with
> > > >
> > > > [ 95s] Traceback (most recent call last):
> > > > [ 95s] File "../src/intel/genxml/gen_bits_header.py", line 23, in <module>
> > > > [ 95s] import intel_genxml
> > > > [ 95s] File "/home/abuild/rpmbuild/BUILD/mesa-23.3.3/src/intel/genxml/intel_
> > > > genxml.py", line 5
> > > > [ 95s] from __future__ import annotations
> > > > [ 95s] ^
> > > > [ 95s] SyntaxError: future feature annotations is not defined
> > > >
> > >
> > > I guess this code first appeared in Dylan's:
> > >
> > > 4fd2e15855d ("intel/genxml: add type annotations to gen_sort_tags.py")
> > >
> > > and then became part of the standard tests a few commits later in:
> > >
> > > 1f0a0a46d97 ("meson: run genxml sort tests")
> > >
> > > back in Oct 2022. So, I guess at that point 'ninja test' would have
> > > failed with Python 3.6.
> > >
> > > Then, I suppose I propagated this to being used on every build in:
> > >
> > > 0495f952d48 ("intel/genxml: Add genxml_import.py script")
> > >
> > > in Sept 2023.
> >
> > Thanks. This explains why I've found this code already in older releases, but
> > it didn't fail for me yet. You said tests. Is this just a test, I could
> > disable (as dirty hack)? I was assuming it would generate code ...
>
> In 0495f952d48, I moved in to a common file, and essentially, now it's
> used by our script that runs during the build in addition to the test.
>
> It was "fun" finding a way to get python 3.6 :), but after that, I
> think I found a way to make Python 3.6 work. I guess you can try it
> out:
>
> https://gitlab.freedesktop.org/jljusten/mesa/-/commits/intel-genxml-python3.6
>
> In my light testing, Python 3.6 through 3.13 seemed to work. Python
> 3.5 did *not* work.
Wow! Thanks a lot! Indeed these two patches fix this build issue for me! :-)
In addition I needed to add the attached patch to fix some more errors I saw
with a python 3.6 build. With that I can build again Mesa 23.3.3.
Thanks,
Stefan
Public Key available
------------------------------------------------------
Stefan Dirsch (Res. & Dev.) SUSE Software Solutions Germany GmbH
Tel: 0911-740 53 0 Frankenstraße 146
FAX: 0911-740 53 479 D-90461 Nürnberg
http://www.suse.de Germany
----------------------------------------------------------------
Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
(HRB 36809, AG Nürnberg)
----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python36-buildfix.patch
Type: text/x-patch
Size: 2908 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20240120/c47037a0/attachment.bin>
More information about the mesa-dev
mailing list