mpv-player / mpv-build

🔨 Helper scripts to compile mpv on Linux
http://mpv.io
408 stars 107 forks source link

Build failure on Ubuntu 20.10 #142

Closed make-42 closed 3 years ago

make-42 commented 3 years ago

Error:

Traceback (most recent call last):
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py", line 119, in waf_entry_point
    run_commands()
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py", line 182, in run_commands
    ctx=run_command(cmd_name)
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py", line 173, in run_command
    ctx.execute()
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py", line 375, in execute
    return execute_method(self)
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 93, in execute
    self.execute_build()
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 96, in execute_build
    self.recurse([self.run_dir])
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Context.py", line 133, in recurse
    user_function(self)
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/wscript", line 1018, in build
    ctx.load('wscript_build')
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Context.py", line 90, in load
    fun(self)
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/wscript_build.py", line 52, in build
    ctx.load('generators.sources')
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Context.py", line 87, in load
    module=load_tool(t,path,with_sys_path=with_sys_path)
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Context.py", line 396, in load_tool
    __import__(x%tool)
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/waftools/generators/sources.py", line 4, in <module>
    from TOOLS.matroska import generate_C_header, generate_C_definitions
  File "/home/ontake/Apps/GithubAutoUpdatingCode/mpv-build/mpv/TOOLS/matroska.py", line 420
    print("    " * depth, '[' + elid + ']', elem.name, 'size:', length, 'value:', end=' ')
                                                                                     ^
SyntaxError: invalid syntax

Python Version : 3.8.6

sfan5 commented 3 years ago

From the backtrace it's evident that waf is running using Python 2, but this is not supported. To fix this you can go into [...]/mpv-build/mpv, delete waf and run ./bootstrap.py again.

make-42 commented 3 years ago

trying that

make-42 commented 3 years ago

Works! Thanks!

make-42 commented 3 years ago

image