按照此处的说明,我构建了一个启用 Fortran 的 NDK 工具链(OSX,NDK-7b),目标是构建 LAPACK/BLAS。
使用带有 3.4.0 网络库源的 android-cmake 似乎我几乎成功了。但是,在链接其中一个测试时,BLAS 构建失败(错误指出 unresolved sincos
and sincosf
)。稍作搜索发现这些功能在旧版 Android 版本中不可用。我想知道解决这些功能的最佳方法是什么?
以下是链接错误的示例:
cd /Users/marc/software/lapack-3.4.0/Android/BLAS/TESTING && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/xblat2c.dir/link.txt --verbose=1 /opt/local/分享/java/android-ndk-macosx/toolchains/arm-linux-androideabi-4.7.0/prebuilt/darwin-x86/bin/arm-linux-androideabi-gfortran -Wl,--gc-sections-Wl,-z ,nocopyreloc -Wl,--fix-cortex-a8 -Wl,--no-undefined -lstdc++ -lsupc++ CMakeFiles/xblat2c.dir/cblat2.fo -o ../../bin/xblat2c -rdynamic -L/Users /marc/software/lapack-3.4.0/Android/systemlibs/armeabi-v7a -L/opt/local/share/java/android-ndk-macosx/toolchains/arm-linux-androideabi-4.7.0/prebuilt/darwin -x86/user/libs/armeabi-v7a ../../lib/libblas.a -lm -Wl,-rpath,/Users/marc/software/lapack-3.4.0/Android/systemlibs/armeabi-v7a: /opt/local/share/java/android-ndk-macosx/toolchains/arm-linux-androideabi-4.7。0/prebuilt/darwin-x86/user/libs/armeabi-v7a /opt/local/share/java/android-ndk-macosx/toolchains/arm-linux-androideabi-
4.7.0/prebuilt/darwin-x86/lib/gcc/arm-linux-androideabi/4.7.0/../../../../arm-linux-androideabi/lib/libgfortran.a(c99_functions. o): 在函数
cexpf': /opt/local/share/java/android-ndk-macosx/src/build/../gcc/gcc-4.7.0/libgfortran/intrinsics/c99_functions.c:910: undefined reference to
sincosf'