androID 编译 openfst openblas arm64
1 ubuntu 下载 androID-ndk-r21b-linux-x86_64.zip
2 下载Openblas-develop 和 openfst-1.6.7
cd / home/androID-ndk-r21b/build/tools
python make_standalone_toolchain.py --arch arm64 --API 21 --stl=libc++ --install-dir /tmp/my-androID-toolchain
export PATH=/tmp/my-androID-toolchain/bin:$PATH
cd openfst-1.6.7
CXX=clang++ ./configure --prefix=`pwd` --enable-static --enable-shared --enable-ngram-fsts --host=aarch64-linux-androID liBS="-ldl"
make -j 4
make install
cd OpenBLAS
根据官网编译 https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android Build ARMV8 with clang
# Set path to ndk-bundleexport NDK_BUNDLE_DIR=/home/androID-ndk-r21# Export PATH to contain directorIEs of clang and aarch64-linux-androID-* utilitIEsexport PATH=${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-androID-4.9/prebuilt/linux-x86_64/bin/:${NDK_BUNDLE_DIR}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH# Setup LDFLAGS so that loader can find libgcc and pass -lm for sqrtexport LDFLAGS="-L${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-androID-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-androID/4.9.x -lm"# Setup the clang cross compile optionsexport CLANG_FLAGS="-target aarch64-linux-androID --sysroot ${NDK_BUNDLE_DIR}/platforms/androID-23/arch-arm64 -gcc-toolchain ${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-androID-4.9/prebuilt/linux-x86_64/"# Compilemake TARGET=ARMV8 ONLY_CBLAS=1 AR=ar CC="clang ${CLANG_FLAGS}" HOSTCC=gcc -j4
会出现找不到 一些头文如 stdio.h , 将/ home/androID-ndk-r21b/ 目录的 sysroot/usr 的include 对应拷贝到 ${NDK_BUNDLE_DIR}/platforms/androID-23/arch-arm64/usr
总结以上是内存溢出为你收集整理的android 编译 openfst openblas arm64全部内容,希望文章能够帮你解决android 编译 openfst openblas arm64所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)