Title: android does not support versioning in SONAME
Type: behavior Stage:
Components: Cross-Build Versions: Python 3.6
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Willmer, Roman.Evstifeev, xdegaye
Priority: normal Keywords: patch

Created on 2016-04-26 09:24 by xdegaye, last changed 2016-05-01 06:55 by xdegaye. This issue is now closed.

File name Uploaded Description Edit
soname_versioning.patch xdegaye, 2016-04-26 09:24 review
logcat.txt xdegaye, 2016-04-26 15:22
Messages (3)
msg264241 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-04-26 09:24
When python is cross-compiled for android with --enable-shared, the following error occurs:

# python -c "import socket"
Fatal Python error: PyThreadState_Get: no current thread

This also occurs when importing subprocess, asyncore or asyncio but not when importing posix (not a shared library).  This is fixed by building python without soname versioning, although I have no idea why a problem with the android loader would cause this error.
Patch attached.

Some references to the android loader and soname versioning:!msg/android-ndk/_UhNpRJlA1k/hbryqzEgN94J
msg264306 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-04-26 15:22
Attached are the logcat traces of the abort.

This links helps in reading Android avc messages:
msg264583 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-05-01 06:55
Python builds and runs fine on android without this patch. I cannot reproduce the 'Fatal Python error: PyThreadState_Get: no current thread' abort either.

Closing the issue.
Date User Action Args
2016-05-01 06:55:08xdegayesetstatus: open -> closed
resolution: works for me
messages: + msg264583
2016-04-26 16:24:27Roman.Evstifeevsetnosy: + Roman.Evstifeev
2016-04-26 16:04:41zach.warelinkissue26865 dependencies
2016-04-26 15:22:02xdegayesetfiles: + logcat.txt

messages: + msg264306
2016-04-26 09:24:50xdegayecreate