From b3b1092640bcb575b14a5f2207026378e3c0fa38 Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Mon, 26 Dec 2022 03:13:45 +0800 Subject: [PATCH] python-numpy: link against libandroid-complex-math To fix the following error on Android 7. dlopen failed: cannot locate symbol "csinl" referenced by "@TERMUX_PREFIX@/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311.so" --- packages/python-numpy/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/python-numpy/build.sh b/packages/python-numpy/build.sh index 37b30dda6b..01ff9ea9ff 100644 --- a/packages/python-numpy/build.sh +++ b/packages/python-numpy/build.sh @@ -3,8 +3,9 @@ TERMUX_PKG_DESCRIPTION="The fundamental package for scientific computing with Py TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="1.24.0" +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/numpy/numpy.git -TERMUX_PKG_DEPENDS="libc++, libopenblas, python" +TERMUX_PKG_DEPENDS="libandroid-complex-math, libc++, libopenblas, python" TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_AUTO_UPDATE=true TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag" @@ -31,7 +32,7 @@ termux_step_configure() { . ${_CROSSENV_PREFIX}/bin/activate build-pip install wheel - LDFLAGS+=" -lpython${_PYTHON_VERSION} -lm" + LDFLAGS+=" -lpython${_PYTHON_VERSION} -landroid-complex-math -lm" build-pip install pybind11 Cython pythran wheel }