Skip to content

Bump FFMpegRecipe and PyAVRecipe versions #3065

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

Merged
merged 6 commits into from
Oct 17, 2024

Conversation

DexerBR
Copy link
Contributor

@DexerBR DexerBR commented Sep 24, 2024

PyAV updated to the latest stable release - 13.1.0
FFmpeg updated to 6.1.2 - ffpyplayer is still not compatible with FFmpeg 7.x.x.

@DexerBR DexerBR force-pushed the bump_recipe_versions branch from 1489556 to 541fe99 Compare September 24, 2024 17:24
AndreMiras
AndreMiras previously approved these changes Sep 24, 2024
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of it.
Left a minor comment and let's see how the build is doing in the CI

@DexerBR DexerBR requested a review from AndreMiras September 26, 2024 16:41
@AndreMiras
Copy link
Member

Hi @DexerBR, thank you for looking this up.
I noticed the build log has a lot of theses while building av.

av/_core.pyx:5:3: cimported module has no attribute 'avdevice_register_all'
...
av/_core.pyx:54:25: cimported module has no attribute 'swresample_configuration'

See for instance the Test updated recipes for arch x86_64 [ ubuntu-latest ] build.
Do you have an idea of why this could be?

@DexerBR
Copy link
Contributor Author

DexerBR commented Sep 27, 2024

Hi @DexerBR, thank you for looking this up. I noticed the build log has a lot of theses while building av.

av/_core.pyx:5:3: cimported module has no attribute 'avdevice_register_all'
...
av/_core.pyx:54:25: cimported module has no attribute 'swresample_configuration'

See for instance the Test updated recipes for arch x86_64 [ ubuntu-latest ] build. Do you have an idea of why this could be?

They usually used to be errors related to premature compilation issues. The patch I'm using, for example, solves the same type of errors, but caused by problems recognizing more modern Python syntax (I don't know why).

In this specific case, the error seems to have originated somewhere else, some tips could be:

[INFO]:    -> running python3 setup.py build_ext -v --ffmpeg-dir=/home/u...(and 90 more)
Exception in thread background thread for pid 57736:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 1639, in wrap
    fn(*rgs, **kwargs)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 2641, in background_thread
    handle_exit_code(exit_code)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 2332, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 826, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v --ffmpeg-dir=/home/user/.local/share/python-for-android/build/other_builds/ffmpeg/x86_64__ndk_target_24/ffmpeg

  STDOUT:
/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/_distutils_hack/__init__.py:11: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
  warnings.warn(
/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/_distutils_hack/__init__.py:26: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Compiling av/_core.pyx because it changed.
[1/1] Cythonizing av/_core.pyx
Compiling av/stream.pyx because it changed.

and

[1/1] Cythonizing av/audio/frame.pyx
Traceback (most recent call last):
  File "/home/user/.local/share/python-for-android/build/other_builds/av-openssl/x86_64__ndk_target_24/av/setup.py", line 216, in <module>
    setup(
  File "/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/__init__.py", line 104, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/_distutils/core.py", line 172, in setup
    ok = dist.parse_command_line()
         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/_distutils/dist.py", line 475, in parse_command_line
    args = self._parse_command_opts(parser, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/dist.py", line 869, in _parse_command_opts
    nargs = _Distribution._parse_command_opts(self, parser, args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/_distutils/dist.py", line 541, in _parse_command_opts
    raise DistutilsClassError(
distutils.errors.DistutilsClassError: command class <class 'setuptools.command.build_ext.build_ext'> must subclass Command


  STDERR:


[INFO]:    av first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize av/_core.pyx
stty: 'standard input': Inappropriate ioctl for device
[INFO]:    -> running python3 -cimport sys; from Cython.Compiler.Main im...(and 65 more)
Exception in thread background thread for pid 57744:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 1639, in wrap
    fn(*rgs, **kwargs)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 2641, in background_thread
    handle_exit_code(exit_code)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 2332, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 826, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

Before the patch, the errors I mentioned occurred in these same places.


So in short, these errors break further compilation resulting in the errors you mentioned.

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @DexerBR, thank you for taking the time to clarify and I could also confirm it building the recipe in its current version from develop and got the same error (see https://github.com/AndreMiras/python-for-android/actions/runs/11386543386/job/31679029568).
We're good to 🚢 it

@AndreMiras AndreMiras merged commit 9bfa3eb into kivy:develop Oct 17, 2024
25 of 34 checks passed
@DexerBR DexerBR deleted the bump_recipe_versions branch October 17, 2024 16:56
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

Successfully merging this pull request may close these issues.

2 participants