Skip to content
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

Merged
merged 2 commits into from
Apr 29, 2019
Merged

bpo-21536: On Android, C extensions are linked to libpython #12989

merged 2 commits into from
Apr 29, 2019

Conversation

xdegaye
Copy link
Contributor

@xdegaye xdegaye commented Apr 27, 2019

@vstinner
Copy link
Member

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.

@embray
Copy link
Contributor

embray commented May 24, 2019

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants