New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTLD_* macros are not defined on Android #71119
Comments
test_posix fails on an android emulator running an x86 system image at API level 21. For the first ERROR, on android we have instead of a list of group IDs: ====================================================================== Traceback (most recent call last):
File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/test_posix.py", line 815, in test_getgroups
set([int(x) for x in groups.split()]),
File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/test_posix.py", line 815, in <listcomp>
set([int(x) for x in groups.split()]),
ValueError: invalid literal for int() with base 10: 'uid=0(root)' ====================================================================== Traceback (most recent call last):
File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/test_posix.py", line 1128, in test_rtld_constants
posix.RTLD_LAZY
AttributeError: module 'posix' has no attribute 'RTLD_LAZY' Ran 83 tests in 0.114s FAILED (errors=2, skipped=11) |
What RTLD_* constants exist on Android? |
On Android RTLD_* constants are not defined via macros but as enum values. I guess CPython needs to check each one in configure.ac. See [1] [1] https://android.googlesource.com/platform/bionic/+/master/libc/include/dlfcn.h |
Patch attached for improved RTLD_* checking. |
For test_getgroups, in Android 5.1 [1] https://android.googlesource.com/platform/system/core/+/android-5.1.1_r37/toolbox/id.c |
LGTM. But needed to update pyconfig.h.in and configure. RTLD_* constants are also used in Modules/_ctypes/_ctypes.c and Python/pystate.c (this can be a cause of threading and ctypes issues on Android). |
Version 2. |
New changeset 811ccdee6f87 by Serhiy Storchaka in branch 'default': |
Thank you Chi Hsuan Yen. Please open separate issue for "id -G". |
Xavier, please check that issues with ctypes and threading are not gone. |
test_rtld_constants is now ok at the tip of the default branch. |
|
No ctypes still crashes and threading still hangs. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: