8000 Fixed libzqm recipe linking issues (#1803) · matrix-io/python-for-android@e4cecb1 · GitHub
[go: up one dir, main page]

Skip to content

Commit e4cecb1

Browse files
hpsaturnAndreMiras
authored andcommitted
Fixed libzqm recipe linking issues (kivy#1803)
* fixed crtbegin_so.o crtend_so.o link errors adding sysroot compiler option * updated ZMQ library version from github releases * a little fixes on env vars * added method for include directories * fixed conversion to bytes on config str write * fixed concatenation string issue changed to format directive
1 parent 12aa76c commit e4cecb1

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

pythonforandroid/recipes/libzmq/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66

77
class LibZMQRecipe(Recipe):
8-
version = '4.1.4'
9-
url = 'http://download.zeromq.org/zeromq-{version}.tar.gz'
8+
version = '4.3.1'
9+
url = 'https://github.com/zeromq/libzmq/releases/download/v{version}/zeromq-{version}.zip'
1010
depends = []
1111

1212
def should_build(self, arch):
@@ -31,14 +31,14 @@ def build_arch(self, arch):
3131
bash = sh.Command('sh')
3232
shprint(
3333
bash, './configure',
34-
'--host=arm-linux-androideabi',
34+
'--host={}'.format(arch.command_prefix),
3535
'--without-documentation',
3636
'--prefix={}'.format(prefix),
3737
'--with-libsodium=no',
3838
_env=env)
3939
shprint(sh.make, _env=env)
4040
shprint(sh.make, 'install', _env=env)
41-
shutil.copyfile('.libs/libzmq.so', join(
41+
shutil.copyfile('src/.libs/libzmq.so', join(
4242
self.ctx.get_libs_dir(arch.arch), 'libzmq.so'))
4343

4444
bootstrap_obj_dir = join(self.ctx.bootstrap.build_dir, 'obj', 'local', arch.arch)
@@ -55,6 +55,9 @@ def build_arch(self, arch):
5555
self.ctx.get_libs_dir(arch.arch)
5656
)
5757

58+
def get_include_dirs(self, arch):
59+
return [join(self.get_build_dir(arch.arch), 'include')]
60+
5861
def get_recipe_env(self, arch):
5962
# XXX should stl be configuration for the toolchain itself?
6063
env = super(LibZMQRecipe, self).get_recipe_env(arch)
@@ -69,6 +72,8 @@ def get_recipe_env(self, arch):
6972
env['CXXFLAGS'] += ' -lgnustl_shared'
7073
env['LDFLAGS'] += ' -L{}/sources/cxx-stl/gnu-libstdc++/{}/libs/{}'.format(
7174
self.ctx.ndk_dir, self.ctx.toolchain_version, arch)
75+
env['CXXFLAGS'] += ' --sysroot={}/platforms/android-{}/arch-arm'.format(
76+
self.ctx.ndk_dir, self.ctx.ndk_api)
7277
return env
7378

7479

pythonforandroid/recipes/pyzmq/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def build_cython_components(self, arch):
4343
[global]
4444
zmq_prefix = {}
4545
skip_check_zmq = True
46-
""".format(libzmq_prefix))
46+
""".format(libzmq_prefix).encode())
4747

4848
return super(PyZMQRecipe, self).build_cython_components(arch)
4949

0 commit comments

Comments
 (0)
0