This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年08月31日 17:23 by doko, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| android.diff | doko, 2016年09月01日 18:40 | patch2 | review | |
| Messages (14) | |||
|---|---|---|---|
| msg274041 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年08月31日 17:23 | |
Following up to http://bugs.python.org/issue23968, I think we should choose different platform triplets for the android builds than we do for the linux builds. Not sure which ones. I saw the following gnu triplets used: - i686-linux-android - arm-linux-androidabi Looking at the two cross compilers from the Ubuntu archive, I see that the arm compiler defines a __ANDROID__ macro, while the i686 compiler doesn't, so it might be difficult to select the correct platform triplet. Could somebody check different compilers (clang as well) to see if this macro is defined? <gcc|clang> -E -dM - < /dev/null|grep -i android Not sure which architectures else should be defined, but aarch64 comes to my mind as well. |
|||
| msg274046 - (view) | Author: (yan12125) * | Date: 2016年08月31日 17:44 | |
In changeset 46567fda0b29, Xavier defined an autotools variable $ANDROID_API_LEVEL. This can be used to determine whether a specific compiler targets Android or not. |
|||
| msg274049 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年08月31日 17:59 | |
hmm, should the android api level be part of the platform triplet? or are these not relevant for modules? |
|||
| msg274055 - (view) | Author: (yan12125) * | Date: 2016年08月31日 18:14 | |
In Android NDK, each API level comes with a different set of header files ($ANDROID_NDK/platforms/android-$ANDROID_API_LEVEL/arch-$ARCH/usr/include). In a strict sense, the API level should be included in platform triplet. At least the plat-* directory has different contents in different API levels. In practical, I haven't seen such a usage. |
|||
| msg274154 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年09月01日 17:06 | |
here's a patch, not yet including the ABI levels. I think we didn't need them for Linux, and maybe start for Android without using them. You can later introduce these if you have to. |
|||
| msg274156 - (view) | Author: (yan12125) * | Date: 2016年09月01日 17:48 | |
Well, here's a list of cross compilers in Android NDK:
$ ls $ANDROID_NDK/toolchains/*/prebuilt/*/bin/*-gcc | xargs -i basename '{}'
aarch64-linux-android-gcc
arm-linux-androideabi-gcc
mips64el-linux-android-gcc
mipsel-linux-android-gcc
i686-linux-android-gcc
x86_64-linux-android-gcc
Does Python's platform triplet have the same meaning as GCC's --target? If so those names can be used.
By the way, +1 for not including the API level.
|
|||
| msg274166 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年09月01日 18:40 | |
yes, it should follow the gnu triplets. I updated these, and added some for mips. However I can't check if the mips ones will do what they are supposed to do. Please could you check these if you have cross compilers available? |
|||
| msg274171 - (view) | Author: (yan12125) * | Date: 2016年09月01日 19:25 | |
CPython builds fine for MIPS with this patch. For MIPS64, apparently Android NDK is broken - it can't even compile a simple C file. |
|||
| msg274174 - (view) | Author: (yan12125) * | Date: 2016年09月01日 19:42 | |
OK found some wrong usages in my build script. Now MIPS64 builds fine, and PLATFORM_TRIPLET is detected as intended. I didn't test the build on actual devices, as I don't have a MIPS or MIPS64 device. |
|||
| msg274176 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年09月01日 20:02 | |
I think that's good for now. The compiler checks maybe can be later adjusted. |
|||
| msg274177 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年09月01日 20:05 | |
New changeset a931fdc4c4c4 by doko in branch 'default': - Issue #27917: Set platform triplets for Android builds. https://hg.python.org/cpython/rev/a931fdc4c4c4 |
|||
| msg274178 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年09月01日 20:06 | |
checked in. |
|||
| msg275838 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年09月11日 19:38 | |
test_triplet_in_ext_suffix in test_sysconfig fails with the 'x86' Android platform. |
|||
| msg275839 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年09月11日 19:40 | |
New changeset 676e6c3d30db by Xavier de Gaye in branch 'default': Issue #27917: Fix test_triplet_in_ext_suffix for the 'x86' Android platform. https://hg.python.org/cpython/rev/676e6c3d30db |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:35 | admin | set | github: 72104 |
| 2020年11月19日 05:30:08 | pmpp | set | nosy:
+ pmpp |
| 2016年09月11日 19:41:29 | xdegaye | set | status: open -> closed |
| 2016年09月11日 19:40:11 | python-dev | set | messages: + msg275839 |
| 2016年09月11日 19:38:22 | xdegaye | set | status: closed -> open messages: + msg275838 |
| 2016年09月01日 20:06:07 | doko | set | status: open -> closed resolution: fixed messages: + msg274178 |
| 2016年09月01日 20:05:32 | python-dev | set | nosy:
+ python-dev messages: + msg274177 |
| 2016年09月01日 20:02:22 | doko | set | messages: + msg274176 |
| 2016年09月01日 19:42:44 | yan12125 | set | messages: + msg274174 |
| 2016年09月01日 19:25:58 | yan12125 | set | messages: + msg274171 |
| 2016年09月01日 18:41:15 | doko | set | files: - android.diff |
| 2016年09月01日 18:40:43 | doko | set | files:
+ android.diff messages: + msg274166 |
| 2016年09月01日 17:48:54 | yan12125 | set | messages: + msg274156 |
| 2016年09月01日 17:06:26 | doko | set | files:
+ android.diff keywords: + patch messages: + msg274154 |
| 2016年08月31日 18:14:29 | yan12125 | set | messages: + msg274055 |
| 2016年08月31日 17:59:05 | doko | set | messages: + msg274049 |
| 2016年08月31日 17:44:44 | yan12125 | set | nosy:
+ xdegaye messages: + msg274046 |
| 2016年08月31日 17:25:07 | doko | set | nosy:
+ yan12125 |
| 2016年08月31日 17:23:02 | doko | create | |