Problems with download of openssl (buildozer)

191 views
Skip to first unread message

Leonardo Sales Duarte

unread,
Mar 31, 2020, 4:23:06 PM3/31/20
to Kivy users support
See the message on the log:



[INFO]:    Downloading openssl
[INFO]:    -> running mkdir -p /home/leonardo/e/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> directory context /home/leonardo/e/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> running basename https://www.openssl.org/source/openssl-1.1.1.tar.gz
[INFO]:    -> running rm -f .mark-openssl-1.1.1.tar.gz                                                                                                                                          
[INFO]:    Downloading openssl from https://www.openssl.org/source/openssl-1.1.1.tar.gz
Traceback (most recent call last):
 File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
   "__main__", mod_spec)
 File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code




I realize that the download has not completed.
After the error, a 0-byte file is inserted into the folder.
Until yesterday I did not face this problem, now it appeared. Does anyone know what solution ??

Robert Flatt

unread,
Mar 31, 2020, 4:54:06 PM3/31/20
to Kivy users support
Try deleting project/.buildozer
Also if you have not done so, set log_level=2

Leonardo Sales Duarte

unread,
Mar 31, 2020, 4:57:59 PM3/31/20
to Kivy users support
I can not anymore.
hahah
I went to uninstall the buildozer.
and now, see the message:

leonardo @ linux-eu06: // home / leonardo / edata> buildozer init
bash: / usr / bin / buildozer: No such file or directory

I have installed the buildozer again, but this message continues.

:(

Any way to erase everything from the buildozer and try to restart this battle from scratch?

Leonardo Sales Duarte

unread,
Mar 31, 2020, 6:21:54 PM3/31/20
to Kivy users support
Also if you have not done so, set log_level=2
It was already like that.

Try deleting project/.buildozer
I deleted it.

The problem happens in Downloading recipes 
This cases works: hostpython3, libffi
This case is not working. It is not finished: openssl

.....................


[INFO]:    # Downloading recipes  
[INFO]:    Downloading hostpython3
[INFO]:    -> running mkdir -p /home/leonardo/edata/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]:    -> directory context /home/leonardo/edata/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]:    -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]:    -> running rm -f .mark-Python-3.7.1.tgz                                                                                                                                              
[INFO]:    Downloading hostpython3 from https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]:    -> running touch .mark-Python-3.7.1.tgz
[INFO]:    <- directory context /home/leonardo/edata/.buildozer/android/platform/python-for-android
[INFO]:    Downloading libffi
[INFO]:    -> running mkdir -p /home/leonardo/edata/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]:    -> directory context /home/leonardo/edata/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]:    -> running basename https://github.com/libffi/libffi/archive/8fa8837.tar.gz
[INFO]:    -> running rm -f .mark-8fa8837.tar.gz                                                                                                                                                
[INFO]:    Downloading libffi from https://github.com/libffi/libffi/archive/8fa8837.tar.gz
[INFO]:    -> running touch .mark-8fa8837.tar.gz
[INFO]:    <- directory context /home/leonardo/edata/.buildozer/android/platform/python-for-android
[INFO]:    Downloading openssl
[INFO]:    -> running mkdir -p /home/leonardo/edata/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> directory context /home/leonardo/edata/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> running basename https://www.openssl.org/source/openssl-1.1.1.tar.gz
[INFO]:    -> running rm -f .mark-openssl-1.1.1.tar.gz                                                                                                                                          
[INFO]:    Downloading openssl from https://www.openssl.org/source/openssl-1.1.1.tar.gz
Traceback (most recent call last):
 File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
   "__main__", mod_spec)
 File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
   exec(code, run_globals)
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1196, in <module>
   main()
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
   ToolchainCL()
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 671, in __init__
   getattr(self, args.subparser_name.replace('-', '_'))(args)
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 155, in wrapper_func
   build_dist_from_args(ctx, dist, args)
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 209, in build_dist_from_args
   args, "ignore_setup_py", False
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 558, in build_recipes
   recipe.download_if_necessary()
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 356, in download_if_necessary
   self.download()
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 402, in download
   self.download_file(self.versioned_url, filename)
 File "/home/leonardo/edata/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 217, in download_file
   urlretrieve(url, target, report_hook)
 File "/usr/lib64/python3.6/urllib/request.py", line 1819, in retrieve
   block = fp.read(bs)
 File "/usr/lib64/python3.6/tempfile.py", line 485, in func_wrapper
   return func(*args, **kwargs)
