Bug 104601 - src/intel/vulkan/anv_extensions.py: ImportError: No module named mako.template
Summary: src/intel/vulkan/anv_extensions.py: ImportError: No module named mako.template
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: 17.3
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-12 12:25 UTC by Paul Menzel
Modified: 2018-01-19 14:12 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Paul Menzel 2018-01-12 12:25:01 UTC
Without Python Mako Templates [1] installed, the master branch, commit a1901d09 (anv: Import mako templates only during execution of anv_extensions) fixing bug #104551 [1], fails to build with the errors below despite configuring it with `--with-vulkan-drivers=radeon` (bug #104582 [2]).

```
make[3]: Entering directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/intel'
  GEN      vulkan/anv_entrypoints.c
  GEN      vulkan/anv_extensions.c
Traceback (most recent call last):
  File "/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/source/src/intel/vulkan/anv_entrypoints_gen.py", line 30, in <module>
    from mako.template import Template
ImportError: No module named mako.template
Makefile:4816: recipe for target 'vulkan/anv_entrypoints.c' failed
make[3]: *** [vulkan/anv_entrypoints.c] Error 1
make[3]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/source/src/intel/vulkan/anv_extensions.py", line 281, in <module>
    from mako.template import Template
ImportError: No module named mako.template
Makefile:4826: recipe for target 'vulkan/anv_extensions.c' failed
make[3]: *** [vulkan/anv_extensions.c] Error 1
make[3]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/intel'
Makefile:860: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src'
Makefile:651: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src'
Makefile:658: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
```

If the Python Mako Templates are required, the configure script should abort.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=104551
[2] https://bugs.freedesktop.org/show_bug.cgi?id=104582
Comment 1 Andrés Gómez García 2018-01-17 22:58:21 UTC
(In reply to Paul Menzel from comment #0)
> Without Python Mako Templates [1] installed, the master branch, commit
> a1901d09 (anv: Import mako templates only during execution of
> anv_extensions) fixing bug #104551 [1], fails to build with the errors below
> despite configuring it with `--with-vulkan-drivers=radeon` (bug #104582 [2]).
> 
> ```
> make[3]: Entering directory
> '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/intel'

I'm a bit confused.

You state to be building from master but it actually looks more like you are building from a dist tarball with a1901d09 (anv: Import mako templates only during execution of anv_extensions) applied.

If this is the case, that's is the problem. If you patch the tarball you will need Mako, but that's the problem of patching the tarball, not a problem in configure.ac

Could you clarify and, in case of compiling directly from master, provide the complete build line?
Comment 2 Paul Menzel 2018-01-18 16:24:16 UTC
(In reply to Andrés Gómez García from comment #1)
> (In reply to Paul Menzel from comment #0)
> > Without Python Mako Templates [1] installed, the master branch, commit
> > a1901d09 (anv: Import mako templates only during execution of
> > anv_extensions) fixing bug #104551 [1], fails to build with the errors below
> > despite configuring it with `--with-vulkan-drivers=radeon` (bug #104582 [2]).
> > 
> > ```
> > make[3]: Entering directory
> > '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/intel'
> 
> I'm a bit confused.

After reading my report, I am also confused. Sorry about that.

> You state to be building from master but it actually looks more like you are
> building from a dist tarball with a1901d09 (anv: Import mako templates only
> during execution of anv_extensions) applied.
> 
> If this is the case, that's is the problem. If you patch the tarball you
> will need Mako, but that's the problem of patching the tarball, not a
> problem in configure.ac

Yes, I patched Mesa 17.3.1. If Mako is needed, the configure script should fail, and not pass. But, I was hoping a similar fix to bug #104551 could be found.

> Could you clarify and, in case of compiling directly from master, provide
> the complete build line?

Checking out the master branch, `./autogen.sh` fails with the line below.

```
[…]
checking if module mako in python is installed... No module named mako
no
configure: error: Python mako module v0.8.0 or higher not found
[…]
```
Comment 3 Andrés Gómez García 2018-01-18 22:49:25 UTC
(In reply to Paul Menzel from comment #2)
...
> Yes, I patched Mesa 17.3.1. If Mako is needed, the configure script should
> fail, and not pass. But, I was hoping a similar fix to bug #104551 could be
> found.

That's expected. Mako is used during the generation of the dist tarball and it is not needed afterwards. If you patch the content of the dist tarball, then we are in problems ...

The proper thing to do is to take the next release provided by Mesa maintainers that already includes the fix for bug #104551. That's 17.3.3 that should be, hopefully, already coming today.

I'm now closing this as INVALID.
Comment 4 Andrés Gómez García 2018-01-19 09:51:16 UTC
(In reply to Andrés Gómez García from comment #3)
...
> The proper thing to do is to take the next release provided by Mesa
> maintainers that already includes the fix for bug #104551. That's 17.3.3
> that should be, hopefully, already coming today.

You can find it already at:
https://www.mesa3d.org/relnotes/17.3.3.html
Comment 5 Paul Menzel 2018-01-19 10:31:56 UTC
Thank you, I’ll test it later. But please note, that this report is about a different Python file than the one fixed in bug #104551 [1].

[1] https://bugs.freedesktop.org/show_bug.cgi?id=104551
Comment 6 Andrés Gómez García 2018-01-19 13:16:25 UTC
(In reply to Paul Menzel from comment #5)
> Thank you, I’ll test it later. But please note, that this report is about a
> different Python file than the one fixed in bug #104551 [1].
> 
> [1] https://bugs.freedesktop.org/show_bug.cgi?id=104551

And as you realized, configure.ac will fail from master if mako is not present. Mako is not needed from a properly created dist tarball. The resolution stands.
Comment 7 Paul Menzel 2018-01-19 14:12:20 UTC
(In reply to Andrés Gómez García from comment #6)
> (In reply to Paul Menzel from comment #5)
> > Thank you, I’ll test it later. But please note, that this report is about a
> > different Python file than the one fixed in bug #104551 [1].
> > 
> > [1] https://bugs.freedesktop.org/show_bug.cgi?id=104551
> 
> And as you realized, configure.ac will fail from master if mako is not
> present. Mako is not needed from a properly created dist tarball. The
> resolution stands.

Yes, 17.3.3 builds without issues. Thank you. (I still do not fully understand it, but that’s fine.)


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.