Skip to content

python3 + openssl compilation fail #1590

Closed
@AndreMiras

Description

@AndreMiras

Versions

  • Python: Host Python 3.6.8, target Python 3.7.1
  • OS: Ubuntu 18.04
  • Kivy: 1.10.1
  • Cython: 0.28.6

Description

Compilation is failing if python3 and openssl are both in the recipe list, but python3 gets compiled first

Command:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=etheroll --bootstrap=sdl2 --requirements=android,cffi,openssl,python3==3.7.1 --ndk-api 27 --arch armeabi-v7a --copy-libs --local-recipes /home/andre/workspace/EtherollApp/src/python-for-android/recipes --color=always --storage-dir="/home/andre/workspace/EtherollApp/.buildozer/android/platform/build" --ndk-api=27

Logs

Console log:

configure: WARNING: unrecognized options: --with-openssl
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-unknown-linux-androideabi
checking for python3.6... python3.6
checking for python interpreter for cross build... python3.6
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... linux
checking for --without-gcc... no
checking for --with-icc... no
checking for arm-linux-androideabi-gcc... /home/andre/.buildozer/android/platform/android-ndk-r17c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-none-linux-androideabi -gcc-toolchain /home/andre/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
checking whether the C compiler works... no
configure: error: in `/home/andre/workspace/EtherollApp/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl/armeabi-v7a__ndk_target_27/python3/android-build':
configure: error: C compiler cannot create executables
See `config.log' for more details

Relevant .buildozer/android/platform/build/build/other_builds/python3-libffi-openssl/armeabi-v7a__ndk_target_27/python3/android-build/config.log part:

/home/andre/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrypto1.1
/home/andre/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lssl1.1

And listing the directory .buildozer/android/platform/build/build/other_builds/openssl-python3/armeabi-v7a__ndk_target_27/openssl1.1 I couldn't indeed find the shared libssl and libcrypto objects.

This is because python3 was compiled before openssl was.
The fix should be fairly simple, basically in python3 recipe we need to dynamically add openssl to the depends list if the openssl recipe is present in the requirements list

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions