Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to build with python 3.7.0 - generator raised StopIteration #5958

Closed
globau opened this issue Jul 1, 2018 · 11 comments
Closed

unable to build with python 3.7.0 - generator raised StopIteration #5958

globau opened this issue Jul 1, 2018 · 11 comments

Comments

@globau
Copy link

globau commented Jul 1, 2018

mpv version and platform

master on osx

Reproduction steps

try to build on a system with python 3.7.0

Expected behavior

successful build

Actual behavior

generator raised StopIteration

Log file

https://gist.github.com/globau/c6ce68c81a7912a98613d9b0821cefa5

==> ./bootstrap.py
==> python3 waf configure --prefix=/usr/local/Cellar/mpv/0.28.2 --enable-libmpv-shared --enable-html-build --enable-lua --confdir=/usr/local/etc/mpv --datadir=/usr/local/Cellar/mpv/
Last 15 lines from /Users/byron/Library/Logs/Homebrew/mpv/03.python3:
  File "/private/tmp/mpv-20180702-15427-288kiz/mpv-0.28.2/.waf3-1.9.8-17756245c4cc550633dacf3b08eec42a/waflib/Context.py", line 129, in recurse
    user_function(self)
  File "/private/tmp/mpv-20180702-15427-288kiz/mpv-0.28.2/wscript", line 939, in options
    opt.load('compiler_c')
  File "/private/tmp/mpv-20180702-15427-288kiz/mpv-0.28.2/.waf3-1.9.8-17756245c4cc550633dacf3b08eec42a/waflib/Context.py", line 85, in load
    fun(self)
  File "/private/tmp/mpv-20180702-15427-288kiz/mpv-0.28.2/.waf3-1.9.8-17756245c4cc550633dacf3b08eec42a/waflib/Tools/compiler_c.py", line 40, in options
    opt.load_special_tools('c_*.py',ban=['c_dumbpreproc.py'])
  File "/private/tmp/mpv-20180702-15427-288kiz/mpv-0.28.2/.waf3-1.9.8-17756245c4cc550633dacf3b08eec42a/waflib/Context.py", line 319, in load_special_tools
    lst=self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var)
  File "/private/tmp/mpv-20180702-15427-288kiz/mpv-0.28.2/.waf3-1.9.8-17756245c4cc550633dacf3b08eec42a/waflib/Node.py", line 344, in ant_glob
    ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]
  File "/private/tmp/mpv-20180702-15427-288kiz/mpv-0.28.2/.waf3-1.9.8-17756245c4cc550633dacf3b08eec42a/waflib/Node.py", line 344, in <listcomp>
    ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]
RuntimeError: generator raised StopIteration

bootstrap.py downloads waf version 1.9.8; according to https://gitlab.com/ita1024/waf/blob/master/ChangeLog you need to use version 2.0.7 or later.

@globau
Copy link
Author

globau commented Jul 1, 2018

unfortunately bumping the waf version to 2.0.8 doesn't work without further changes:

$ python3 waf install
...
  File "/Users/byron/development/mpv/waftools/generators/sources.py", line 102, in handle_add_object
    tgen.link_task.inputs.append(input_node)
AttributeError: 'task_gen' object has no attribute 'link_task'

@Akemi
Copy link
Member

Akemi commented Jul 1, 2018

yeah we are working on that. sadly upgrading waf causes some more problems than expected, so it will need more testing on the various platforms.

this branch will fix the macOS specific problems and this patch from @jeeb fixes the other known problems.

@ilovezfs
Copy link

ilovezfs commented Jul 1, 2018

@Akemi is it all right to use python2 with waf instead?

@Akemi
Copy link
Member

Akemi commented Jul 1, 2018

@ilovezfs as far as i know, yes. personally when i made changes to the build system i made sure that building works on both major versions of python on various macOS versions. though even before both versions were considered and tested.

the original homebrew formula probably explicitly used python3 to reduce the possible error sources. in the case you were asking because you want to change that in the formula.

@ilovezfs
Copy link

ilovezfs commented Jul 1, 2018

Yes that's why I ask: Homebrew/homebrew-core#29621

@Argon-
Copy link
Member

Argon- commented Jul 2, 2018

@ilovezfs Does that still work with vapoursynth?
We added python3 back then when vapoursynth support was added to the formula: mpv-player/homebrew-mpv@0b130f3#diff-512afa233a337809e7df9452f936788fR56
Vapoursynth requires python3. In theory, that shouldn't imply that mpv needs to be built with it but I doubt it was changed for funzies. Maybe it was just about the visibility of some (search)directories but I don't remember tbh.

@ilovezfs
Copy link

ilovezfs commented Jul 2, 2018

Yes it still works:
https://gist.github.com/ilovezfs/988d62136b95db0287fdf0bd747990e9

bash-3.2$ brew linkage mpv|grep vapour
  /usr/local/opt/vapoursynth/lib/libvapoursynth-script.0.dylib (vapoursynth)
  /usr/local/opt/vapoursynth/lib/libvapoursynth.dylib (vapoursynth)
  vapoursynth

@Akemi
Copy link
Member

Akemi commented Jul 22, 2018

fixed by 15a6d00.

just a heads-up @ilovezfs. we just released 0.29 (ca73b60) which incorporates the waf fixes. so Homebrew/homebrew-core@b314a66 could be reverted when you update the mpv formula to 0.29.

@Akemi Akemi closed this as completed Jul 22, 2018
@ilovezfs
Copy link

Thanks for the heads-up @Akemi!

@ilovezfs
Copy link

@Akemi Voilà Homebrew/homebrew-core#30369

@Akemi
Copy link
Member

Akemi commented Jul 22, 2018

great, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants