You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lockf() is available now on Android API level 24, but the F_LOCK macro is not defined #72948
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/xdegaye'closed_at=<Date2017-11-23.11:02:01.392>created_at=<Date2016-11-21.10:19:49.471>labels= ['interpreter-core', 'type-bug', '3.7']
title='lockf() is available now on Android API level 24, but the F_LOCK macro is not defined'updated_at=<Date2017-11-23.11:02:01.391>user='https://github.com/xdegaye'
Do you mean that the patch adds posix.F_LOCK constant on Android?
xdegaye commented on Dec 21, 2016
xdegayemannequin
MannequinAuthor
More actions
No, the patch prevents posix.flock() to be defined on Android API 24 with android-ndk-r13. But I plan to change it so that the test is skipped when posix does not have the F_LOCK attribute as this problem is not worth a change in the build machinery. It makes even more sense now that android-ndk-r14 will be released with "Unified Headers". BTW thanks Chi Hsuan Yen for this important information.
changed the title [-]configure links with lockf and F_LOCK is not declared in Android API 24[/-][+]lockf() is available now on Android API level 24, but the F_LOCK macro is not defined[/+]on Dec 21, 2016
Activity
xdegaye commentedon Nov 21, 2016
The patch fixes the following error:
======================================================================
ERROR: test_lockf (test.test_posix.PosixTester)
----------------------------------------------------------------------
yan12125 commentedon Dec 21, 2016
FYI: Since Android NDK r14 beta1, F_LOCK is defined in unified headers. [1] In $ANDROID_NDK/sysroot/usr/include/bits/lockf.h:
[1] https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md
vstinner commentedon Dec 21, 2016
Do you mean that the patch adds posix.F_LOCK constant on Android?
xdegaye commentedon Dec 21, 2016
No, the patch prevents posix.flock() to be defined on Android API 24 with android-ndk-r13. But I plan to change it so that the test is skipped when posix does not have the F_LOCK attribute as this problem is not worth a change in the build machinery. It makes even more sense now that android-ndk-r14 will be released with "Unified Headers". BTW thanks Chi Hsuan Yen for this important information.
vstinner commentedon Dec 21, 2016
Oh ok, the issue is more subtle than what I understood.
I reviewed test_posix_flock.patch and proposed some changes to the comment/doc.
xdegaye commentedon Dec 21, 2016
Thanks for the review Victor.
I have created bpo-29040: building Android with android-ndk-r14.
xdegaye commentedon Dec 21, 2016
New patch.
Please use autoreconf before running the patch (autoreconf instead of autoconf because the description of HAVE_LOCKF has been updated).
[-]configure links with lockf and F_LOCK is not declared in Android API 24[/-][+]lockf() is available now on Android API level 24, but the F_LOCK macro is not defined[/+]vstinner commentedon Dec 21, 2016
The new patch now looks good to me.
python-dev commentedon Dec 22, 2016
New changeset 51b09b10d4f8 by Xavier de Gaye in branch '3.6':
Issue bpo-28762: lockf() is available on Android API level 24, but the
https://hg.python.org/cpython/rev/51b09b10d4f8
New changeset 146157d91283 by Xavier de Gaye in branch 'default':
Issue bpo-28762: Merge 3.6.
https://hg.python.org/cpython/rev/146157d91283
xdegaye commentedon Nov 21, 2017
This change is not needed anymore now that Unified Headers are supported by android-ndk-r14 (see bpo-29040)
xdegaye commentedon Nov 23, 2017
New changeset 5ce1069 by xdegaye in branch 'master':
bpo-28762: Revert last commit (now using Android Unified Headers) (GH-4488)
5ce1069