From 96784ed6c8c5c9f4ef0c56534c613eac1793ebe6 Mon Sep 17 00:00:00 2001 From: Wilber Date: Thu, 14 Jan 2021 10:54:59 +0800 Subject: [PATCH] fix compile error on ARM (#30398) --- python/setup.py.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/setup.py.in b/python/setup.py.in index adecb498f1..3c13f55d4d 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -278,11 +278,12 @@ else: # copy the openblas.dll shutil.copy('${OPENBLAS_SHARED_LIB}', libs_path) package_data['paddle.libs'] += ['openblas' + ext_name] - elif os.name == 'posix' and platform.machine() == 'aarch64': + elif os.name == 'posix' and platform.machine() == 'aarch64' and '${OPENBLAS_LIB}'.endswith('so'): # copy the libopenblas.so on linux+aarch64 # special: core_noavx.so depends on 'libopenblas.so.0', not 'libopenblas.so' - shutil.copy('${OPENBLAS_LIB}' + '.0', libs_path) - package_data['paddle.libs'] += ['libopenblas.so.0'] + if os.path.exists('${OPENBLAS_LIB}' + '.0'): + shutil.copy('${OPENBLAS_LIB}' + '.0', libs_path) + package_data['paddle.libs'] += ['libopenblas.so.0'] if '${WITH_LITE}' == 'ON': shutil.copy('${LITE_SHARED_LIB}', libs_path) -- GitLab