Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-71052: Fix several Android build issues#115955
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix several Android build issues |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1443,7 +1443,13 @@ if test $enable_shared = "yes"; then | ||
| LDLIBRARY='libpython$(LDVERSION).so' | ||
| BLDLIBRARY='-L. -lpython$(LDVERSION)' | ||
| RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | ||
| INSTSONAME="$LDLIBRARY".$SOVERSION | ||
| # The Android Gradle plugin will only package libraries whose names end | ||
| # with ".so". | ||
| if test "$ac_sys_system" != "Linux-android"; then | ||
| INSTSONAME="$LDLIBRARY".$SOVERSION | ||
| fi | ||
| if test "$with_pydebug" != yes | ||
| then | ||
| PY3LIBRARY=libpython3.so | ||
| @@ -3679,7 +3685,14 @@ int main(void) | ||
| }]])], | ||
| [ac_cv_aligned_required=no], | ||
| [ac_cv_aligned_required=yes], | ||
| [ac_cv_aligned_required=yes]) | ||
| [ | ||
| # "yes" changes the hash function to FNV, which causes problems with Numba | ||
| # (https://github.com/numba/numba/blob/0.59.0/numba/cpython/hashing.py#L470). | ||
| if test "$ac_sys_system" = "Linux-android"; then | ||
| ac_cv_aligned_required=no | ||
| else | ||
| ac_cv_aligned_required=yes | ||
| fi]) | ||
| ]) | ||
| if test "$ac_cv_aligned_required" = yes ; then | ||
| AC_DEFINE([HAVE_ALIGNED_REQUIRED], [1], | ||
| @@ -4905,6 +4918,22 @@ else | ||
| AC_MSG_RESULT([$MACHDEP_OBJS]) | ||
| fi | ||
| if test "$ac_sys_system" = "Linux-android"; then | ||
| # When these functions are used in an unprivileged process, they crash rather | ||
| # than returning an error. | ||
| privileged_funcs="chroot initgroups setegid seteuid setgid setregid setresgid | ||
| setresuid setreuid setuid" | ||
| # These functions are unimplemented and always return an error. | ||
| unimplemented_funcs="sem_open sem_unlink" | ||
| for name in $privileged_funcs $unimplemented_funcs; do | ||
| AS_VAR_PUSHDEF([func_var], [ac_cv_func_$name]) | ||
| AS_VAR_SET([func_var], [no]) | ||
| AS_VAR_POPDEF([func_var]) | ||
| done | ||
| fi | ||
| # checks for library functions | ||
| AC_CHECK_FUNCS([ \ | ||
| accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ | ||
| @@ -5249,10 +5278,11 @@ AC_CHECK_FUNCS([clock_getres], [], [ | ||
| ]) | ||
| ]) | ||
| # On iOS, clock_settime can be linked (so it is found by | ||
| # configure), but it raises a runtime error if used because apps can't change | ||
| # the clock. Force the symbol off. | ||
| if test "$ac_sys_system" != "iOS" ; then | ||
| # On Android and iOS, clock_settime can be linked (so it is found by | ||
| # configure), but when used in an unprivileged process, it crashes rather than | ||
| # returning an error. Force the symbol off. | ||
| if test "$ac_sys_system" != "Linux-android" && test "$ac_sys_system" != "iOS" | ||
| then | ||
| AC_CHECK_FUNCS([clock_settime], [], [ | ||
| AC_CHECK_LIB([rt], [clock_settime], [ | ||
| AC_DEFINE([HAVE_CLOCK_SETTIME], [1]) | ||
| @@ -5404,7 +5434,9 @@ int main(void) | ||
| [ac_cv_buggy_getaddrinfo=no], | ||
| [ac_cv_buggy_getaddrinfo=yes], | ||
| [ | ||
| if test "${enable_ipv6+set}" = set; then | ||
| if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then | ||
| ac_cv_buggy_getaddrinfo="no" | ||
mhsmith marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| elif test "${enable_ipv6+set}" = set; then | ||
| ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" | ||
| else | ||
| ac_cv_buggy_getaddrinfo=yes | ||
| @@ -6622,9 +6654,9 @@ CPPFLAGS=$ac_save_cppflags | ||
| AC_MSG_NOTICE([checking for device files]) | ||
| dnl NOTE: Inform user how to proceed with files when cross compiling. | ||
| dnl iOS cross-compile builds are predictable; they won't ever | ||
| dnl Some cross-compile builds are predictable; they won't ever | ||
| dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. | ||
| if test "$ac_sys_system" = "iOS" ; then | ||
| if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then | ||
| ac_cv_file__dev_ptmx=no | ||
| ac_cv_file__dev_ptc=no | ||
| else | ||
Uh oh!
There was an error while loading. Please reload this page.