ValueError: read of closed file
# 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-d
ir="/home/leonardo/edata/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21                                                                                                             
# ENVIRONMENT:
#     GS_LIB = '/home/leonardo/.fonts'
#     KDE_FULL_SESSION = 'true'
#     LS_COLORS = 'no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32
:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.t
z2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp=01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg=01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc
x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.tga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*
.au=00;32:*.flac=00;32:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.wma=00;32:*.wv=00;32:'                                                              
#     HOSTTYPE = 'x86_64'
#     XAUTHLOCALHOSTNAME = 'linux-eu06'
#     LESSCLOSE = 'lessclose.sh %s %s'
#     XKEYSYMDB = '/usr/X11R6/lib/X11/XKeysymDB'
#     LANG = 'pt_PT.UTF-8'
#     WINDOWMANAGER = '/usr/bin/startkde'
#     LESS = '-M -I -R'
#     PROFILEHOME = ''
#     DISPLAY = ':0'
#     JAVA_ROOT = '/usr/lib64/jvm/java'
#     HOSTNAME = 'linux-eu06'
#     SHELL_SESSION_ID = '6681fc445def4f949302b248ce63377f'
#     CONFIG_SITE = '/usr/share/site/x86_64-unknown-linux-gnu'
#     CSHEDIT = 'emacs'
#     GPG_TTY = '/dev/pts/0'
#     AUDIODRIVER = 'pulseaudio'
#     LESS_ADVANCED_PREPROCESSOR = 'no'
#     COLORTERM = 'truecolor'
#     JAVA_HOME = '/usr/lib64/jvm/java'
#     ALSA_CONFIG_PATH = '/etc/alsa-pulse.conf'
#     MACHTYPE = 'x86_64-suse-linux'
#     XDG_VTNR = '7'
#     QEMU_AUDIO_DRV = 'pa'
#     MINICOM = '-c on'
#     QT_SYSTEM_DIR = '/usr/share/desktop-data'
#     OSTYPE = 'linux'
#     XDG_SESSION_ID = '1'
#     USER = 'leonardo'
#     PAGER = 'less'
#     DESKTOP_SESSION = '/usr/share/xsessions/default'
#     KONSOLE_VERSION = '181203'
#     MORE = '-sl'
#     PWD = '//home/leonardo/edata'
#     SSH_ASKPASS = '/usr/lib/ssh/ssh-askpass'
#     HOME = '/home/leonardo'
#     HOST = 'linux-eu06'
#     XNLSPATH = '/usr/share/X11/nls'
#     XDG_SESSION_TYPE = 'x11'
#     SDK_HOME = '/usr/lib64/jvm/java'
#     XDG_DATA_DIRS = '/home/leonardo/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share'
#     KONSOLE_DBUS_SESSION = '/Sessions/1'
#     JDK_HOME = '/usr/lib64/jvm/java'
#     XDG_SESSION_DESKTOP = 'KDE'
#     PROFILEREAD = 'true'
#     KONSOLE_DBUS_WINDOW = '/Windows/1'
#     GTK_MODULES = 'canberra-gtk-module'
#     FROM_HEADER = ''
#     MAIL = '/var/spool/mail/leonardo'
#     LESSKEY = '/etc/lesskey.bin'
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     KONSOLE_DBUS_SERVICE = ':1.70'
#     XDG_SESSION_CLASS = 'user'
#     XDG_SEAT_PATH = '/org/freedesktop/DisplayManager/Seat0'
#     QT_IM_MODULE = 'xim'
#     XMODIFIERS = '@im=local'
#     LS_OPTIONS = '-N --color=tty -T 0'
#     XCURSOR_THEME = 'breeze_cursors'
#     XDG_CURRENT_DESKTOP = 'KDE'
#     KONSOLE_PROFILE_NAME = 'Predefinição'
#     XDG_SEAT = 'seat0'
#     SHLVL = '2'
#     COLORFGBG = '15;0'
#     LANGUAGE = ''
#     G_FILENAME_ENCODING = '@locale,UTF-8,ISO-8859-15,CP1252'
#     MANPATH = '/usr/local/man:/usr/share/man'
#     WINDOWID = '60817414'
#     XSESSION_IS_UP = 'yes'
#     LOGNAME = 'leonardo'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     XAUTHORITY = '/home/leonardo/.Xauthority'
#     JRE_HOME = '/usr/lib64/jvm/java/jre'
#     XDG_SESSION_PATH = '/org/freedesktop/DisplayManager/Session0'
#     QT_AUTO_SCREEN_SCALE_FACTOR = '0'
#     XDG_CONFIG_DIRS = '/etc/xdg'
#     PATH = '/home/leonardo/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/leonardo/bin:/usr/local/bin:/usr/bin:/bin'
#     JAVA_BINDIR = '/usr/lib64/jvm/java/bin'
#     KDE_SESSION_UID = '1000'
#     SDL_AUDIODRIVER = 'pulse'
#     KDE_SESSION_VERSION = '5'
#     QT_IM_SWITCHER = 'imsw-multi'
#     G_BROKEN_FILENAMES = '1'
#     HISTSIZE = '1000'
#     SESSION_MANAGER = 'local/linux-eu06:@/tmp/.ICE-unix/1805,unix/linux-eu06:/tmp/.ICE-unix/1805'
#     CPU = 'x86_64'
#     CVS_RSH = 'ssh'
#     LESSOPEN = 'lessopen.sh %s'
#     GTK_IM_MODULE = 'cedilla'
#     OLDPWD = '/home/leonardo'
#     _ = '/usr/bin/buildozer'
#     PACKAGES_PATH = '/home/leonardo/.buildozer/android/packages'
#     ANDROIDSDK = '/home/leonardo/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/leonardo/.buildozer/android/platform/android-ndk-r19b'
#     ANDROIDAPI = '27'
#     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
leonardo@linux-eu06://home/leonardo/edata>



