Error adding ffpyplayer to buildozer.spec

265 views
Skip to first unread message

Felipe Viera

unread,
Jun 26, 2020, 3:22:17 PM6/26/20
to Kivy users support
Hi ):
I get error when adding ffpyplayer to buildozer.spec


main.py:

from kivy.app import App
from kivy.lang.builder import Builder


KV = """
VideoPlayer:
source: "files/video.mp4"
"""


class Test(App):
def build(self):
return Builder.load_string(KV)


Test().run()

buildozer.spec:

[app]
title = Video example
package.name = video_example
package.domain = org.test
source.dir = .
source.include_exts = py, png, jpg, kv, atlas, mp4
version = 0.1
requirements = python3, kivy, ffpyplayer
orientation = all
osx.python_version = 3
osx.kivy_version = 1.11.1
fullscreen = 1
android.presplash_color = #000000
android.api = 29
android.minapi = 21
android.sdk = 24
android.ndk = 19b
android.wakelock = True
android.arch = armeabi-v7a
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0
[buildozer]
log_level = 2
warn_on_root = 1

ERROR:

Exception in thread background thread for pid 52263:                                                                                                                                                                                                                                                                   
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/felipe/Library/Python/3.7/lib/python/site-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/Users/felipe/Library/Python/3.7/lib/python/site-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/Users/felipe/Library/Python/3.7/lib/python/site-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/Users/felipe/Library/Python/3.7/lib/python/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-parser=aac,ac3,h261,h264,mpegaudio,mpeg4video,mpegvideo,vc1 --enable-decoder=aac,h264,mpeg4,mpegvideo --enable-muxer=h264,mov,mp4,mpeg2video --enable-demuxer=aac,h264,m4v,mov,mpegvideo,vc1 --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls --enable-small --enable-hwaccels --enable-gpl --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=arm-linux-androideabi-strip --sysroot=/Users/felipe/.buildozer/android/platform/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg

  STDOUT:
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
armv7a-linux-androideabi21-clang is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpe...@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.


  STDERR:


Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module>
    main()
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__
    getattr(self, command)(args)
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 216, in build_dist_from_args
    args, "ignore_setup_py", False
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
    recipe.build_arch(arch)
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/ffmpeg/__init__.py", line 135, in build_arch
    shprint(configure, *flags, _env=env)
  File "/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/Users/felipe/Library/Python/3.7/lib/python/site-packages/sh.py", line 863, in next
    self.wait()
  File "/Users/felipe/Library/Python/3.7/lib/python/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/felipe/Library/Python/3.7/lib/python/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-parser=aac,ac3,h261,h264,mpegaudio,mpeg4video,mpegvideo,vc1 --enable-decoder=aac,h264,mpeg4,mpegvideo --enable-muxer=h264,mov,mp4,mpeg2video --enable-demuxer=aac,h264,m4v,mov,mpegvideo,vc1 --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls --enable-small --enable-hwaccels --enable-gpl --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=arm-linux-androideabi-strip --sysroot=/Users/felipe/.buildozer/android/platform/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg

  STDOUT:
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
armv7a-linux-androideabi21-clang is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpe...@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.


  STDERR:

# Command failed: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -m pythonforandroid.toolchain create --dist_name=video_example --bootstrap=sdl2 --requirements=python3,kivy,ffpyplayer --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/felipe/Documents/MyProject/TESTE/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     TMPDIR = '/var/folders/0g/6d4g88bd7qd6xf0ksbqt070m0000gn/T/'
#     Apple_PubSub_Socket_Render = '/private/tmp/com.apple.launchd.UFtgFercfY/Render'
#     USER = 'felipe'
#     SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.a31apRy4L8/Listeners'
#     __CF_USER_TEXT_ENCODING = '0x1F5:0x0:0x47'
#     VIRTUAL_ENV = '/Users/felipe/Documents/MyProject/venv'
#     PATH = '/Users/felipe/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/felipe/Documents/MyProject/venv/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin'
#     TERMINAL_EMULATOR = 'JetBrains-JediTerm'
#     PWD = '/Users/felipe/Documents/MyProject/TESTE'
#     XPC_FLAGS = '0x0'
#     PS1 = '(venv) \\h:\\W \\u\\$ '
#     XPC_SERVICE_NAME = '0'
#     SHLVL = '1'
#     HOME = '/Users/felipe'
#     LOGNAME = 'felipe'
#     LC_CTYPE = 'pt_BR.UTF-8'
#     OLDPWD = '/Users/felipe/Documents/MyProject'
#     _ = '/Library/Frameworks/Python.framework/Versions/3.7/bin/buildozer'
#     __PYVENV_LAUNCHER__ = '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7'
#     PACKAGES_PATH = '/Users/felipe/.buildozer/android/packages'
#     ANDROIDSDK = '/Users/felipe/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/Users/felipe/.buildozer/android/platform/android-ndk-r19b'
#     ANDROIDAPI = '29'
#     ANDROIDMINAPI = '21'
# 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

