Closed
Description
Versions
- Python: 2.7.13
- OS: Buildozer VM
- Kivy: 1.10
Description
I run into errors when i try to build an apk. The errors occur during the compilation of netifaces. without including netifaces as a requirement in buildozer.spec file the apk build process goes to completion, which confirms that the error is as a result of compling netifaces.
buildozer.spec
Command:
Spec file:
Requirement from buildozer.spec file
requirements = python2,kivy==master,git+https://gitlab.com/kivymd/KivyMD.git,netifaces
Logs
[INFO]: Building netifaces for armeabi-v7a
[INFO]: netifaces apparently isn't already in site-packages
[INFO]: Building compiled components in netifaces
[INFO]: -> directory context /home/kivy/.buildozer/android/platform/build/build/other_builds/netifaces-python2/armeabi-v7a/netifaces
[INFO]: -> running hostpython setup.py build_ext -v
working: error: command 'arm-linux-androideabi-gcc' failed with exit status 1 Exception in thread background thread for pid 8512:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2170, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1929, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 672, in handle_command_exit_code
raise exc
ErrorReturnCode_1:
RAN: /home/kivy/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/hostpython setup.py build_ext -v
STDOUT:
running build_ext
checking for getifaddrs...not found. (cached)
checking for getnameinfo...not found. (cached)
checking for socket IOCTLs...not found. (cached)
checking for optional header files...netpacket/packet.h linux/atm.h. (cached)
checking whether struct sockaddr has a length field...no. (cached)
checking which sockaddr_xxx structs are defined...none! (cached)
checking for routing socket support...no. (cached)
checking for sysctl(CTL_NET...) support...no. (cached)
checking for netlink support...no. (cached)
building 'netifaces' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/kivy/.buildozer/android/platform/build/build/python-installs/touchpadapp/include/python2.7 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/kivy/.buildozer/android/platform/build/build/python-installs/touchpadapp/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/kivy/.buildozer/android/platform/build/build/python-installs/touchpadapp/include/python2.7 -fPIC -DNETIFACES_VERSION=0.10.4 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_ATM_H=1 -I/home/kivy/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Include -I/home/kivy/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o
netifaces.c:185:6: error: #error You need to add code for your platform.
# error You need to add code for your platform.
^
netifaces.c: In function 'gateways':
netifaces.c:1213:22: warning: unused variable 'defaults' [-Wunused-variable]
PyObject *result, *defaults;
^
netifaces.c: At top level:
netifaces.c:316:1: warning: 'string_from_sockaddr' defined but not used [-Wunused-function]
string_from_sockaddr (struct sockaddr *addr,
^
netifaces.c:446:1: warning: 'add_to_family' defined but not used [-Wunused-function]
add_to_family (PyObject *result, int family, PyObject *obj)
^
error: command 'arm-linux-androideabi-gcc' failed with exit status 1
STDERR:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/kivy/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
main()
File "/home/kivy/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
ToolchainCL()
File "/home/kivy/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/kivy/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 149, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/kivy/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "pythonforandroid/build.py", line 573, in build_recipes
File "pythonforandroid/recipe.py", line 843, in build_arch
File "pythonforandroid/recipe.py", line 855, in build_compiled_components
File "pythonforandroid/logger.py", line 175, in shprint
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 720, in next
self.wait()
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 651, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 672, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/kivy/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/hostpython setup.py build_ext -v
STDOUT:
running build_ext
checking for getifaddrs...not found. (cached)
checking for getnameinfo...not found. (cached)
checking for socket IOCTLs...not found. (cached)
checking for optional header files...netpacket/packet.h linux/atm.h. (cached)
checking whether struct sockaddr has a length field...no. (cached)
checking which sockaddr_xxx structs are defined...none! (cached)
checking for routing socket support...no. (cached)
checking for sysctl(CTL_NET...) support...no. (cached)
checking for netlink support...no. (cached)
building 'netifaces' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/kivy/.buildozer/android/platform/build/build/python-installs/touchpadapp/include/python2.7 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/kivy/.buildozer/android/platform/build/build/python-installs/touchpadapp/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/kivy/.buildozer/android/platform/build/build/python-installs/touchpadapp/include/python2.7 -fPIC -DNETIFACES_VERSION=0.10.4 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_ATM_H=1 -I/home/kivy/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Include -I/home/kivy/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o
netifaces.c:185:6: error: #error You need to add code for your platform.
# error You need to add code for your platform.
^
netifaces.c: In function 'gateways':
netifaces.c:1213:22: warning: unused variable 'defaults' [-Wunused-variable]
PyObject *result, *defaults;
^
netifaces.c: At top level:
netifaces.c:316:1: warning: 'string_from_sockaddr' defined but not used [-Wunused-function]
string_from_sockaddr (struct sockaddr *addr,
^
netifaces.c:446:1: warning: 'add_to_family' defined but not used [-Wunused-function]
add_to_family (PyObject *result, int family, PyObject *obj)
^
error: command 'arm-linux-androideabi-gcc' failed with exit status 1
STDERR:
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=touchpadapp --bootstrap=sdl2 --requirements=python2,kivy==master,git+https://gitlab.com/kivymd/KivyMD.git,netifaces --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/kivy/.buildozer/android/platform/build
#
# 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