From b861dcff2ed7f00f282b3e49a8abf4546666985b Mon Sep 17 00:00:00 2001 From: Mikhail Zakharov Date: Wed, 6 Jan 2021 09:37:47 -0500 Subject: [PATCH 1/2] fix for armeabi-v7a --- pythonforandroid/recipes/lapack/__init__.py | 2 ++ pythonforandroid/recipes/scipy/__init__.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/lapack/__init__.py b/pythonforandroid/recipes/lapack/__init__.py index dc11672e0b..7a184d0cbf 100644 --- a/pythonforandroid/recipes/lapack/__init__.py +++ b/pythonforandroid/recipes/lapack/__init__.py @@ -5,6 +5,8 @@ from os.path import join import sh +# known to build with cmake version 3.19.2 and NDK r19c. See https://gitlab.kitware.com/cmake/cmake/-/issues/18739 + class LapackRecipe(Recipe): diff --git a/pythonforandroid/recipes/scipy/__init__.py b/pythonforandroid/recipes/scipy/__init__.py index 8753f3a365..de22a79c54 100644 --- a/pythonforandroid/recipes/scipy/__init__.py +++ b/pythonforandroid/recipes/scipy/__init__.py @@ -26,7 +26,7 @@ def get_recipe_env(self, arch): GCC_VER = '4.9' HOST = 'linux-x86_64' - LIB = 'lib64' + LIB = 'lib64' if '64' in arch.arch else 'lib' prefix = env['TOOLCHAIN_PREFIX'] lapack_dir = join(Recipe.get_recipe('lapack', self.ctx).get_build_dir(arch.arch), 'build', 'install') @@ -43,6 +43,8 @@ def get_recipe_env(self, arch): env['CPPFLAGS'] += f' --sysroot={sysroot} -I{sysroot_include}/c++/v1 -I{sysroot_include}' env['LDSHARED'] = 'clang' env['LDFLAGS'] += f' {LDSHARED_opts} --sysroot={sysroot} -L{libgfortran} -L{numpylib}' + env['LDFLAGS'] += f' -L{self.ctx.ndk_dir}/sources/cxx-stl/llvm-libc++/libs/{arch.arch}/' + return env From 78459ac016e003a98512d98207c434a5c706a2a3 Mon Sep 17 00:00:00 2001 From: Mikhail Zakharov Date: Wed, 6 Jan 2021 14:16:55 -0500 Subject: [PATCH 2/2] move comment to docstring --- pythonforandroid/recipes/lapack/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pythonforandroid/recipes/lapack/__init__.py b/pythonforandroid/recipes/lapack/__init__.py index 7a184d0cbf..e1dac95b35 100644 --- a/pythonforandroid/recipes/lapack/__init__.py +++ b/pythonforandroid/recipes/lapack/__init__.py @@ -1,3 +1,8 @@ +''' +known to build with cmake version 3.19.2 and NDK r19c. +See https://gitlab.kitware.com/cmake/cmake/-/issues/18739 +''' + from pythonforandroid.recipe import Recipe from pythonforandroid.logger import shprint from pythonforandroid.util import current_directory, ensure_dir, BuildInterruptingException @@ -5,8 +10,6 @@ from os.path import join import sh -# known to build with cmake version 3.19.2 and NDK r19c. See https://gitlab.kitware.com/cmake/cmake/-/issues/18739 - class LapackRecipe(Recipe):