Issue 20307: Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail - Python tracker

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
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gregory.p.smith, python-dev, shiz
Priority: normal Keywords: patch

Created on 2014-01-19 18:27 by shiz, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Python-3.4.0tip-expose-SYS_getdents64-on-android.patch shiz, 2014-01-19 18:27 Patch that manually defines SYS_getdents64 on Android from Bionic internals. review
Python-3.4.0tip-expose-SYS_getdents64-on-android-v2.patch shiz, 2014-01-21 04:25 review
Messages (6)
msg208488 - (view) Author: Shiz (shiz) * Date: 2014-01-19 18:27
Bionic, Android's C library, fails to expose the SYS_* constants used for the syscall(1) interface, which causes compilation of the _posixsubprocess module to fail as it directly attempts to call SYS_getdents64.

Attached is an experimental patch that manually defines SYS_getdents64 from Bionic's internals.
msg208490 - (view) Author: Shiz (shiz) * Date: 2014-01-19 18:41
I of course meant the syscall(2) interface, not syscall(1).
msg208607 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2014-01-21 03:57
The patch seems reasonable.  i'd modify it slightly to include a check the SYS_getdents64 is not already defined before doing the #define.
msg208611 - (view) Author: Shiz (shiz) * Date: 2014-01-21 04:25
That's probably a good idea. Fixed patch attached.
msg208612 - (view) Author: Shiz (shiz) * Date: 2014-01-21 04:26
Please take note of the discussion in issue 20305 if you were planning to merge this, by the way.
msg216204 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-04-14 20:32
New changeset 211eeb97b352 by Gregory P. Smith in branch '3.4':
Add conditional code for android's lack of definition of SYS_getdent64.
http://hg.python.org/cpython/rev/211eeb97b352

New changeset 9f89958ded0a by Gregory P. Smith in branch 'default':
Add conditional code for android's lack of definition of SYS_getdent64.
http://hg.python.org/cpython/rev/9f89958ded0a