pydantic_core makes all build fails
magowiz opened this issue · 21 comments
Checklist
- the issue is indeed a bug and not a support request
- issue doesn't already exist: https://github.com/kivy/python-for-android/issues
- I have a short, runnable example that reproduces the issue
- I reproduced the problem with the latest development version (
p4a.branch = develop
) - I used the grave accent (aka backticks) to format code or logs when appropriated
Versions
- Python: 3.10
- OS: ubuntu 22.04 inside docker
- Kivy: 2.3.1
- Cython: 0.29.33
- OpenJDK: 17
Description
I'm trying to build my application, in android logcat, on loading I've got an error telling me that pydantic_core module is missing, so I tried to put it inside buildozer.spec in requirements section, as there's an official pydantic_core recipe available.
buildozer.spec
Command:
buildozer android debug
I also issued buildozer android release
and in order to have separate apk for each architecture I put one at time into android.archs
Prior to launching the build I took care of erasing buildozer folders (~/.buildozer
and build dir) and jenkins workspace, to eliminate potential cache issues from previous builds.
Spec file:
[app]
title = MuseNote
package.name = musenote
package.domain = net.magowiz
source.dir = .
source.include_exts = py,png,jpg,kv,atlas
source.exclude_dirs = tests, bin, venv, source
version = 0.1
requirements = python3,kivy,kivymd,androidstorage4kivy,bawx-player,mutagen,ffpyplayer==v4.5.0,ffpyplayer_codecs,ffmpeg,shazamio,
sqlalchemy,alembic,typing_extensions,mako,markupsafe,pydantic,dataclass_factory,aiohttp_retry,aiohttp,multidict,attrs,yarl,async_timeout,charset_normalizer==2.1.1,faust-cchardet,aiosignal,frozenlist,pydub,shazamio_core,pydantic_core
presplash.filename = %(source.dir)s/img/icon.png
icon.filename = %(source.dir)s/img/icon.png
orientation = portrait, landscape
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.permissions = STORAGE, WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, INTERNET,MANAGE_EXTERNAL_STORAGE,READ_MEDIA_IMAGES,READ_MEDIA_VIDEO,READ_MEDIA_AUDIO
android.api = 34
android.archs = arm64-v8a, armeabi-v7a, x86, x86_64
android.allow_backup = True
p4a.fork = kivy
p4a.branch = develop
p4a.local_recipes = p4a_recipes
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.10.0
ios.codesign.allowed = false
[buildozer]
log_level = 2
warn_on_root = 0
Logs
[DEBUG]: tree = Parsing.p_module(s, pxd, full_module_name)
[DEBUG]: warning: ffpyplayer/player/../includes/ff_consts.pxi:4:9: 'MAC_REALLOC' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/ff_consts.pxi:5:9: 'NOT_WIN_MAC' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/ff_consts.pxi:6:9: 'WIN_IS_DEFINED' redeclared
[INFO]: Cythonize ffpyplayer/player/frame_queue.pyx
stty: 'standard input': Inappropriate ioctl for device
[DEBUG]: -> running python3 -cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main()); ./ffpyplayer/player/frame_queue.pyx
[DEBUG]: /usr/local/lib/python3.10/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/player/frame_queue.pxd
[DEBUG]: tree = Parsing.p_module(s, pxd, full_module_name)
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:167:4: 'SDL_eventaction' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:5:8: 'SDL_INIT_VIDEO' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:6:8: 'SDL_INIT_AUDIO' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:7:8: 'SDL_INIT_TIMER' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:8:8: 'SDL_INIT_EVENTTHREAD' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:75:13: 'SDL_HWACCEL' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:76:13: 'SDL_ASYNCBLIT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:77:13: 'SDL_HWSURFACE' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:78:13: 'SDL_FULLSCREEN' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:79:13: 'SDL_RESIZABLE' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:80:13: 'SDL_YV12_OVERLAY' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:81:12: 'SDL_MIX_MAXVOLUME' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:83:13: 'AUDIO_S16SYS' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:86:12: 'SDL_AUDIO_ALLOW_ANY_CHANGE' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:87:8: 'SDL_AudioDeviceID' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:127:8: 'SDL_IGNORE' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:128:12: 'SDL_ACTIVEEVENT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:129:12: 'SDL_SYSWMEVENT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:131:8: 'SDL_VIDEOEXPOSE' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:132:8: 'SDL_USEREVENT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:133:8: 'SDL_QUIT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:134:8: 'SDL_VIDEORESIZE' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:135:13: 'SDL_ALLEVENTS' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:168:8: 'SDL_ADDEVENT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:169:8: 'SDL_PEEKEVENT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/sdl.pxi:170:8: 'SDL_GETEVENT' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/ff_consts.pxi:4:9: 'MAC_REALLOC' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/ff_consts.pxi:5:9: 'NOT_WIN_MAC' redeclared
[DEBUG]: warning: ffpyplayer/player/../includes/ff_consts.pxi:6:9: 'WIN_IS_DEFINED' redeclared
stty: 'standard input': Inappropriate ioctl for device
[DEBUG]: -> running python3 setup.py build_ext -v
[DEBUG]: /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/setup.py:3: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
[DEBUG]: from distutils.command.build_ext import build_ext
[DEBUG]: /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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.
[DEBUG]: warnings.warn(
[DEBUG]: /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/_distutils_hack/__init__.py:26: UserWarning: Setuptools is replacing distutils.
[DEBUG]: warnings.warn("Setuptools is replacing distutils.")
[DEBUG]: Using setuptools
[DEBUG]: Not using cython on android
[DEBUG]: Environ change use_sdl2_mixer -> True
[DEBUG]: FFMPEG_ROOT: "None"
[DEBUG]: SDL_ROOT: "None"
[DEBUG]: SDL2_MIXER_ROOT: "None"
[DEBUG]: Generating ffconfig.h
[DEBUG]: Generating ffconfig.pxi
[DEBUG]: Include directories: ['/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL2_mixer/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/includes']
[DEBUG]: Library directories: ['/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/lib', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/libs/arm64-v8a']
[DEBUG]: Traceback (most recent call last):
[DEBUG]: File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/setup.py", line 398, in <module>
[DEBUG]: setup(name='ffpyplayer',
[DEBUG]: File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/__init__.py", line 104, in setup
[DEBUG]: return distutils.core.setup(**attrs)
[DEBUG]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[DEBUG]: File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/_distutils/core.py", line 172, in setup
[DEBUG]: ok = dist.parse_command_line()
[DEBUG]: ^^^^^^^^^^^^^^^^^^^^^^^^^
[DEBUG]: File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/_distutils/dist.py", line 475, in parse_command_line
[DEBUG]: args = self._parse_command_opts(parser, args)
[DEBUG]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[DEBUG]: File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/dist.py", line 869, in _parse_command_opts
[DEBUG]: nargs = _Distribution._parse_command_opts(self, parser, args)
[DEBUG]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[DEBUG]: File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/_distutils/dist.py", line 541, in _parse_command_opts
[DEBUG]: raise DistutilsClassError(
[DEBUG]: distutils.errors.DistutilsClassError: command class <class '__main__.FFBuildExt'> must subclass Command
Exception in thread background thread for pid 60232:
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 "/root/.local/lib/python3.10/site-packages/sh.py", line 1641, in wrap
fn(*rgs, **kwargs)
File "/root/.local/lib/python3.10/site-packages/sh.py", line 2569, in background_thread
handle_exit_code(exit_code)
File "/root/.local/lib/python3.10/site-packages/sh.py", line 2269, in fn
return self.command.handle_command_exit_code(exit_code)
File "/root/.local/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v
STDOUT:
/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/setup.py:3: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.command.build_ext import build_ext
/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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.")
Using setuptools
Not using cython on android
Environ change use_sdl2_mixer -> True
FFMPEG_ROOT: "None"
SDL_ROOT: "None"
SDL2_MIXER_ROOT: "None"
Generating ffconfig.h
Generating ffconfig.pxi
Include directories: ['/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL2_mixer/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/includes']
Library directories: ['/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/lib', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/libs/arm64-v8a']
Traceback (most recent call last):
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/setup.py", line 398, in <module>
setup(name='ffpyplayer',
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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 '__main__.FFBuildExt'> must subclass Command
STDERR:
[INFO]: STDOUT (last 20 lines of 34):
Include directories: ['/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL2_mixer/include', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/includes']
Library directories: ['/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/lib', '/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/libs/arm64-v8a']
Traceback (most recent call last):
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer/setup.py", line 398, in <module>
setup(name='ffpyplayer',
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/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 '__main__.FFBuildExt'> must subclass Command
[INFO]: STDERR:
[INFO]: ENV:
export HOME='/root'
export CFLAGS='-target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include'
export CXXFLAGS='-target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC'
export CPPFLAGS='-DANDROID -I/root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/include/python3.1'
export LDFLAGS=' -L/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/libs_collections/musenote/arm64-v8a -L/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/android-build -lpython3.11 -L/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/libs_collections/musenote/arm64-v8a -L/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/libs_collections/musenote -L/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/obj/local/arm64-v8a '
export LDLIBS='-lm'
export USE_CCACHE='1'
export NDK_CCACHE='/usr/bin/ccache'
export PATH='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/bin:/root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin:/root/.buildozer/android/platform/android-ndk-r25b:/root/.buildozer/android/platform/android-sdk/tools:/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin:/root/.cargo/bin'
export CC='/usr/bin/ccache /root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC'
export CXX='/usr/bin/ccache /root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC'
export AR='/root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
export RANLIB='/root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib'
export STRIP='/root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --strip-unneeded'
export READELF='/root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf'
export OBJCOPY='/root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy'
export MAKE='make -j4'
export ARCH='arm64-v8a'
export NDK_API='android-21'
export LDSHARED='/usr/bin/ccache /root/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -shared'
export BUILDLIB_PATH='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.11'
export PYTHONNOUSERSITE='1'
export LANG='en_GB.UTF-8'
export PYTHONPATH='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib:/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages:/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/temp.linux-x86_64-3.11:/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.11:/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/scripts-3.11'
export LIBLINK='NOTNONE'
export COPYLIBS='1'
export LIBLINK_PATH='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/objects_ffpyplayer'
export FFMPEG_INCLUDE_DIR='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/include'
export FFMPEG_LIB_DIR='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffmpeg/arm64-v8a__ndk_target_21/ffmpeg/lib'
export SDL_INCLUDE_DIR='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL/include'
export SDL_LIB_DIR='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/libs/arm64-v8a'
export USE_SDL2_MIXER='1'
export SDL2_MIXER_INCLUDE_DIR='/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL2_mixer/include'
export NDKPLATFORM='NOTNONE'
[INFO]: COMMAND:
cd /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/ffpyplayer-ffpyplayer_codecs-openssl/arm64-v8a__ndk_target_21/ffpyplayer && /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v
[WARNING]: ERROR: /home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 failed!
# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=musenote', '--bootstrap=sdl2', '--requirements=python3,kivy,kivymd,androidstorage4kivy,bawx-player,mutagen,ffpyplayer,ffpyplayer_codecs,ffmpeg,shazamio,sqlalchemy,alembic,typing_extensions,mako,markupsafe,pydantic,dataclass_factory,aiohttp_retry,aiohttp,multidict,attrs,yarl,async_timeout,charset_normalizer==2.1.1,faust-cchardet,aiosignal,frozenlist,pydub,shazamio_core,pydantic_core', '--arch=arm64-v8a', '--copy-libs', '--local-recipes', '/home/jenkins/workspace/nization_folder_musenote_develop/p4a_recipes', '--color=always', '--storage-dir=/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a', '--ndk-api=21', '--ignore-setup-py', '--debug']
# ENVIRONMENT:
# JENKINS_HOME = '/var/jenkins_home'
# ARCH = 'arm64-v8a'
# GIT_PREVIOUS_SUCCESSFUL_COMMIT = '478c2839536787e487bd757d344c46ec29e49eec'
# PIP_TRUSTED_HOST = '192.168.2.11'
# CI = 'true'
# HOSTNAME = '16c3391f7df3'
# RUN_CHANGES_DISPLAY_URL = 'http://jenkins:8080/job/organization%20folder/job/musenote/job/develop/792/display/redirect?page=changes'
# BUILDOZER_BUILD_VOLUME = 'buildozer_build_musenote_develop'
# GIT_COMMIT = 'bd8e685163b96f1d05c3e64be16a10ea125bce31'
# NODE_LABELS = 'general x86 zima zimaboard amd64'
# HUDSON_URL = 'http://jenkins:8080/'
# HOME = '/root'
# BUILD_URL = 'http://jenkins:8080/job/organization%20folder/job/musenote/job/develop/792/'
# JENKINS_SERVER_COOKIE = 'durable-c9039075b476dccb72f71cb5738217d1e31dd1208f80bebb8b51ae151e031bd8'
# BUILDOZER_HOME_VOLUME = 'buildozer_home_musenote_develop'
# WORKSPACE = '/home/jenkins/workspace/nization_folder_musenote_develop'
# VERSION = '0.1'
# PROJECT_NAME = 'musenote'
# NODE_NAME = 'zima'
# RUN_ARTIFACTS_DISPLAY_URL = 'http://jenkins:8080/job/organization%20folder/job/musenote/job/develop/792/display/redirect?page=artifacts'
# ANDROID_KEYSTORE = ****
# GIT_BRANCH = 'develop'
# STAGE_NAME = 'build_mobile arm64 debug'
# EXECUTOR_NUMBER = '1'
# TERM = 'xterm'
# BUILD_DISPLAY_NAME = '#792'
# RUN_TESTS_DISPLAY_URL = 'http://jenkins:8080/job/organization%20folder/job/musenote/job/develop/792/display/redirect?page=tests'
# HUDSON_HOME = '/var/jenkins_home'
# JOB_BASE_NAME = 'develop'
# PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin:/root/.cargo/bin'
# Dockerfolders = 'build_whl,buildozer,generate_doc,megalinter,pytest_x11'
# PIP_INDEX_URL = 'http://192.168.2.11:5000/index/'
# BUILD_ID = '792'
# BUILD_TAG = 'jenkins-organization folder-musenote-develop-792'
# JENKINS_URL = 'http://jenkins:8080/'
# GIT_URL = 'http://gitea:3000/magowiz/musenote.git'
# JOB_URL = 'http://jenkins:8080/job/organization%20folder/job/musenote/job/develop/'
# BUILD_NUMBER = '792'
# DEBIAN_FRONTEND = 'noninteractive'
# JENKINS_NODE_COOKIE = '75af0aca-d72f-47a1-8846-b9b196533447'
# RUN_DISPLAY_URL = 'http://jenkins:8080/job/organization%20folder/job/musenote/job/develop/792/display/redirect'
# HUDSON_SERVER_COOKIE = '90c4dca5545f12e3'
# JOB_DISPLAY_URL = 'http://jenkins:8080/job/organization%20folder/job/musenote/job/develop/display/redirect'
# CLASSPATH = ''
# JOB_NAME = 'organization folder/musenote/develop'
# PWD = '/home/jenkins/workspace/nization_folder_musenote_develop'
# GIT_PREVIOUS_COMMIT = 'bd8e685163b96f1d05c3e64be16a10ea125bce31'
# bundletool = 'java -jar building_apk/bundletool-all-1.11.0.jar'
# WORKSPACE_TMP = '/home/jenkins/workspace/nization_folder_musenote_develop_tmp'
# TZ = 'Europe/Rome'
# BRANCH_NAME = 'develop'
# LC_CTYPE = 'C.UTF-8'
# PACKAGES_PATH = '/root/.buildozer/android/packages'
# ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r25b'
# ANDROIDAPI = '34'
# ANDROIDMINAPI = '21'
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
About log I pasted here only the final part, from where, I suppose, errors starting, by the way I also attached to this issue the full log.
full.log
Just to make as accurate as possible mine report I also report the dockerfile of the container in which I run buildozer:
FROM ubuntu:22.04
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Rome
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --no-install-recommends -y automake \
build-essential ccache \
gettext patch python3-setuptools sudo libltdl-dev autopoint git zip unzip openjdk-17-jdk liblzma-dev \
python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake \
libffi-dev libssl-dev g++ m4 lld && apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /opt
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt && pip install --no-cache-dir buildozer
ENV PATH="$PATH:/root/.local/bin"
RUN git config --global --add safe.directory '*'
in the requirements.txt there is:
Cython==0.29.33
virtualenv
Please let me know if there's any additional information I can provide or any troubleshooting steps you recommend to help resolve this issue.
best regards,
magowiz
Can you clear that what you mean by "all builds"? all requirements?
As I see only see ffpyplayer build is failing.
So issue is about ffpyplayer build failure?
Can you clear that what you mean by "all builds"? all requirements? As I see only see ffpyplayer build is failing.
I mean for each of the build I launch, one for each architecture
So issue is about ffpyplayer build failure?
I don't know, before I add pydantic_core to requirements the builds were all fine, so I thought it was pydantic_core
offending package, but if you see that ffpyplayer is failing, maybe there could be a sort of conflict between those packages?
I will try again, after cleaning all directories to build with all requirements except pydantic_core
so I would be able to confirm you this.
@T-Dynamos :
sorry, probably due to the cache I had some false positive: successful builds that should have failed with a clean build (empty buildozer home and build folders), in order to get a working build I had to remove:
- shazamio_core
- pydantic_core
- rustup from dockerfile
- p4a from develop to master
I added those because master branch doesn't have the possibility to run rust recipes, shazamio_core and pydantic_core.
once I reverted all those changes, the build start to succeed, so I think it could be the switch of p4a branch from develop to master.
How do you suggest to proceed? Should I try to switch to develop branch and attach updated information in this issues?
Thanks for insights, I will look into it.
I've seen you did, in #3025, the merge into develop, so, I'm asking for confirmation: are you telling me I should test develop right now after your 5h ago change?
@magowiz Yes.
I tried but builds still failing, but probably on another package, it seems to me sqlalchemy
I'm going to attach you the full log in order to provide you most information possible. If is it another package/recipe, do I need to open a new issue?
I compressed the log because was huge (~56MB)
build.zip
Let me know what should I do to address this issue, if it is another one.
Thanks in advance,
magowiz
Seeing your build order sqlalchemy
seems like last package needs to be fixed.
Will look into it. :)
Seeing your build order
sqlalchemy
seems like last package needs to be fixed. Will look into it. :)
Thank you very much, let's hope that after this also shazamio_core and pydantic_core, which are rust builds, will work.
Yeah, it worked, I'm going to try pydantic_core
and shazamio_core
The build went fine but if I open the armv8 apk on my phone, I find out that probably a library for another architecture were installed:
ImportError: dlopen failed: "/data/data/net.magowiz.musenote/files/app/_python_bundle/site-packages/pydantic_core/_pydantic_core.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)
I saw that recipe folder is pydantic-core
and I put pydantic_core
in requirements, could it be for dash/underscore difference in the name? Do I need to write in requirements exactly pydantic-core
? Otherwise how could it possible that mine build didn't pick up the according recipe?
I was able to build it correctly, I needed to put the same exact name as recipe. I was missing also annotated_types
and I was able to add it, by the way it seems that is having some issues I don't have when I run the same code from desktop:
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/shazamio/__init__.py", line 1, in <module>
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/shazamio/serializers.py", line 3, in <module>
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/shazamio/schemas/base.py", line 20, in <module>
File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/pydantic/_internal/_model_construction.py", line 115, in __new__
File "<frozen abc>", line 106, in __new__
TypeError: Cannot create a consistent method resolution
order (MRO) for bases BaseModel, BaseIdTypeHref, Generic
I don't know if this could be related to pydantic
You should report this to shazamio.
I found the reason:
on my poetry.lock I have version 1.10.15 of pydantic, and a constraint that tells
pydantic = ">=1.10.2,<2.0.0"
on pydantic-core recipe we have version 2.16.1
, also the fact that there isn't a way to resolve automatically dependencies and to use packages constraints on p4a doesn't help, so probably with a pydantic 1.x won't fail, by the way I'll report it to shazamio project.
Should I close this one?
I commented original issue on shazamio, if they introduce compatibility with pydantic 2.x it should work.
Should I close this one?
Yes.
so probably with a pydantic 1.x won't fail
Let's hope.
Probably I will try also to set a constraint to pydantic package, I don't know if that version needs also a pydantic_core, maybe is just a pure python package, worth trying.
By the way thank you very much for your help, I close this.