Skip to content

Commit 15a3770

Browse files
committed
fix link on libpython2.7.so, by not using libpython2.7.so.1.0, as it doesn't appear in final APK, and platform < Android 6 cannot load it (tested on 5 and 5.1, they said libmain.so is missing libpython2.7.so.1.0 while libpython2.7.so was there).
Symlink is not possible, and there is no purpose of having 2 same libraries. Just having INSTSONAME set to libpython2.7.so works and all the linking is correct for everything that depends on it. Old Python 2 recipe was having a fix for that, but got removed when using the GuestPythonRecipe
1 parent b3fb461 commit 15a3770

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

pythonforandroid/recipes/python2/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Python2Recipe(GuestPythonRecipe):
3232
'patches/fix-filesystem-default-encoding.patch',
3333
'patches/fix-locale.patch',
3434
'patches/fix-init-site.patch',
35+
'patches/fix-python2-instsoname.patch'
3536
]
3637

3738
configure_args = ('--host={android_host}',
@@ -62,6 +63,14 @@ def set_libs_flags(self, env, arch):
6263
openssl_build = recipe.get_build_dir(arch.arch)
6364
env['OPENSSL_BUILD'] = openssl_build
6465
env['OPENSSL_VERSION'] = recipe.version
66+
67+
# XXX got issue with atomic?
68+
# .../openssl/libcrypto1.1.so: error: undefined reference to '__atomic_fetch_add_4'
69+
# .../openssl/libcrypto1.1.so: error: undefined reference to '__atomic_fetch_sub_4'
70+
# .../openssl/libcrypto1.1.so: error: undefined reference to '__atomic_store'
71+
# .../openssl/libcrypto1.1.so: error: undefined reference to '__atomic_load'
72+
# .../openssl/libcrypto1.1.so: error: undefined reference to '__atomic_is_lock_free'
73+
env['LDFLAGS'] += ' -latomic'
6574
return env
6675

6776

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- a/configure 2019-01-08 09:55:21.552820223 +0100
2+
+++ b/configure 2019-01-08 09:55:28.752658401 +0100
3+
@@ -5490,7 +5490,6 @@
4+
SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5+
;;
6+
esac
7+
- INSTSONAME="$LDLIBRARY".$SOVERSION
8+
;;
9+
hp*|HP*)
10+
case `uname -m` in

0 commit comments

Comments
 (0)