Skip to content

Gevent Crystax/Python3 support #1251

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
Apr 1, 2018

Conversation

AndreMiras
Copy link
Member

Makes sure the arm cross linker is being used for LDSHARED.
Fixes configure script complaining about CFLAGS and LDFLAGS and
simplified gevent.patch (less is more), since flags are now
sanitized during get_recipe_env() call.

Also depends on #1249 (symlink system Python to hostpython3crystax).

Makes sure the arm cross linker is being used for LDSHARED.
Fixes configure script complaining about CFLAGS and LDFLAGS and
simplified `gevent.patch` (less is more), since flags are now
sanitized during `get_recipe_env()` call.

Also depends on kivy#1249 (symlink system Python to hostpython3crystax).
def get_recipe_env(self, arch=None, with_flags_in_cc=True):
env = super(GeventRecipe, 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'
Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise the default host linker was picked up rather than the ARM cross compiler.

@@ -15,7 +15,7 @@ diff -Naur gevent-1.1.1/setup.py gevent-1.1.1_diff/setup.py
ares_configure_command = ' '.join(["(cd ", _quoted_abspath('c-ares/'),
" && if [ -r ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi ",
- " && /bin/sh ./configure " + _m32 + "CONFIG_COMMANDS= CONFIG_FILES= ",
+ " && /bin/sh ./configure --host={} ".format(os.environ['TOOLCHAIN_PREFIX']) + "CFLAGS= LDFLAGS= CONFIG_COMMANDS= CONFIG_FILES= ",
+ " && /bin/sh ./configure --host={} ".format(os.environ['TOOLCHAIN_PREFIX']) + "CONFIG_COMMANDS= CONFIG_FILES= ",
Copy link
Member Author

Choose a reason for hiding this comment

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

Sanitizing CFLAGS and LDFLAGS is now handled in get_recipe_env().

env['LIBS'] = ' -lm'
if self.ctx.ndk == 'crystax':
env['LIBS'] += ' -lcrystax -lpython{}m'.format(self.ctx.python_recipe.version[0:3])
env['LDSHARED'] += env['LIBS']
Copy link
Member Author

Choose a reason for hiding this comment

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

So that we don't get run time cannot locate symbol errors.

@inclement inclement merged commit cbad638 into kivy:master Apr 1, 2018
@inclement
Copy link
Member

Thanks!

@AndreMiras AndreMiras deleted the feature/gevent_crystax_python3 branch April 1, 2018 22:49
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.

2 participants