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.

classification
Title: android: SYS_getdents64 does not need to be defined on android API 21
Type: compile error Stage: resolved
Components: Cross-Build Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: xdegaye Nosy List: Alex.Willmer, Roman.Evstifeev, cschramm, gregory.p.smith, python-dev, skrah, vstinner, xdegaye, yan12125
Priority: normal Keywords: patch

Created on 2016-04-26 13:49 by xdegaye, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
posixmodule.patch xdegaye, 2016-04-26 13:49 review
posixmodule.patch xdegaye, 2016-04-27 09:47 with a test of the android api level at compile time review
posixmodule_3.patch xdegaye, 2016-06-05 12:23 review
Messages (12)
msg264287 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-04-26 13:49
Revert the changeset commited at issue #20307 as the compilation does not fail anymore on android API level 21.

Patch attached.
msg264305 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2016-04-26 15:12
@shiz: Can we settle on API level 21 or is there any reason to leave this in?
msg264331 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2016-04-26 21:23
I have no problem just removing the #ifdef as Android API 21 is now old enough (Lollipop / 5.0) that anyone building Python 3.6 for use on Android is probably fine with it.

If there is a #define that can be used to test the android api level at compile time, adding that to the #if is another approach and would keep people who are trying to run something on an older version happy.
msg264366 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-04-27 09:47
New patch taking into account Gregory's comments.
API level 19 is the last to have a sys/linux-syscalls.h header.
All levels have a android/api-level.h header that define __ANDROID_API__.
There is no API level 20, and SYS_getdents64 is defined at API level 21.
msg267414 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-06-05 12:23
The patch is simpler since android/api-level.h is now included in pyport.h by changeset 09af54099973.
msg268378 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2016-06-12 13:32
posixmodule_3.patch looks good to me. Gregory has already approved the approach, so I think you can go ahead and commit this.
msg268550 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-06-14 11:40
Stefan Krah: "posixmodule_3.patch looks good to me. Gregory has already approved the approach, so I think you can go ahead and commit this"

I concur with Stefan: LGTM.
msg268615 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-06-15 10:02
New changeset 4ef3a93e1be2 by Xavier de Gaye in branch 'default':
Issue #26862: SYS_getdents64 does not need to be defined on android API 21.
https://hg.python.org/cpython/rev/4ef3a93e1be2
msg279604 - (view) Author: Christopher Schramm (cschramm) Date: 2016-10-28 13:06
Any plans to fix this in 3.5 as well?
msg279606 - (view) Author: (yan12125) * Date: 2016-10-28 14:26
cschramm: AFAIK only Python 3.6+ has experimental Android support. 3.5 or below are not supported.
msg279608 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-10-28 14:33
Sorry, AFAIK there is no plan to retrofit the Android changes to 3.5.
Note that Python 3.6 is expected to be released in few weeks, by next mid-december.
msg279610 - (view) Author: Christopher Schramm (cschramm) Date: 2016-10-28 15:54
Well, the 3.5 code checks __ANDROID__ as well and works pretty fine on Android, but if it's not supposed to be supported, we'll have to upgrade to 3.6 then.

Thanks for your work! :)
History
Date User Action Args
2022-04-11 14:58:30adminsetgithub: 71049
2016-10-28 15:54:17cschrammsetmessages: + msg279610
2016-10-28 14:33:51xdegayesetmessages: + msg279608
2016-10-28 14:26:29yan12125setnosy: + yan12125
messages: + msg279606
2016-10-28 13:06:47cschrammsetnosy: + cschramm
messages: + msg279604
2016-06-15 10:04:53xdegayesetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2016-06-15 10:02:36python-devsetnosy: + python-dev
messages: + msg268615
2016-06-14 11:40:59vstinnersetnosy: + vstinner
messages: + msg268550
2016-06-14 10:16:54xdegayesetassignee: xdegaye
stage: commit review
2016-06-12 13:32:03skrahsetmessages: + msg268378
2016-06-05 12:23:34xdegayesetfiles: + posixmodule_3.patch

messages: + msg267414
2016-05-03 07:20:17xdegayesettitle: SYS_getdents64 does not need to be defined on android API 21 -> android: SYS_getdents64 does not need to be defined on android API 21
2016-04-27 09:47:09xdegayesetfiles: + posixmodule.patch

messages: + msg264366
2016-04-26 21:23:58gregory.p.smithsetmessages: + msg264331
2016-04-26 16:04:41zach.warelinkissue26865 dependencies
2016-04-26 16:02:57Roman.Evstifeevsetnosy: + Roman.Evstifeev
2016-04-26 15:12:02skrahsetnosy: + skrah
messages: + msg264305
2016-04-26 14:05:20berker.peksagsetnosy: + gregory.p.smith
2016-04-26 13:49:48xdegayecreate