From ad8573da2a4616804f12ac960e7e9ea3397426ce Mon Sep 17 00:00:00 2001 From: Denis Date: Sat, 18 Mar 2017 10:51:22 +0300 Subject: [PATCH] Fixed protobuf cpp --- pythonforandroid/recipes/protobuf_cpp/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/protobuf_cpp/__init__.py b/pythonforandroid/recipes/protobuf_cpp/__init__.py index 9d3060d442..53ac8fd080 100644 --- a/pythonforandroid/recipes/protobuf_cpp/__init__.py +++ b/pythonforandroid/recipes/protobuf_cpp/__init__.py @@ -1,6 +1,7 @@ from pythonforandroid.recipe import PythonRecipe from pythonforandroid.logger import shprint -from pythonforandroid.util import current_directory +from pythonforandroid.util import current_directory, shutil +from pythonforandroid.util import ensure_dir from os.path import exists, join, dirname import sh from multiprocessing import cpu_count @@ -37,6 +38,10 @@ def build_arch(self, arch): shprint(sh.make, 'libprotobuf.la', '-j'+str(cpu_count()), _env=env) shprint(sh.cp, '.libs/libprotobuf.a', join(self.ctx.get_libs_dir(arch.arch), 'libprotobuf.a')) + # Copy stl library + shutil.copyfile(self.ctx.ndk_dir + '/sources/cxx-stl/gnu-libstdc++/' + self.ctx.toolchain_version + '/libs/' + arch.arch + '/libgnustl_shared.so', + join(self.ctx.get_libs_dir(arch.arch), 'libgnustl_shared.so')) + # Build python bindings and _message.so with current_directory(join(self.get_build_dir(arch.arch), 'python')): hostpython = sh.Command(self.hostpython_location)