huawei-noah / bolt

Bolt is a deep learning library with high performance and heterogeneous flexibility.
https://huawei-noah.github.io/bolt/
MIT License
918 stars 160 forks source link

llvm-ranlib问题 #72

Open DekkerXu opened 3 years ago

DekkerXu commented 3 years ago

$ ./install.sh --target=android-aarch64 --gpu [ERROR] please install llvm-ranlib tools and set shell environment PATH to find it

新版本中编译过程用到的llvm-ranlib在ndkr20版本中,不存在,应当为llvm-ar,可以复制粘贴重命名一下,建议修改一下install.sh脚本

yuxianzhi commented 3 years ago

好的,感谢

yuxianzhi commented 3 years ago

原始代码:

if [[ "${target}" == "android-aarch64" ]]; then CC="clang --target=aarch64-linux-android21" CXX="clang++ --target=aarch64-linux-android21" STRIP=aarch64-linux-android-strip AR=aarch64-linux-android-ar RANLIB=aarch64-linux-android-ranlib checkExe ${AR} if [[ $? == 0 ]]; then STRIP=llvm-strip AR=llvm-ar RANLIB=llvm-ranlib fi CONFIGURE_OPTIONS="--host=arm-linux --enable-neon" CCFLAGS="${CCFLAGS} --target=aarch64-linux-android21" androidNDKIsValid ${AR} fi

android-ndk-r20, 如果是设置ANDROID_NDK_ROOT环境变量,会执行RANLIB=aarch64-linux-android-ranlib,这个脚本应该是存在的。

android-ndk-r23,aarch64-linux-android-*前缀的脚本是不存在的,会执行RANLIB=llvm-ranlib

按照这个逻辑,您在运行前没有设置ANDROID_NDK_ROOT环境变量?同时系统有llvm的工具,会导致您的这个错误?