8000 Fix linkage problems with python's versioned library (reintroduce `INSTSONAME`) by opacam · Pull Request #1568 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content

Fix linkage problems with python's versioned library (reintroduce INSTSONAME) #1568

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

Merged
merged 1 commit into from
Jan 9, 2019

Conversation

opacam
Copy link
Member
@opacam opacam commented Jan 7, 2019

We fix this issue by re-introducing INSTSONAME. This variable has been used in all our python recipes, because allow us to remove the version of the compiled python library which is mandatory, at the time of writing, because android does not support versioned libraries (the Java method called to load the libraries only supports a .so suffix).

A little history, because I didn't find any official documentation for this variable, and it's quite important for us:

  • This variable it's not hacked, it's official and was introduced a long time ago, forms part of the python's shared library building process (python/cpython@1142de3)
  • @tito introduced this variable almost at the beginning of the p4a project in (bdefea1)
  • @inclement also make use of it when he reworked the python2 recipe (4c8b5bc)
  • this variable still exists in the current python2 recipe and we make use of it precisely to solve the mentioned android's libraries version problem
  • Somehow, during the process of making the new python3 recipe, we loose this variable and then, we begin to have linkage problems at runtime with our python library as described in issue Need libpython3.7m.so.1.0 in android phone #1501

Note: ¡¡¡Special thanks to @Jonast!!!...to force me to search this information ;)

References: python/cpython@1142de3, bdefea1 and 4c8b5bc
Resolves: #1501

If there is some planning to merge #1537 soon, maybe it would be better not to merge this, to avoid fixing merge conflicts in there.I think that it would be less problematic for all of us to fix the merge conflicts in here.

ghost
ghost previously approved these changes Jan 7, 2019
Copy link
@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested them, but code-wise (after the discussion) I agree it's a good approach. 👍 Also, I agree that #1537 should probably be merged first, I also have pull requests waiting that may conflict which will be easier to adapt than #1537 which we really should get in some time soon

…STSONAME`)

We fix this issue by re-introducing `INSTSONAME`. This variable has been used in all our python recipes, because allow us to remove the version of the compiled python library which is mandatory, at the time of writing, because android does not support versioned libraries (the Java method called to load the libraries only supports a .so suffix).

A little history, because I didn't find any official documentation for this variable, and **it's quite important for us**:

  - This variable it's not hacked, it's official and was introduced a long time ago, forms part of the python's shared library building process (python/cpython@1142de3)
  - @tito introduced this variable almost at the beginning of the p4a project in (bdefea1)
  - @inclement also make use of it when he reworked the python2 recipe (4c8b5bc)
  - this variable still exists in the current python2 recipe and we make use of it precisely to solve the mentioned android's libraries version problem
  - Somehow, during the process of making the new python3 recipe, we loose this variable and then, we begin to have linkage problems at runtime with our python library as described in issue kivy#1501

Note: ¡¡¡Special thanks to @Jonast!!!...to force me to search this information ;)

References: python/cpython@1142de3, bdefea1 and 4c8b5bc
Resolves: kivy#1501
@opacam opacam force-pushed the fix-python3-linkage branch from efcb66f to f73503c Compare January 9, 2019 21:15
@opacam opacam changed the title Fix linkage problems with python3's versioned library (reintroduce INSTSONAME) Fix linkage problems with python's versioned library (reintroduce INSTSONAME) Jan 9, 2019
if self.major_minor_version_string[0] == '3':
py_version += 'm'
shprint(sh.make, 'all',
'INSTSONAME=libpython{version}.so'.format(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after discussion this looks like the right way to do it! I think this is a good change

@KeyWeeUsr KeyWeeUsr merged commit d19e008 into kivy:master Jan 9, 2019
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.

Need libpython3.7m.so.1.0 in android phone
2 participants
0