[INFO]: -> directory context /home/mcroni/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/android-build
[WARNING]: Doing some hacky stuff to link properly
[INFO]: -> running cp /home/mcroni/.buildozer/android/platform/android-ndk-r17c/platforms...(and 45 more)
[INFO]: -> running cp /home/mcroni/.buildozer/android/platform/android-ndk-r17c/platforms...(and 43 more)
[WARNING]: lld not found, linking without it. Consider installing lld if linker errors occur.
[INFO]: Activating flags for sqlite3
[INFO]: Activating flags for libffi
[INFO]: Activating flags for openssl
[INFO]: <- directory context /home/mcroni/.buildozer/android/platform/python-for-android
[INFO]: Building sdl2 for armeabi-v7a
[INFO]: -> directory context /home/mcroni/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni
[INFO]: -> running ndk-build V=1
[INFO]: <- directory context /home/mcroni/.buildozer/android/platform/python-for-android
[INFO]: Building six for armeabi-v7a
[INFO]: Python package already exists in site-packages
[INFO]: six said it is already built, skipping
[INFO]: Building pyjnius for armeabi-v7a
[INFO]: jnius apparently isn't already in site-packages
[INFO]: Cythonizing anything necessary in pyjnius
[INFO]: -> directory context /home/mcroni/.buildozer/android/platform/build/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]: -> running python -c import sys; print(sys.path)
[INFO]: Trying first build of pyjnius to get cython files: this is expected to fail
[INFO]: -> running python setup.py build_ext -v
Exception in thread background thread for pid 26589:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py build_ext -v
STDOUT:
/home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build_ext
building 'jnius' extension
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot -I/home/mcroni/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.7 -DNDEBUG -g -fwrapv -O3 -Wall -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot -I/home/mcroni/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/mcroni/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Include -fPIC -I/home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.7/jnius/jnius.o
jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_convert_jstring_to_python':
jnius/jnius.c:9141:19: warning: assignment discards 'const' qualifier from pointer target type
__pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL);
^
jnius/jnius.c: In function '__pyx_pf_5jnius_5jnius_12MetaJavaBase___instancecheck__':
jnius/jnius.c:16549:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
__pyx_t_9 = ((PyObject *)(__pyx_v_j_env[0])->CallLongMethod(__pyx_v_j_env, __pyx_v_obj, __pyx_v_meth));
^
jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_py_invoke0':
jnius/jnius.c:30683:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
__pyx_t_2 = ((PyObject *)((void *)__pyx_v_jptr));
^
jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_create_proxy_instance':
jnius/jnius.c:31746:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
__pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(((PY_LONG_LONG)((void *)__pyx_v_py_obj))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
^
jnius/jnius.c: In function '__Pyx_ExceptionSave':
jnius/jnius.c:48071:19: error: 'PyThreadState' has no member named 'exc_type'
*type = tstate->exc_type;
^
jnius/jnius.c:48072:20: error: 'PyThreadState' has no member named 'exc_value'
*value = tstate->exc_value;
^
jnius/jnius.c:48073:17: error: 'PyThreadState' has no member named 'exc_traceback'
*tb = tstate->exc_traceback;
^
jnius/jnius.c: In function '__Pyx_ExceptionReset':
jnius/jnius.c:48085:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
jnius/jnius.c:48086:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
jnius/jnius.c:48087:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
jnius/jnius.c:48088:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = type;
^
jnius/jnius.c:48089:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = value;
^
jnius/jnius.c:48090:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = tb;
^
jnius/jnius.c: In function '__Pyx_GetException':
jnius/jnius.c:48146:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
jnius/jnius.c:48147:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
jnius/jnius.c:48148:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
jnius/jnius.c:48149:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = local_type;
^
jnius/jnius.c:48150:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = local_value;
^
jnius/jnius.c:48151:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = local_tb;
^
jnius/jnius.c: In function '__Pyx_ExceptionSwap':
jnius/jnius.c:48173:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
jnius/jnius.c:48174:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
jnius/jnius.c:48175:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
jnius/jnius.c:48176:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = *type;
^
jnius/jnius.c:48177:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = *value;
^
jnius/jnius.c:48178:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = *tb;
^
error: command '/usr/bin/ccache' failed with exit status 1
STDERR:
[INFO]: pyjnius first build failed (as expected)
[INFO]: Running cython where appropriate
[INFO]: Cythonize jnius/jnius.pyx
[INFO]: -> running cython ./jnius/jnius.pyx
[INFO]: -> running python setup.py build_ext -v
Exception in thread background thread for pid 26608:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py build_ext -v
STDOUT:
/home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build_ext
building 'jnius' extension
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot -I/home/mcroni/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.7 -DNDEBUG -g -fwrapv -O3 -Wall -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/mcroni/.buildozer/android/platform/android-ndk-r17c/sysroot -I/home/mcroni/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/mcroni/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Include -fPIC -I/home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.7/jnius/jnius.o
jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_convert_jstring_to_python':
jnius/jnius.c:9141:19: warning: assignment discards 'const' qualifier from pointer target type
__pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL);
^
jnius/jnius.c: In function '__pyx_pf_5jnius_5jnius_12MetaJavaBase___instancecheck__':
jnius/jnius.c:16549:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
__pyx_t_9 = ((PyObject *)(__pyx_v_j_env[0])->CallLongMethod(__pyx_v_j_env, __pyx_v_obj, __pyx_v_meth));
^
jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_py_invoke0':
jnius/jnius.c:30683:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
__pyx_t_2 = ((PyObject *)((void *)__pyx_v_jptr));
^
jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_create_proxy_instance':
jnius/jnius.c:31746:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
__pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(((PY_LONG_LONG)((void *)__pyx_v_py_obj))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
^
jnius/jnius.c: In function '__Pyx_ExceptionSave':
jnius/jnius.c:48071:19: error: 'PyThreadState' has no member named 'exc_type'
*type = tstate->exc_type;
^
jnius/jnius.c:48072:20: error: 'PyThreadState' has no member named 'exc_value'
*value = tstate->exc_value;
^
jnius/jnius.c:48073:17: error: 'PyThreadState' has no member named 'exc_traceback'
*tb = tstate->exc_traceback;
^
jnius/jnius.c: In function '__Pyx_ExceptionReset':
jnius/jnius.c:48085:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
jnius/jnius.c:48086:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
jnius/jnius.c:48087:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
jnius/jnius.c:48088:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = type;
^
jnius/jnius.c:48089:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = value;
^
jnius/jnius.c:48090:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = tb;
^
jnius/jnius.c: In function '__Pyx_GetException':
jnius/jnius.c:48146:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
jnius/jnius.c:48147:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
jnius/jnius.c:48148:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
jnius/jnius.c:48149:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = local_type;
^
jnius/jnius.c:48150:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = local_value;
^
jnius/jnius.c:48151:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = local_tb;
^
jnius/jnius.c: In function '__Pyx_ExceptionSwap':
jnius/jnius.c:48173:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
jnius/jnius.c:48174:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
jnius/jnius.c:48175:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
jnius/jnius.c:48176:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = *type;
^
jnius/jnius.c:48177:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = *value;
^
jnius/jnius.c:48178:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = *tb;
^
error: command '/usr/bin/ccache' failed with exit status 1
STDERR:
[INFO]: STDOUT (last 20 lines of 89):
jnius/jnius.c: In function '__Pyx_ExceptionSwap':
jnius/jnius.c:48173:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
jnius/jnius.c:48174:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
jnius/jnius.c:48175:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
jnius/jnius.c:48176:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = *type;
^
jnius/jnius.c:48177:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = *value;
^
jnius/jnius.c:48178:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = *tb;
^
error: command '/usr/bin/ccache' failed with exit status 1
[INFO]: STDERR:
[INFO]: COMMAND:
cd /home/mcroni/.buildozer/android/platform/build/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21/pyjnius && /home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py build_ext -v
[WARNING]: ERROR: /home/mcroni/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python failed!
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/mcroni/.buildozer/android/platform/build" --ndk-api=21
I've got the same. I've tried to install llvm ([WARNING]: lld not found, linking without it. Consider installing lld if linker errors occur.) and this error is solved. However, I don't know what [WARNING]: Doing some hacky stuff to link properly is about. What library I need to install to solve it?
wasnt able to solve the issue
I solved same problem with ‘pip install --ignore--installed CPython’
you probably meant cython not cpython
yep 'pip install --ignore-installed cython' did the trick
I ran into the same problem