Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 635936 - media-libs/mesa-17.3.0_rc2 ImportError: No module named mako.template
Summary: media-libs/mesa-17.3.0_rc2 ImportError: No module named mako.template
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-30 20:17 UTC by mercuriete
Modified: 2017-11-03 17:56 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log of mesa (build_log_mesa.tar.gz,38.98 KB, application/gzip)
2017-10-30 20:20 UTC, mercuriete
Details
emerge info (emerge_info,5.93 KB, text/plain)
2017-10-30 20:22 UTC, mercuriete
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mercuriete 2017-10-30 20:17:51 UTC
media-libs/mesa-17.3.0_rc2

Not compiling in my system probably due to a missing dependency.

xxxxxxxxx@localhost ~ $ uname -a
Linux localhost.localdomain 4.13.2-gentoo #3 SMP PREEMPT Thu Sep 21 21:38:51 CEST 2017 x86_64 Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz GenuineIntel GNU/Linux


partial output:

Traceback (most recent call last):
  File "/var/tmp/portage/media-libs/mesa-17.3.0_rc2/work/mesa-17.3.0-rc2/src/intel/vulkan/anv_icd.py", line 26, in <module>
    from anv_extensions import *
  File "/var/tmp/portage/media-libs/mesa-17.3.0_rc2/work/mesa-17.3.0-rc2/src/intel/vulkan/anv_extensions.py", line 32, in <module>
    from mako.template import Template
ImportError: No module named mako.template
make[4]: *** [Makefile:4832: vulkan/dev_icd.json] Error 1


I will attach a full log.
Comment 1 mercuriete 2017-10-30 20:20:55 UTC
Created attachment 501132 [details]
build log of mesa
Comment 2 mercuriete 2017-10-30 20:22:03 UTC
Created attachment 501134 [details]
emerge info
Comment 3 Scott Short 2017-10-30 20:26:51 UTC
Confirmed. Same here. Vulkan issue?
Comment 4 mercuriete 2017-10-30 20:33:29 UTC
possible workaround:

sudo emerge dev-python/mako --oneshot

and then

sudo emerge mesa

Can anybody confirm if mako is now a new dependency of mesa?
Comment 5 mercuriete 2017-10-30 20:42:03 UTC
ok, i can confirm that if you install mako then mesa compiles fine.


in the ebuild the problem seems it is there:

[[ ${PV} == 9999 ]] && DEPEND+="
	sys-devel/bison
	sys-devel/flex
	$(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
"

mako is only in DEPEND when PV == 9999
Comment 6 Denis Descheneaux 2017-10-31 04:23:36 UTC
Suggestion from comment 4 did not work for me, package was already emerged, re-merged and retried mesa, fails at same spot / error message
Comment 7 NHO 2017-10-31 09:19:13 UTC
mesa uses python 2.7, hence mako needs to be emerged with PYTHON_TARGETS="python2_7" or with USE flag python_targets_python2_7 set
Comment 8 jms 2017-10-31 09:44:24 UTC
same here
Comment 9 jms 2017-10-31 10:52:47 UTC
comment 4 did work for me
mesa did compile fine after mako install

eix  mako
[I] dev-python/mako
     Available versions:  1.0.0 1.0.3 ~1.0.6 {doc test PYTHON_TARGETS="pypy python2_7 python3_4 python3_5 python3_6"}
     Installed versions:  1.0.3(10:49:04 31/10/2017)(-doc -test PYTHON_TARGETS="python2_7 python3_4 -pypy -python3_5 -python3_6")
     Homepage:            http://www.makotemplates.org/ https://pypi.python.org/pypi/Mako
     Description:         A Python templating language


note that I do have 
PYTHON_TARGETS="python2_7"
Comment 10 Denis Descheneaux 2017-10-31 12:07:44 UTC
adding PYTHON_TARGETS="python2_7" to mako package then emerging mesa is OK
Comment 11 Conrad Kostecki gentoo-dev 2017-10-31 13:24:57 UTC
+1

emerging dev-python/mako does the job.
Comment 12 Larry the Git Cow gentoo-dev 2017-11-02 05:13:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b25a93431297ebb15fa378e6efd89b4672a641cc

commit b25a93431297ebb15fa378e6efd89b4672a641cc
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2017-11-02 05:13:28 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2017-11-02 05:13:46 +0000

    media-libs/mesa: Require dev-python/mako for USE=vulkan
    
    The Intel Vulkan driver generates its icd files using Python/mako.
    
    Closes: https://bugs.gentoo.org/635936

 media-libs/mesa/mesa-17.3.0_rc2.ebuild | 3 +++
 media-libs/mesa/mesa-9999.ebuild       | 3 +++
 2 files changed, 6 insertions(+)
Comment 13 mercuriete 2017-11-03 17:56:16 UTC
Thank you very much for your awesome work :) <3