0

Compiling openssl from a sysroot fails to find stdlib (when running pyqtdeploy's demo for PyQT5 on android)

How to I make sure the standard library can be found?

In trying to make a python android app using PyQT, pyqtdeploy seems to be the official tool that supports Python3 & PyQT5 (buildozer doesn't seem to)

However, it has limited documentation. There is a demo supplied, but is missing APK build steps. I got so far as to get it to start compilation, but I get an error finding the standard library, even though I have build-essentials and libc6-dev installed.

I unzip the latest pyqtdeploy demo from the source code download site and download some extra dependancies:

cd pyqtdeploy-2.1/demo
cd src
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz
wget http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
wget http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
wget https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.12/sip-4.19.12.tar.gz
cd -

And then I run

ANDROID_NDK_TOOLCHAIN_VERSION=4.9 ANDROID_NDK_PLATFORM=android-28 ANDROID_NDK_ROOT=~/Android/android-ndk-r17b python3  build-demo.py --target android-32

It compiles for a bit then fails:


generating dummy tests (if needed)...
make[1]: Entering directory '/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/build/openssl-1.0.2p/test'
ideatest.c => dummytest.c
md2test.c => dummytest.c
rc5test.c => dummytest.c
mdc2test.c => dummytest.c
jpaketest.c => dummytest.c
make[1]: Leaving directory '/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/build/openssl-1.0.2p/test'

Configured for android.

*** Because of configuration changes, you MUST do the following before
*** building:

    make depend
making depend in crypto...
make[1]: Entering directory '/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/build/openssl-1.0.2p/crypto'
In file included from cryptlib.c:117:0:
cryptlib.h:62:21: fatal error: stdlib.h: No such file or directory
 # include <stdlib.h>

Aha, this may be related: the sysroot-android-32/include directory is empty. The pyqtdeploy-sysroot tool is supposed to make a sysroot for each target platform

When I ignore building openssl, I get an error for SIP: '/usr/lib/python3/dist-packages/libsip.a': No such file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.