Title: building Android with android-ndk-r14
Type: compile error Stage: needs patch
Components: Cross-Build Versions: Python 3.7, Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Willmer, Chi Hsuan Yen, xdegaye
Priority: normal Keywords:

Created on 2016-12-21 20:24 by xdegaye, last changed 2016-12-22 09:11 by xdegaye.

File name Uploaded Description Edit
api-level.h xdegaye, 2016-12-21 20:24
Messages (3)
msg283778 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2016-12-21 20:24
android-ndk-r14 introduces "Unified Headers" [1] and is planned to be released late january/early february 2017 [2].

__ANDROID_API__ is not anymore defined in 'android/api-level.h' that is currently included by Include/pyport.h, and is passed instead with -D__ANDROID_API__=$API when compiling. And 'android/api-level.h' is now used to set the API level to 10000 as a Magic version number for a current development build when __ANDROID_API__ is not defined (see attached file).

Adoption of android-ndk-r14 should be made with the following changes:
* Remove the include of <android/api-level.h> in Include/pyport.h.
* Update to abort when __ANDROID__ is defined and __ANDROID_API__ is not defined.
* Revert the changes made in issues #28538 and #28762, android-ndk-r14 fixes the problems raised in these two issues.

msg283815 - (view) Author: Chi Hsuan Yen (Chi Hsuan Yen) * Date: 2016-12-22 06:40
Thanks for compiling up necessary changes for NDK r14! Seems that indicates future Python versions will require at least NDK r14 to build?

Another headache from unified headers is that it requires different --sysroot in compilation and linking. Currently does not cope with it well. See my dirty hack at [1] for an ad-hoc workaround.

msg283822 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2016-12-22 09:11
> Seems that indicates future Python versions will require at least NDK r14 to build?

Date User Action Args
2016-12-22 09:11:00xdegayesetmessages: + msg283822
2016-12-22 06:40:09Chi Hsuan Yensetnosy: + Chi Hsuan Yen
messages: + msg283815
2016-12-21 20:27:49xdegayelinkissue26865 dependencies
2016-12-21 20:24:25xdegayecreate