-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
bpo-21536: On Android, C extensions are linked to libpython #12989
Conversation
LGTM. Thanks @xdegaye for this fix! I tested the PR on Linux: C extensions are still not linked to libpython, as expected. Xavier tested the cross-compilation to Android. |
Note: This is a follow-up to #12946. |
@@ -4647,6 +4647,14 @@ AC_MSG_CHECKING(LDVERSION) | |||
LDVERSION='$(VERSION)$(ABIFLAGS)' | |||
AC_MSG_RESULT($LDVERSION) | |||
|
|||
# On Android the shared libraries must be linked with libpython. | |||
AC_SUBST(LIBPYTHON) | |||
if test -z "$ANDROID_API_LEVEL"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, being that I'm unfamiliar with build issues on Android why the specific test for $ANDROID_API_LEVEL
and not something more generic like:
case $host in
*-linux-android*) ....
?
Reason being, I need to add additional cases where libpython should be linked explicitly (e.g. Cygwin, MinGW, etc.) and it would be easier to build off the host_os for this than something very Android-specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a test based on $ANDROID_API_LEVEL
or on $host
as you suggest is equivalent.
https://bugs.python.org/issue21536