Why can't I compile the application despite the current packages? (ob_shash deprecated)

29 Views Asked by At

I have a problem compiling the application. Let's assume the application code is:

import kivy
from kivy.app import App
from kivy.uix.label import Label

class HelloWorldApp(App):
    def build(self):
        return Label(text='Hello World')

if __name__ == '__main__':
    HelloWorldApp().run()

After running the command buildozer android debug deploy run I get an error:

[INFO]:    STDOUT (last 20 lines of 40):
        jnius/jnius.c:59873:43: warning: 'ob_shash' is deprecated [-Wdeprecated-declarations]
            hash2 = ((PyBytesObject*)s2)->ob_shash;
                                          ^
/home/user/Dokumenty/KODZIK/ANDROID/app/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/bytesobject.h:7:5: note: 'ob_shash' has been explicitly marked deprecated here
    Py_DEPRECATED(3.11) Py_hash_t ob_shash;
    ^
/home/user/Dokumenty/KODZIK/ANDROID/app/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
jnius/jnius.c:63496:5: error: incomplete definition of type 'struct _frame'
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jnius/jnius.c:438:62: note: expanded from macro '__Pyx_PyFrame_SetLineNumber'
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
                                                      ~~~~~~~^
/home/user/Dokumenty/KODZIK/ANDROID/app/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pytypedefs.h:22:16: note: forward declaration of 'struct _frame'
typedef struct _frame PyFrameObject;
               ^
3 warnings and 1 error generated.
error: command '/home/user/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1
[WARNING]: ERROR: /home/user/Dokumenty/KODZIK/ANDROID/app/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 failed!

# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=myapp', '--bootstrap=sdl2', '--requirements=python3,kivy', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/home/user/Dokumenty/KODZIK/ANDROID/app/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']

Execution buildozer android debug deploy run -- Wno-deprecated-declarations doesn't help either. Additionally, pip and jnius are up to date.

Do you have any ideas?

0

There are 0 best solutions below