Robert Flatt

unread,
Jun 26, 2020, 4:55:50 PM6/26/20
to Kivy users support
Looks like the issue is the Mac terminal configuration.
The $TERM environment variable is not set

Felipe Viera

unread,
Jun 26, 2020, 8:26:24 PM6/26/20
to Kivy users support
Robert Flatt eu uso a variável TERM=xterm-256color
Mas ainda recebo erro, você sabe como posso altera-la?

Robert Flatt

unread,
Jun 26, 2020, 8:56:39 PM6/26/20
to Kivy users support
Sorry, I'm not a Mac user.
But as understand your message $TERM is set, and if I had looked I would have seen this below: #     TERM = 'xterm-256color'
My comment was not useful.

ZenCODE

unread,
Jun 27, 2020, 5:05:12 AM6/27/20
to Kivy users support
It looks that variable is not set. Perhaps try echoing it out to the terminal to confirm? And does it work if you remove the ffpyplayer requirement?
Message has been deleted

Felipe Viera

unread,
Jun 27, 2020, 11:15:27 AM6/27/20
to Kivy users support
@ZenCODE: Sim, o bulldozer funciona se eu remover o ffpyplayer, mas ao adicionar ffpyplayer e também FFmpeg, ele retorna o mesmo erro :(

Talvez isso seja importante:

Felipes-iMac:~ felipe$ printenv
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/0g/6d4g88bd7qd6xf0ksbqt070m0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.SFTO1CoSCx/Render
TERM_PROGRAM_VERSION=404.1
TERM_SESSION_ID=B3958F76-4F31-46C6-8B7A-1CCA771090AA
USER=felipe
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.MtpUWgDgHP/Listeners
PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/felipe
LANG=pt_BR.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/felipe
LOGNAME=felipe
_=/usr/bin/printenv



Pode ser minha versão java?

Felipes-iMac:~ felipe$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)


Eu atualizei meu buildozer e não funcionou, eu removo tudo por completo, mas não funciona...



Talvez seja importante mostrar isso -->

Felipes-iMac:~ felipe$ pip3 freeze
appdirs==1.4.3
attrs==19.3.0
autoconf==0.4.0
Babel==2.8.0
bandit==1.6.2
black==19.10b0
bleach==3.1.4
bumpversion==0.5.3
certifi==2020.4.5.1
chardet==3.0.4
click==7.1.1
cmake==3.17.1
colorama==0.4.3
coverage==5.0.4
coveralls==2.0.0
Cython==0.29.20
developer-tools==1.0.7
distlib==0.3.0
doc8==0.8.0
docopt==0.6.2
docutils==0.16
entrypoints==0.3
filelock==3.0.12
flake8==3.7.9
flake8-2020==1.6.0
flake8-bandit==2.1.2
flake8-broken-line==0.2.0
flake8-bugbear==20.1.4
flake8-builtins==1.5.2
flake8-comprehensions==3.2.2
flake8-debugger==3.2.1
flake8-fixme==1.1.1
flake8-isort==2.9.1
flake8-logging-format==0.6.0
flake8-mutable==1.2.0
flake8-polyfill==1.0.2
flake8-variables-names==0.0.3
gitdb==4.0.4
GitPython==3.1.1
idna==2.9
imagesize==1.2.0
importlib-metadata==1.5.0
isort==4.3.21
Jinja2==2.11.1
Kivy==1.11.1
Kivy-Garden==0.1.4
kivymd==0.104.0
libtools==0.3.3
MarkupSafe==1.1.1
mccabe==0.6.1
packaging==20.3
pathspec==0.8.0
pbr==5.4.5
pep517==0.6.0
pep8-naming==0.10.0
pexpect==4.8.0
Pillow==7.1.1
ptyprocess==0.6.0
pycodestyle==2.5.0
pyflakes==2.1.1
Pygments==2.6.1
pyparsing==2.4.7
pytoml==0.1.21
pytz==2019.3
PyYAML==5.3.1
regex==2020.4.4
requests==2.23.0
restructuredtext-lint==1.3.0
sh==1.12.14
six==1.14.0
smmap==3.0.2
stevedore==1.32.0
testfixtures==6.14.0
toml==0.10.0
typed-ast==1.4.1
urllib3==1.25.9
virtualenv==16.7.10
webencodings==0.5.1
zipp==3.1.0

Desculpem minha ignorância, mas eu não faço a mínima ideia do porque não consigo compilar apk com ffpyplayer :(
Reply all
Reply to author
Forward
0 new messages