Robert Flatt

unread,
Mar 31, 2020, 6:57:35 PM3/31/20
to Kivy users support
Look in the referenced location   https://www.openssl.org/source/
The version there was updated today, and the previous one removed.

Specifies a version without the 'f'

url_version = '1.1.1'
You where just lucky enough to find this new issue first  :))

To download the current version, specify a recipe    openssl==1.1.1f

The unanswered question is will it compile?
If not submit a issue report here  https://github.com/kivy/python-for-android/issues

Robert Flatt

unread,
Mar 31, 2020, 7:28:15 PM3/31/20
to Kivy users support
Well that is strange it works for me without specifying the latest openssl
Perhaps a configuration issue at the server that has been fixed?

[INFO]:    Downloading openssl
[INFO]:    -> running mkdir -p /home/bobf/ex/rays/.b...(and 60 more)
[INFO]:    -> directory context /home/bobf/ex/rays/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> running basename https://www.openssl.or...(and 29 more)

[INFO]:    -> running rm -f .mark-openssl-1.1.1.tar.gz
[INFO]:    Downloading openssl from https://www.openssl.org/source/openssl-1.1.1.tar.gz
[INFO]:    -> running touch .mark-openssl-1.1.1.tar.gz
[INFO]:    <- directory context /home/bobf/ex/rays/.buildozer/android/platform/python-for-android
Message has been deleted

Leonardo Sales Duarte

unread,
Mar 31, 2020, 9:09:13 PM3/31/20
to Kivy users support
To download the current version, specify a recipe    openssl==1.1.1f

Sorry, Where and How Can I do that? 


Robert Flatt

unread,
Mar 31, 2020, 9:55:07 PM3/31/20
to Kivy users support
Sorry, Where and How Can I do that?
In the recipe section of the .spec, and as typed (this is the same as you would type to 'pip install' for a specific version)

But it works for me without doing this, try again.

Alexandre Brito

unread,
Apr 1, 2020, 1:26:42 PM4/1/20
to Kivy users support
I'm a newbie here.. i absolutely can't find that.
Also having the same issue and i already tried to change this "recipe", but i can't find any light on where exactly i do that, no matter where i change, it always tries to download the 1.1.1

Robert Flatt

unread,
Apr 1, 2020, 2:28:15 PM4/1/20
to Kivy users support

It looks like the openssl.org server is no longer delivering previous versions buy default, no idea if this is temporary or permanent.


A workaround:


1) in buildozer.spec change this

#p4a.local_recipes =

to

p4a.local_recipes =  ./p4a-recipes


2) create directories

./p4a-recipes

./p4a-recipes/openssl


3) copy and paste the two files (   __init__.py    and   disable-sover.patch  )  from

https://github.com/kivy/python-for-android/tree/develop/pythonforandroid/recipes/openssl

For 64 bit users be certain to pick a branch (below the Code tab) that has the latest 64 bit updates, I used "develop"


4) change line 50 in __init__.py  from

    url_version = '1.1.1'

to

    url_version = '1.1.1f'


5) delete ./.buildozer


6) buildozer android debug


I was able to build with 32 bit, I did not test 64bit, did not test app behavior.


If you have problems width the 'f' version, the old versions are at https://www.openssl.org/source/old/1.1.1/

Edit __init__.py accordingly

Alexandre Brito

unread,
Apr 1, 2020, 3:34:17 PM4/1/20
to Kivy users support
Well, now i have an SSL error installing hostpython, for whatever reason, all of a sudden that started. No clue what the heck is going on, guess i will just leave as it is

Leonardo Sales Duarte

unread,
Apr 1, 2020, 4:24:13 PM4/1/20
to Kivy users support
Robert Flatt

   Thank you very much Robert! It worked! Wow!!
   My system is 64. It still worked.
   I still had to install other things, but I think it's because I started on another linux.


-------------------------------------------------

Alexandre Brito

    Vou escrever português com você. Pelo nome, acho que é sua língua materna.
    Ainda não resolveu? Qual mensagem especificamente sobre esse SSL?




Alexandre Brito

unread,
Apr 1, 2020, 4:28:22 PM4/1/20
to Kivy users support
Leonardo

erro de certificado mesmo, SSL: CERTIFICATE_VERIFY_FAILED. Reiniciei minha maquina agora pra ver se adianta.. o engraçado é que começou simplesmente do nada
Reply all
Reply to author
Forward
0 new messages