i want to compile my kivy app into an android apk but get an Error:
:~/kivyapps$ buildozer android debug
# Check configuration tokens
# Ensure build layout
# Create directory .buildozer
# Create directory bin
# Create directory /home/stefan/kivyapps/.buildozer/applibs
# Create directory .buildozer/android/platform
# Create directory .buildozer/android/app
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian »dpkg« Paketmanagement-Programm Version 1.16.12 (i386).
Dies ist freie Software; lesen Sie die GNU General Public License in der
Version 2 oder höher für Kopierbedingungen. Es wird KEINE Haftung übernommen.
# Search for Git git
# -> found at /usr/bin/git
# Search for Cython cython
# -> found at /usr/local/bin/cython
# Search for Java compiler
# -> found at /usr/lib/jvm/java-7-openjdk-i386/bin/javac
# Search for Java keytool
# -> found at /usr/lib/jvm/java-7-openjdk-i386/jre/bin/keytool
# Install platform
# Run 'git clone git://github.com/kivy/python-for-android'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform
Cloning into 'python-for-android'...
# Apache ANT found at /home/stefan/.buildozer/android/platform/apache-ant-1.8.4
# Android SDK found at /home/stefan/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/stefan/.buildozer/android/platform/android-ndk-r9c
# Android packages already installed.
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform/python-for-android
Available modules: android audiostream c_igraph cymunk django docutils ffmpeg gevent greenlet hostpython igraph jpeg kivy libevent libxml2 libxslt lxml msgpack mysql_connector numpy openssl paramiko pil plyer png pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python sdl setuptools sqlalchemy sqlite3 twisted txws wokkel zope
# Remove directory and subdirectory /home/stefan/kivyapps/.buildozer/applibs
# Create directory /home/stefan/kivyapps/.buildozer/applibs
# Compile platform
# Run './distribute.sh -l'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform/python-for-android
Available modules: android audiostream c_igraph cymunk django docutils ffmpeg gevent greenlet hostpython igraph jpeg kivy libevent libxml2 libxslt lxml msgpack mysql_connector numpy openssl paramiko pil plyer png pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python sdl setuptools sqlalchemy sqlite3 twisted txws wokkel zope
# Clean and build python-for-android
# Run './distribute.sh -m "kivy" -d "test"'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform/python-for-android
Check build dependencies for Debian
Check enviromnent
SDK located at /home/stefan/.buildozer/android/platform/android-sdk-21
NDK located at /home/stefan/.buildozer/android/platform/android-ndk-r9c
NDK version is r9c
API level set to 14
Check mandatory tools
Distribution will be located at /home/stefan/kivyapps/.buildozer/android/platform/python- for-android/dist/test
Entering in ARM enviromnent
Unable to find compiler (arm-linux-androideabi-gcc) !!
1. Ensure that SDK/NDK paths are correct
2. Ensure that you've the Android API 14 SDK Platform (via android tool)
# Command failed: ./distribute.sh -m "kivy" -d "test"
I already looked for this error message but could´t find any solution for this problem.
Any tips how to solve this problem?
Im using debian 32bit.
I know that the question is a bit old, but:
export ANDROIDSDK="/path/to/android-sdk-linux"
export ANDROIDNDK="/path/to/android-ndk-rY" #change Y here
export ANDROIDNDKVER=rY #same here
export ANDROIDAPI=X #change X here
export PATH=$PATH:$ANDROIDNDK:$ANDROIDSDK/platform-tools:$ANDROIDSDK/tools
You have to change Y with the ndk version, and X with the API id.
You can add this to your ~/.bashrc.
It solve the problem for me.
Related
Sorry for possible stupid question, but today I spent ~5 hours trying to build simple apk with Python3, Buildozer and Crystax NDK. I used Buildozer VM, downloaded Crystax ndk 10.3.2, created buildozer.spec as follow on github instruction https://github.com/kivy/buildozer . My buildozer.spec:
title = Cyba app
package.name = cyapp
package.domain = ru.longint
source.dir = .
requirements = python3crystax,kivy
android.ndk_path = ~/.buildozer/crystax-ndk
and few others.
When I run buildozer -v android debug to make first compilation (by the instruction on the Buildozer's wiki), I got next logs:
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.18.10 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/kivy/.buildozer/crystax-ndk
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/kivy/Documents/kbs/.buildozer/android/platform/python-for-android
Available modules: android apsw audiostream bidi boost cherrypy c_igraph click cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer ffpyplayer_tito flask freetype gevent greenlet harfbuzz hostpython igraph itsdangerous jinja2 jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto markupsafe midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws werkzeug wokkel zeroconf zope
# Remove directory and subdirectory /home/kivy/Documents/kbs/.buildozer/applibs
# Create directory /home/kivy/Documents/kbs/.buildozer/applibs
# Run 'bash -c "source venv/bin/activate && env"'
# Cwd /home/kivy/Documents/kbs/.buildozer
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_MENU_PREFIX=xfce-
LANG=en_US.UTF-8
GDM_LANG=en_US
DISPLAY=:0.0
ANDROIDAPI=19
GTK_OVERLAY_SCROLLING=0
COLORTERM=truecolor
XDG_VTNR=7
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
VIRTUAL_ENV=/home/kivy/Documents/kbs/.buildozer/venv
MANDATORY_PATH=/usr/share/gconf/xubuntu.mandatory.path
GLADE_CATALOG_PATH=:
XDG_SESSION_ID=c2
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/kivy
USER=kivy
GLADE_MODULE_PATH=:
DESKTOP_SESSION=xubuntu
ANDROIDNDK=/home/kivy/.buildozer/crystax-ndk
DEFAULTS_PATH=/usr/share/gconf/xubuntu.default.path
QT_QPA_PLATFORMTHEME=gtk2
PWD=/home/kivy/Documents/kbs/.buildozer
HOME=/home/kivy
ANDROIDSDK=/home/kivy/.buildozer/android/platform/android-sdk-20
SSH_AGENT_PID=1309
QT_ACCESSIBILITY=1
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop:/usr/share
PACKAGES_PATH=/home/kivy/.buildozer/android/packages
XDG_SESSION_DESKTOP=xubuntu
GLADE_PIXMAP_PATH=:
CLUTTER_BACKEND=x11
VTE_VERSION=4402
SHELL=/bin/bash
TERM=xterm-256color
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CURRENT_DESKTOP=XFCE
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
SHLVL=2
XDG_SEAT=seat0
LANGUAGE=en_US:
ANDROIDNDKVER=r9c
WINDOWID=67112367
GDMSESSION=xubuntu
LOGNAME=kivy
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
XAUTHORITY=/home/kivy/.Xauthority
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
PATH=/home/kivy/Documents/kbs/.buildozer/venv/bin:/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PS1=(venv)
SESSION_MANAGER=local/kivyvm:#/tmp/.ICE-unix/1327,unix/kivyvm:/tmp/.ICE-unix/1327
LESSOPEN=| /usr/bin/lesspipe %s
_=/usr/bin/env
# Install distribute
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python'
# Cwd /home/kivy/Documents/kbs/.buildozer
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:02:10 --:--:-- 0curl: (7) Failed to connect to python-distribute.org port 80: Connection timed out
# Install requirement python3crystax in virtualenv
# Run 'pip install --target=/home/kivy/Documents/kbs/.buildozer/applibs python3crystax'
# Cwd /home/kivy/Documents/kbs/.buildozer
Collecting python3crystax
Could not find a version that satisfies the requirement python3crystax (from versions: )
No matching distribution found for python3crystax
# Command failed: pip install --target=/home/kivy/Documents/kbs/.buildozer/applibs python3crystax
#
# 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
And here's my questions:
1)What is python3crystax literally? Is a pip package, utility, file or what?
2)Must i download python3crystax manually and where i can to download this?
3)What i did wrong?
UPD:
I found this question and tried buildozer -v android_new debug
Got this (log_level in buildozer.spec is 2):
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.18.10 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/kivy/.buildozer/crystax-ndk
# Check application requirements
# Check garden requirements
# Compile platform
# Run 'python -m pythonforandroid.toolchain --color=always --storage-dir=/home/kivy/Documents/kbs/.buildozer/android/platform/build create --dist_name=cyapp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs'
# Cwd /home/kivy/Documents/kbs/.buildozer/android/platform/python-for-android-master
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI
[INFO]: Available Android APIs are (19)
[INFO]: Requested API target 19 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK
[INFO]: Got NDK version from $ANDROIDNDKVER
[WARNING]: NDK version was set as r10.3.2, but checking the NDK dir claims it is 10.3.2.
[WARNING]: The build will try to continue, but it may fail and you should check that your setting is correct.
[WARNING]: If the NDK dir result is correct, you don't need to manually set the NDK ver.
[INFO]: Using Crystax NDK r10.3.2
[INFO]: Found virtualenv at /usr/local/bin/virtualenv
[INFO]: ccache is missing, the build will not be optimized in the future.
[WARNING]: include directory doesn't exist: /home/kivy/.buildozer/crystax-ndk/sysroot/usr/include/arm-linux-androideabi
[INFO]: Found the following toolchain versions: ['4.9', '5', 'clang3.6', 'clang3.7']
[INFO]: Picking the latest gcc toolchain, here 5
[WARNING]: Missing executable: autoconf is not installed
[WARNING]: Missing executable: automake is not installed
[WARNING]: Missing executable: libtoolize is not installed
[ERROR]: python-for-android cannot continue; aborting
# Command failed: python -m pythonforandroid.toolchain --color=always --storage-dir=/home/kivy/Documents/kbs/.buildozer/android/platform/build create --dist_name=cyapp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs
#
# 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
I see some weird string in logs. I really have not this path in Crystax ndk folder.
[WARNING]: include directory doesn't exist: /home/kivy/.buildozer/crystax-ndk/sysroot/usr/include/arm-linux-androideabi
Download and extract the Crystax NDK somewhere e.g. /opt/
Make sure the following lines are in your buildozer.spec file.:
Require python3crystax:
requirements = python3crystax,kivy
Point to the directory where you extracted the crystax-ndk:
android.ndk_path = /opt/crystax-ndk-10.3.2
[Python = 2.7]
I recently started to use kivy (newest version) to develop an app for Android. For this I use buildozer (newest version) to create the apk file. Now everything works fine on my computer even using the python-firebase module. To send data to the Firebase online database. But when I want to use the Python module python-firebase (that is based on the module requests) on my phone the app crashes after it loads for a few seconds.
For now my requirements in the buildozer.spec are plyer and kivy. If I try to add requests to this list, I get the error:
# Install requirement requests in virtualenv
# Run 'pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/Gps/.buildozer/applibs requests'
# Cwd /home/notwaka/Desktop/Gps/.buildozer
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
no such option: --download-cache
# Command failed: pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/Gps/.buildozer/applibs requests
#
# Buildozer failed to execute the last command
Do I need to add requests to the requirements, since it is done in an example in the documentation of using buildozer? What can I do to make python-firebase working on my Android device? I have no knowledge about how to make a recipe and can't find any good documentation about this. Could making a recipe work? Has anyone tried to get Firebase working with Python on Android?
'# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/notwaka/Desktop/try/.buildozer/android/platform/python-for-android
Available modules: android apsw audiostream bidi boost cherrypy c_igraph click cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer ffpyplayer_tito flask freetype gevent greenlet harfbuzz hostpython igraph itsdangerous jinja2 jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto markupsafe midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws werkzeug wokkel zeroconf zope
# Remove directory and subdirectory /home/notwaka/Desktop/try/.buildozer/applibs
# Create directory /home/notwaka/Desktop/try/.buildozer/applibs
# Run 'bash -c "source venv/bin/activate && env"'
# Cwd /home/notwaka/Desktop/try/.buildozer
LC_PAPER=nl_NL.UTF-8
XDG_VTNR=7
LC_ADDRESS=nl_NL.UTF-8
XDG_SESSION_ID=c2
CLUTTER_IM_MODULE=xim
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/notwaka
SELINUX_INIT=YES
LC_MONETARY=nl_NL.UTF-8
GPG_AGENT_INFO=/run/user/1000/keyring-wWFm7x/gpg:0:1
VTE_VERSION=3409
SHELL=/bin/bash
TERM=xterm
LC_NUMERIC=nl_NL.UTF-8
WINDOWID=65011724
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1938
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-wWFm7x
GTK_MODULES=overlay-scrollbar:unity-gtk-module
USER=notwaka
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
LC_TELEPHONE=nl_NL.UTF-8
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/run/user/1000/keyring-wWFm7x/ssh
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
VIRTUAL_ENV=/home/notwaka/Desktop/try/.buildozer/venv
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
PATH=/home/notwaka/Desktop/try/.buildozer/venv/bin:/home/notwaka/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/notwaka/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
DESKTOP_SESSION=ubuntu
QT_IM_MODULE=ibus
ANDROIDAPI=19
QT_QPA_PLATFORMTHEME=appmenu-qt5
LC_IDENTIFICATION=nl_NL.UTF-8
JOB=gnome-session
PWD=/home/notwaka/Desktop/try/.buildozer
XMODIFIERS=#im=ibus
LANG=en_US.UTF-8
GNOME_KEYRING_PID=1936
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
LC_MEASUREMENT=nl_NL.UTF-8
ANDROIDNDK=/home/notwaka/.buildozer/android/platform/android-ndk-r9c
IM_CONFIG_PHASE=1
COMPIZ_CONFIG_PROFILE=ubuntu
PS1=(venv)
GDMSESSION=ubuntu
PACKAGES_PATH=/home/notwaka/.buildozer/android/packages
SESSIONTYPE=gnome-session
HOME=/home/notwaka
SHLVL=2
XDG_SEAT=seat0
LANGUAGE=en_US
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
UPSTART_INSTANCE=
UPSTART_EVENTS=started starting
ANDROIDSDK=/home/notwaka/.buildozer/android/platform/android-sdk-20
LOGNAME=notwaka
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-lqf94SPFU0
QT4_IM_MODULE=xim
LESSOPEN=| /usr/bin/lesspipe %s
ANDROIDNDKVER=r9c
UPSTART_JOB=unity-settings-daemon
INSTANCE=Unity
TEXTDOMAIN=im-config
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=ibus
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=nl_NL.UTF-8
TEXTDOMAINDIR=/usr/share/locale/
LC_NAME=nl_NL.UTF-8
XAUTHORITY=/home/notwaka/.Xauthority
COLORTERM=gnome-terminal
_=/usr/bin/env
# Install distribute
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python'
# Cwd /home/notwaka/Desktop/try/.buildozer
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
# Install requirement pygments in virtualenv
# Run 'pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/try/.buildozer/applibs pygments'
# Cwd /home/notwaka/Desktop/try/.buildozer
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
no such option: --download-cache
# Command failed: pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/try/.buildozer/applibs pygments
#
# 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
'
There is an issue for Firebase working on python Kivy. See https://github.com/ozgur/python-firebase/pull/26
This is because multicore processing is not fully supported on Kivy, which is used by Firebase. This caused the crash on kivy Firebase apps.
I haven't tried the patch yet, but looking at the comments, Zkanda did good. This might be what you're looking for.
Alternatively, you can use json to download data from Firebase.
What I did to use Firebase was to use python's native Requests library to make a json call to Firebase, which they support with https.
import json, requests
url = "https://myfirebaseurl.firebaseio.com/some_database.json"
resp = requests.get(url = url, json = {'create':True})
data = resp.json()
In your buildozer.spec file, under the Requirements, include
requirements = kivy,requests,simplejson,openssl
openssl is to support https, simplejson is for json.
no such option: --download-cache
This reflects a bug in python-for-android that is now fixed. If you make buildozer re-download python-for-android, e.g. by deleting the .buildozer dir in your build directory, it should work.
You can also edit the current downloaded distribute.sh to remove the --download-cache option when calling pip.
I tried the suggested solution when encountering a similar issue with pygments, and it didn't work for me either. I increased log levels and found that pygments was being downloaded to lib64/python on my distro, whereas pip was looking for lib/python.
It appears to be related to this pip issue: https://github.com/pypa/pip/issues/3056
I added a setup.cfg file in the .buildozer folder for my app, containing:
[install]
install-purelib=$base/lib64/python
and my app now installs successfully.
I'm making an apk from python and kivy for the first time so if this is some newbie question sorry.
I want to build app for android from python and kivy scrips using buildozer tool. After few newbie errors like I didn't install javac etc., this error occurred:
Command failed: ./distribute.sh -m "kivy" -d "carlockapp"
Additional info:
OS: Fedora 22 32bit
[agi#localhost CarLockApp]$ buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
/bin/sh: dpkg: command not found
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc22.i386/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc22.i386/jre/bin/keytool
# Install platform
# Apache ANT found at /home/agi/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/agi/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/agi/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/agi/Documents/CarLockApp/.buildozer/android/platform/python-for-android
which: no virtualenv-2.7 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no virtualenv2.7 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no virtualenv2 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no cython2 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
Available modules: android apsw audiostream bidi boost cherrypy c_igraph cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer freetype gevent greenlet harfbuzz hostpython igraph jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws wokkel zeroconf zope
# Application requirements already installed, pass
# Check garden requirements
# Compile platform
# Run './distribute.sh -l'
# Cwd /home/agi/Documents/CarLockApp/.buildozer/android/platform/python-for-android
which: no virtualenv-2.7 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no virtualenv2.7 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no virtualenv2 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no cython2 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
Available modules: android apsw audiostream bidi boost cherrypy c_igraph cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer freetype gevent greenlet harfbuzz hostpython igraph jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws wokkel zeroconf zope
# Clean and build python-for-android
# Remove directory and subdirectory /home/agi/Documents/CarLockApp/.buildozer/android/platform/python-for-android/dist/carlockapp
# Run './distribute.sh -m "kivy" -d "carlockapp"'
# Cwd /home/agi/Documents/CarLockApp/.buildozer/android/platform/python-for-android
which: no virtualenv-2.7 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no virtualenv2.7 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no virtualenv2 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
which: no cython2 in (/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin)
./distribute.sh: line 286: lsb_release: command not found
Check build dependencies for
Avoid check build dependencies, unknow platform
Check environment
SDK located at /home/agi/.buildozer/android/platform/android-sdk-21
NDK located at /home/agi/.buildozer/android/platform/android-ndk-r9c
NDK version is r9c
API level set to 14
Check NDK location
Check mandatory tools
Distribution will be located at /home/agi/Documents/CarLockApp/.buildozer/android/platform/python-for-android/dist/carlockapp
Entering in ARM environment
Compiler found at /home/agi/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
PATH is /home/agi/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/:/home/agi/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/:/home/agi/.buildozer/android/platform/android-ndk-r9c:/home/agi/.buildozer/android/platform/android-sdk-21/tools:/home/agi/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/agi/.local/bin:/home/agi/bin
Leaving ARM environment
Read kivy recipe
Module kivy depend on pygame pyjnius android
Read pygame recipe
Module pygame depend on python sdl
Read pyjnius recipe
Module pyjnius depend on python sdl
Read android recipe
Module android depend on pygame
Read python recipe
Module python depend on hostpython
Read sdl recipe
Module sdl depend on python
Ignored python, already processed
Ignored sdl, already processed
Ignored pygame, already processed
Read hostpython recipe
Ignored python, already processed
Modules changed to hostpython python sdl pygame pyjnius android kivy
Pure-Python modules changed to
Run get packages
Download package for hostpython
Module hostpython already downloaded
Download package for python
Module python already downloaded
Download package for sdl
No package for sdl
Download package for pygame
Module pygame already downloaded
Download package for pyjnius
Module pyjnius already downloaded
Download package for android
No package for android
Download package for kivy
Module kivy already downloaded
Run prebuild
Call prebuild_hostpython
Call prebuild_python
# Command failed: ./distribute.sh -m "kivy" -d "carlockapp"
#
# 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
I am trying to build a very basic Hello World Android application using kivy. Source code:
import kivy
kivy.require('1.8.0') # update with your current version
from kivy.app import App
from kivy.uix.button import Button
class DummyApp(App):
def build(self):
return Button(text="Hello World")
if __name__ == '__main__':
DummyApp().run()
I tried to build the app using Buildozer, using the command (along with this spec file):
buildozer android debug
But instead of building successfully I am getting the error -
fatal error: arm-linux-gnueabi/python2.7/pyconfig.h: No such file or directory
I could find this and similar errors on many forums, but wasn't able to find any fix. The complete error log is as follows (obtained using log_level = 2 in spec file):
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian `dpkg' package management program version 1.17.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool
# Install platform
# Apache ANT found at /home/kedia-abhishek/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kedia-abhishek/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c
# Read available permissions from api-versions.xml
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android
Available modules: android apsw audiostream bidi boost cherrypy c_igraph cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer freetype gevent greenlet harfbuzz hostpython igraph jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws wokkel zeroconf zope
# Application requirements already installed, pass
# Check garden requirements
# Compile platform
# Run './distribute.sh -l'
# Cwd /home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android
Available modules: android apsw audiostream bidi boost cherrypy c_igraph cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer freetype gevent greenlet harfbuzz hostpython igraph jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws wokkel zeroconf zope
# Clean and build python-for-android
# Remove directory and subdirectory /home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/dist/helloworldapp
# Run './distribute.sh -m "kivy" -d "helloworldapp"'
# Cwd /home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android
Check build dependencies for Ubuntu
Packages missing: cython
It might break the compilation, except if you installed thoses packages manually.
Check environment
SDK located at /home/kedia-abhishek/.buildozer/android/platform/android-sdk-21
NDK located at /home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c
NDK version is r9c
API level set to 14
Check NDK location
Check mandatory tools
Distribution will be located at /home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/dist/helloworldapp
Entering in ARM environment
Compiler found at /home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin//arm-linux-androideabi-gcc
PATH is /home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/:/home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/:/home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c:/home/kedia-abhishek/.buildozer/android/platform/android-sdk-21/tools:/home/kedia-abhishek/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Leaving ARM environment
Read kivy recipe
Module kivy depend on pygame pyjnius android
Read pygame recipe
Module pygame depend on python sdl
Read pyjnius recipe
Module pyjnius depend on python sdl
Read android recipe
Module android depend on pygame
Read python recipe
Module python depend on hostpython
Read sdl recipe
Module sdl depend on python
Ignored python, already processed
Ignored sdl, already processed
Ignored pygame, already processed
Read hostpython recipe
Ignored python, already processed
Modules changed to hostpython python sdl pygame pyjnius android kivy
Pure-Python modules changed to
Run get packages
Download package for hostpython
Module hostpython already downloaded
Download package for python
Module python already downloaded
Download package for sdl
No package for sdl
Download package for pygame
Module pygame already downloaded
Download package for pyjnius
Module pyjnius already downloaded
Download package for android
No package for android
Download package for kivy
Module kivy already downloaded
Run prebuild
Call prebuild_hostpython
Call prebuild_python
Call prebuild_sdl
Call prebuild_pygame
Call prebuild_pyjnius
Call prebuild_android
Call prebuild_kivy
Run build
Skipped build_hostpython
Skipped build_python
Skipped build_sdl
Call build_pygame
Entering in ARM environment
Compiler found at /home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin//arm-linux-androideabi-gcc
running install
running build
running build_py
running build_ext
building 'pygame.imageext' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/kedia-abhishek/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -I/home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/src/jni/png -I/home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/src/jni/jpeg -I/home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/src/jni/sdl/include -I/home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/src/jni/sdl_mixer -I/home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/src/jni/sdl_ttf -I/home/kedia-abhishek/Desktop/buildozer/.buildozer/android/platform/python-for-android/src/jni/sdl_image -fPIC -D_REENTRANT -I/usr/include/python2.7 -c src/imageext.c -o build/temp.linux-x86_64-2.7/src/imageext.o
In file included from /usr/include/python2.7/Python.h:8:0,
from src/pygame.h:75,
from src/imageext.c:47:
/usr/include/python2.7/pyconfig.h:15:52: fatal error: arm-linux-gnueabi/python2.7/pyconfig.h: No such file or directory
# include <arm-linux-gnueabi/python2.7/pyconfig.h>
^
compilation terminated.
error: command 'arm-linux-androideabi-gcc' failed with exit status 1
# Command failed: ./distribute.sh -m "kivy" -d "helloworldapp"
#
# 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
NOTE:
I am running Ubuntu 14.04.3 LTS.
I followed this tutorial and installed all the necessary dependencies as mentioned there.
Many forums suggested that I install "python-dev" or "python2.7-dev". Done that, but of no help.
This is probably not the best answer, but till a knowledgable person gives a better answer, I am keeping this as a placeholder.
You may want to try enabling multiarch, install python-dev and python2.7-dev for the architecture "arm-linux-gnueabi"
I'm trying to develop an android app with kivy+scrapy(or mechanize) using buildozer.
When I add scrapy/mechanize in required field in buildozer.spec file and run buildozer android debug, pip install fails with the error below.
The android sdk and ndk looks like they've been installed successfully with buildozer, and I also tried installing gcc-arm-linux-androideabi, but didn't help.
Is there anything else I can do to fix this issue?
kivy#kivy-VirtualBox:~/kiva$ buildozer -v android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian `dpkg' package management program version 1.17.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool
# Install platform
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/kivy/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/kivy/kiva/.buildozer/android/platform/python-for-android
Available modules: android apsw audiostream bidi boost cherrypy c_igraph cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer freetype gevent greenlet harfbuzz hostpython igraph jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws wokkel zeroconf zope
# Remove directory and subdirectory /home/kivy/kiva/.buildozer/applibs
# Create directory /home/kivy/kiva/.buildozer/applibs
# Run 'bash -c "source venv/bin/activate && env"'
# Cwd /home/kivy/kiva/.buildozer
LC_PAPER=fr_FR.UTF-8
XDG_VTNR=7
LC_ADDRESS=fr_FR.UTF-8
XDG_SESSION_ID=c1
CLUTTER_IM_MODULE=xim
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/kivy
SELINUX_INIT=YES
SAL_USE_VCLPLUGIN=gtk
LC_MONETARY=fr_FR.UTF-8
SESSION=Lubuntu
GPG_AGENT_INFO=/run/user/1000/keyring-r63Pyx/gpg:0:1
SHELL=/bin/bash
XDG_MENU_PREFIX=lxde-
TERM=screen
LC_NUMERIC=fr_FR.UTF-8
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1196
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-r63Pyx
USER=kivy
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
LC_TELEPHONE=fr_FR.UTF-8
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\
:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
:do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
:le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
:li#42:co#186:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
:cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\
:im=\E[4h:ei=\E[4l:mi:IC=\E[%d#:ks=\E[?1h\E=:\
:ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
:ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\
:se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\
:Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
:vb=\Eg:G0:as=\E(0:ae=\E(B:\
:ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\
:po=\E[5i:pf=\E[4i:Z0=\E[?3h:Z1=\E[?3l:Km=\E[M:\
:k0=\E[10~:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:\
:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:\
:F1=\E[23~:F2=\E[24~:F3=\E[1;2P:F4=\E[1;2Q:F5=\E[1;2R:\
:F6=\E[1;2S:F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:\
:FA=\E[19;2~:kb=:K2=\EOE:kB=\E[Z:kF=\E[1;2B:kR=\E[1;2A:\
:*4=\E[3;2~:*7=\E[1;2F:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:\
:%c=\E[6;2~:%e=\E[5;2~:%i=\E[1;2C:kh=\E[1~:#1=\E[1~:\
:kH=\E[4~:#7=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:\
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:km:
SSH_AUTH_SOCK=/run/user/1000/keyring-r63Pyx/ssh
DEFAULTS_PATH=/usr/share/gconf/Lubuntu.default.path
VIRTUAL_ENV=/home/kivy/kiva/.buildozer/venv
XDG_CONFIG_DIRS=/etc/xdg/lubuntu:/etc/xdg/xdg-Lubuntu:/usr/share/upstart/xdg:/etc/xdg
PATH=/home/kivy/kiva/.buildozer/venv/bin:/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/kivy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
DESKTOP_SESSION=Lubuntu
STY=25597.kivy
QT_IM_MODULE=xim
ANDROIDAPI=14
LC_IDENTIFICATION=fr_FR.UTF-8
JOB=dbus
PWD=/home/kivy/kiva/.buildozer
XMODIFIERS=#im=ibus
LANG=en_US.UTF-8
GNOME_KEYRING_PID=1405
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/Lubuntu.mandatory.path
LC_MEASUREMENT=fr_FR.UTF-8
ANDROIDNDK=/home/kivy/.buildozer/android/platform/android-ndk-r9c
IM_CONFIG_PHASE=1
PS1=(venv)
GDMSESSION=Lubuntu
_LXSESSION_PID=1444
PACKAGES_PATH=/home/kivy/.buildozer/android/packages
SESSIONTYPE=lxsession
HOME=/home/kivy
SHLVL=3
XDG_SEAT=seat0
XDG_CONFIG_HOME=/home/kivy/.config
LANGUAGE=en_US
UPSTART_INSTANCE=
UPSTART_EVENTS=started xsession
ANDROIDSDK=/home/kivy/.buildozer/android/platform/android-sdk-21
LOGNAME=kivy
WINDOW=0
XDG_DATA_DIRS=/etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/share/Lubuntu:/usr/local/share/:/usr/share/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-6RdFOeFlCI
QT4_IM_MODULE=xim
LESSOPEN=| /usr/bin/lesspipe %s
ANDROIDNDKVER=r9c
UPSTART_JOB=lxsession
INSTANCE=
TEXTDOMAIN=im-config
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=LXDE
GTK_IM_MODULE=xim
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=fr_FR.UTF-8
TEXTDOMAINDIR=/usr/share/locale/
LC_NAME=fr_FR.UTF-8
XAUTHORITY=/home/kivy/.Xauthority
_=/usr/bin/env
# Install distribute
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python'
# Cwd /home/kivy/kiva/.buildozer
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
# Install requirement mechanize in virtualenv
# Run 'pip install --download-cache=/home/kivy/.buildozer/cache --target=/home/kivy/kiva/.buildozer/applibs mechanize'
# Cwd /home/kivy/kiva/.buildozer
Downloading/unpacking mechanize
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fm%2Fmechanize%2Fmechanize-0.2.5.tar.gz
Running setup.py (path:/home/kivy/kiva/.buildozer/venv/build/mechanize/setup.py) egg_info for package mechanize
Installing collected packages: mechanize
Running setup.py install for mechanize
Successfully installed mechanize
Cleaning up...
# Install distribute
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python'
# Cwd /home/kivy/kiva/.buildozer
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
# Install requirement pyOpenSSL in virtualenv
# Run 'pip install --download-cache=/home/kivy/.buildozer/cache --target=/home/kivy/kiva/.buildozer/applibs pyOpenSSL'
# Cwd /home/kivy/kiva/.buildozer
Downloading/unpacking pyOpenSSL
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fpy2.py3%2Fp%2FpyOpenSSL%2FpyOpenSSL-0.15.1-py2.py3-none-any.whl
Downloading/unpacking six>=1.5.2 (from pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F3.3%2Fs%2Fsix%2Fsix-1.9.0-py2.py3-none-any.whl
Downloading/unpacking cryptography>=0.7 (from pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fc%2Fcryptography%2Fcryptography-0.9.3.tar.gz
Running setup.py (path:/home/kivy/kiva/.buildozer/venv/build/cryptography/setup.py) egg_info for package cryptography
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
Downloading/unpacking idna (from cryptography>=0.7->pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F2.7%2Fi%2Fidna%2Fidna-2.0-py2.py3-none-any.whl
Downloading/unpacking pyasn1 (from cryptography>=0.7->pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fp%2Fpyasn1%2Fpyasn1-0.1.8.tar.gz
Running setup.py (path:/home/kivy/kiva/.buildozer/venv/build/pyasn1/setup.py) egg_info for package pyasn1
Downloading/unpacking setuptools (from cryptography>=0.7->pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F3.4%2Fs%2Fsetuptools%2Fsetuptools-18.1-py2.py3-none-any.whl
Downloading/unpacking enum34 (from cryptography>=0.7->pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fe%2Fenum34%2Fenum34-1.0.4.tar.gz
Running setup.py (path:/home/kivy/kiva/.buildozer/venv/build/enum34/setup.py) egg_info for package enum34
Downloading/unpacking ipaddress (from cryptography>=0.7->pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F2.7%2Fi%2Fipaddress%2Fipaddress-1.0.14-py27-none-any.whl
Downloading/unpacking cffi>=0.8 (from cryptography>=0.7->pyOpenSSL)
Using download cache from /home/kivy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fc%2Fcffi%2Fcffi-1.1.2.tar.gz
Running setup.py (path:/home/kivy/kiva/.buildozer/venv/build/cffi/setup.py) egg_info for package cffi
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
Complete output from command python setup.py egg_info:
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/kivy/kiva/.buildozer/venv/build/cffi
Storing debug log for failure in /tmp/tmpdq6xPq
# Command failed: pip install --download-cache=/home/kivy/.buildozer/cache --target=/home/kivy/kiva/.buildozer/applibs pyOpenSSL
#
# 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
Here's a recipe that I added for cffi. cffi does get compiled when I add requirements=cffi,kivy but when I add the requirements=scrapy,kivy the build fails with the error above. I added logging in the recipe.sh for cffi, but the log doesn't show up, so I'm assuming that recipe is not being executed at all.
I also noticed that cffi is built in virtualenv. Could this be relevant?
#!/bin/bash
VERSION_cffi=${VERSION_cffi:-1.1.2}
DEPS_cffi=(python setuptools)
URL_cffi=http://pypi.python.org/packages/source/c/cffi/cffi-$VERSION_cffi.tar.gz
MD5_cffi=
BUILD_cffi=$BUILD_PATH/cffi/$(get_directory $URL_cffi)
RECIPE_cffi=$RECIPES_PATH/cffi
function prebuild_cffi() {
true
}
function build_cffi() {
push_arm
cd $BUILD_python/Modules/_ctypes/libffi/
try ./configure --host=arm
try make
cd $BUILD_cffi
#export CC="$CC -I$BUILD_python/build/temp.linux-x86_64-2.7/libffi/include/"
export PYTHONPATH="$BUILD_hostpython/Lib/site-packages/:$BUILD_hostpython/build/lib.linux-x86_64-2.7/"
try $HOSTPYTHON setup.py build_ext -v -L$BUILD_python/Modules/_ctypes/libffi/.libs/ -I$BUILD_python/build/temp.linux-x86_64-2.7/libffi/include/
try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages
pop_arm
}
function postbuild_cffi() {
true
}