python-for-android icon indicating copy to clipboard operation
python-for-android copied to clipboard

Jpeg Recipe trouble

Open AkSh0k opened this issue 4 months ago • 0 comments

I have experienced this bug a lot of times and I find a fix. I need to manualy change version line in CMakeLists.txt (.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/arm64-v8a__ndk_target_21/jpeg/CMakeLists.txt): cmake_minimum_required(VERSION 2.8.12) from something like 2.8.12 to 3.5 and then it working.

Also I have trouble with second Error in this Traceback with command "/bin/rm -f CMakeCache.txt CMakeFiles/", which fixes editing the JpegRecipe.build_arch (init.py of Recipe "jpeg") from "/bin/rm -f CMakeCache.txt CMakeFiles/" to "/bin/rm -rf CMakeCache.txt CMakeFiles/" (I make on recurcive mode to removing all files in this directory).

I don't understand why in this recipe version sets 2.0.1: class JpegRecipe(Recipe): name = 'jpeg' version = '2.0.1' url = 'https://github.com/libjpeg-turbo/libjpeg-turbo/archive/{version}.tar.gz' # noqa built_libraries = {'libjpeg.a': '.', 'libturbojpeg.a': '.'} # we will require this below patch to build the shared library # patches = ['remove-version.patch']

[INFO]: Building jpeg for arm64-v8a [INFO]: -> directory context /Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/arm64-v8a__ndk_target_21/jpeg [DEBUG]: -> running rm -f CMakeCache.txt CMakeFiles/ [DEBUG]: rm: CMakeFiles/: is a directory Exception in thread background thread for pid 22596: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/threading.py", line 1043, in _bootstrap_inner self.run() ~~~~~~~~^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/threading.py", line 994, in run self._target(*self._args, **self._kwargs) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.venv/lib/python3.13/site-packages/sh.py", line 1641, in wrap fn(*rgs, **kwargs) ~~^^^^^^^^^^^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.venv/lib/python3.13/site-packages/sh.py", line 2569, in background_thread handle_exit_code(exit_code) ~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.venv/lib/python3.13/site-packages/sh.py", line 2269, in fn return self.command.handle_command_exit_code(exit_code) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.venv/lib/python3.13/site-packages/sh.py", line 869, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:

RAN: /bin/rm -f CMakeCache.txt CMakeFiles/

STDOUT: rm: CMakeFiles/: is a directory

STDERR:

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1256, in main() ~~~~^^ File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() ~~~~~~~~~~~^^ File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 685, in init getattr(self, command)(args) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 104, in wrapper_func build_dist_from_args(ctx, dist, args) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 163, in build_dist_from_args build_recipes(build_order, python_modules, ctx, ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getattr(args, "private", None), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<2 lines>... ), ^^ ) ^ File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 504, in build_recipes recipe.build_arch(arch) ~~~~~~~~~~~~~~~~~^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/jpeg/init.py", line 30, in build_arch shprint(sh.rm, '-f', 'CMakeCache.txt', 'CMakeFiles/') ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint for line in output: ^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.venv/lib/python3.13/site-packages/sh.py", line 915, in next self.wait() ~~~~~~~~~^^ File "/Users/aksh0k/College/Pycharm/01.03/.venv/lib/python3.13/site-packages/sh.py", line 845, in wait self.handle_command_exit_code(exit_code) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/aksh0k/College/Pycharm/01.03/.venv/lib/python3.13/site-packages/sh.py", line 869, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:

RAN: /bin/rm -f CMakeCache.txt CMakeFiles/

STDOUT: rm: CMakeFiles/: is a directory

STDERR:

Command failed: ['/Users/aksh0k/College/Pycharm/01.03/.venv/bin/python', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=restapp', '--bootstrap=sdl2', '--requirements=python3,kivy,pillow,psycopg2-binary,requests', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/Users/aksh0k/College/Pycharm/01.03/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']

ENVIRONMENT:

\PATH = ('/Users/aksh0k/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/aksh0k/College/Pycharm/01.03/.venv/bin:/Users/aksh0k/.local/bin:/opt/homebrew/opt/openjdk@17/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/Applications/Little '
'Snitch.app/Contents/Components')

AkSh0k avatar Oct 21 '25 18:10 AkSh0k