Greenlet Crystax/Python3 support, fixes #1245#1250
Closed
AndreMiras wants to merge 1 commit intokivy:masterfrom
Closed
Greenlet Crystax/Python3 support, fixes #1245#1250AndreMiras wants to merge 1 commit intokivy:masterfrom
AndreMiras wants to merge 1 commit intokivy:masterfrom
Conversation
Fixes CFLAGS, LDSHARED and LDFLAGS to point to Crystax.
AndreMiras
commented
Apr 1, 2018
| if self.ctx.ndk == 'crystax': | ||
| env['LDFLAGS'] += ' -L{}/sources/crystax/libs/{} -lcrystax'.format(self.ctx.ndk_dir, self.arch) | ||
| env['CFLAGS'] += ' -I{}/sources/python/{}/include/python/'.format( | ||
| self.ctx.ndk_dir, self.ctx.python_recipe.version[0:3]) |
Member
Author
There was a problem hiding this comment.
I believe other recipes should benefit from it.
AndreMiras
commented
Apr 1, 2018
| def get_recipe_env(self, arch=None, with_flags_in_cc=True): | ||
| env = super(GreenletRecipe, self).get_recipe_env(arch, with_flags_in_cc) | ||
| # sets linker to use the correct gcc (cross compiler) | ||
| env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions' |
Member
Author
There was a problem hiding this comment.
Otherwise the default host linker was picked up rather than the ARM cross compiler.
AndreMiras
commented
Apr 1, 2018
| # required additional library and path for Crystax | ||
| if self.ctx.ndk == 'crystax': | ||
| env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)) | ||
| env['LDFLAGS'] += ' -lpython{}m'.format(self.ctx.python_recipe.version[0:3]) |
Member
Author
There was a problem hiding this comment.
So that we don't get run time cannot locate symbol errors.
This was referenced Apr 1, 2018
|
Edit: unimportant confused comment 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes CFLAGS, LDSHARED and LDFLAGS to point to Crystax.
I've tested it with the following
main.pyon Android.It worked as expected, see
adb logcat | grep pythonoutput:And
buildozer.spec: