[PyQt] make error when statically building Python for cross-compiling to android from linux
phil at riverbankcomputing.com
Tue Oct 10 22:42:31 BST 2017
Check the NEWS file for which versions are supported. What’s important
is the chronology of releases, not their version numbers.
On 10/10/2017 22:32, umbertofilippo wrote:
> Thank you very much Phil.
> I am trying now to do everything with Python 3.5.4, to hopefully being
> able to continue.
> However, I am getting this error now, when I am trying to statically
> build python:/
> // Configuring /home/umberto/Documents/apps/Python-3.5.4 as Python
> v3.5.4 for android-32//
> // Patching
> // pyqtdeploycli:
> line does not match diff context/
> I read that this is probably due to the fact that 'Python needs
> unpatched source', but unfortunately, I don't know what that means...
> I tried to create a new venv with python 3.5.4 (as my source Python),
> a new pip installation of pyqt5 and pyqtdeploy, and then downloaded
> the gzipped tarball source of Python 3.5.4 (target) from
> Then I extracted it, cd to it and run
> /pyqt//deploycli --package python --target android-32 configure/
> May I ask what am I doing wrong, or what should I do in order to 'have
> fresh, unpatched source for python' (I am quoting this discussion
> From the documentation
> I read in the description of pyqtdeploycli's --disable-patches option
> that '/The default is to enable the patching of the Python source code
> for Android based targets/'. How do I revert this if possible?
> Thanks in advance for any help, I really like PyQt!
> On 09/10/2017 23:29, Phil Thompson wrote:
>> On 9 Oct 2017, at 10:11 pm, umbertofilippo <umbertofilippo at tiscali.it>
>>> I am trying to build Python 3.6 statically to cross-compile from
>>> linux to android (finale target API 25).
>>> I am following the instructions in
>>> I've set SYSROOT to point my app folder (export
>>> I've created a symlink to android Qt installation in the root of my
>>> folder this way:
>>> • cd /home/umberto/Documents/apps/testApp/sysroot-android/
>>> • ln -s /home/umberto/Qt5.9.1/5.9.1/android_armv7/
>>> I downloaded the binary from python.org (the gzipped source tarball).
>>> I extracted it in a folder and then ran these commands:
>>> • cd /folder/where/I/extracted/Python-3.6.2
>>> • pyqtdeploycli --package python --target android-32 configure
>>> • make
>>> At the 'make' command I receive an error, which does not let me ho on
>>> with 'make install'.
>>> Python/pystrtod.c:181:32: error: 'struct lconv' has no member named
>>> decimal_point = locale_data->decimal_point;
>>> Python/pystrtod.c: In function 'change_decimal_from_locale_to_dot':
>>> Python/pystrtod.c:448:44: error: 'struct lconv' has no member named
>>> const char *decimal_point = locale_data->decimal_point;
>>> Makefile:14373: recipe for target '.obj/pystrtod.o' failed
>>> make: *** [.obj/pystrtod.o] Error 1
>>> I attached the output of the 'make' command as it is very long, in
>>> order to give someone the possibility to hopefully helping me trying
>>> to figure out what's going on.
>>> Is it something related to (quoting the documentation) "It may also
>>> be necessary to set the ANDROID_NDK_TOOLCHAIN_VERSION if Qt and the
>>> Android NDK disagree on which version of the toolchain to use."?
>> pyqtdeploy hasn't been updated for Python v3.6.2 (although I'm not
>> saying that that is the cause of the problem).
More information about the PyQt