-
Notifications
You must be signed in to change notification settings - Fork 1.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
[CORE UPDATE - PART IV] Fix cryptography+cffi #1545
Conversation
Since the recent openssl upgrade this recipe stopped to work. Here we adapt the recipe to the new build circumstances and we also fix the cffi recipe because it is a direct dependency of cryptography and had the wrong flags for the new python2 build system.
In order to not have troubles with python3 we update most of the dependant recipes to the latest available versions.
This is another one that is quite fundamentally relevant for everyone, isn't it? Doesn't ctypes require cffi? Once this is in I can do the |
# https://github.com/kivy/python-for-android/pull/1250/files#diff-569e13021e33ced8b54385f55b49cbe6 | ||
env['CFLAGS'] += ' -I{}/include/python/'.format(ndk_dir_python) | ||
env['LDFLAGS'] += ' -L{}'.format(self.ctx.python_recipe.link_root(arch.arch)) | ||
env['LDFLAGS'] += ' -lpython{}'.format(self.ctx.python_recipe.major_minor_version_string) |
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.
Hm does libffi actually depend on python? The old recipe doesn't seem to have done that other than for crystax, it just leaves me wondering why it is required? Or is libffi
a python-specific lib
(I'm just curious, not saying it's necessarily wrong or anything!)
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.
@opacam got any input on this particular question?
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.
That's a pretty valid concern @Jonast and definitely deserves some investigations. In the meantime this PR is already improving the current state while not bringing any regression to me.
I think we could merge and eventually address that later
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.
👍
' -lcrypto' + r.version | ||
|
||
openssl_recipe = Recipe.get_recipe('openssl', self.ctx) | ||
env['CFLAGS'] += openssl_recipe.include_flags(arch) |
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.
That seems clever, I like it! 👍
Edit: I previously wrote here that it doesn't work for me but my env is probably wrong and it works for others, please ignore |
I tried adding |
Worked for me. (on top of the current master). Just added libffi as first requirement in buildozer. |
…nto python-core-cryptography-cffi
Ok, I spotted this output: |
In the hostpython configure output I'm spotting: However, I still get above error and poked around in the build folder afterwards:
I don't know the exact folder layout very well, but I'd also expect
... and there's nothing like that in the entire folder structure:
|
Ah lol. I don't have |
Yes, you need libffi-dev for hostpython3 |
Can you give me your list of |
Aaa...I see, it's above... |
I just realized I installed |
No problem, let me know if you need help, today I'm going to bed 😴 |
👍 things also built for me now (with |
Because this is how you are supposed to do it, you must use LDFLAGS for linker flags and LDLIBS (or the equivalent LOADLIBES) for the libraries
This is one more part for the pr #1537 (discussed previously in #1460 and #1534)
Here I fix recipes cryptography and cffi (and touch some others which those depend on) to make it work with the core-update pull request, which also contains a new version of the openssl libs created by @tito. I tried to update the most of the packages to latest version and grants compatibility for both versions of python.
Note: this has to be merged only when the core-update has been merged because it depends on the new python2 recipe and the openssl libs (1.1)