谷歌最近宣布了一项政策,要求对支持库进行重新编译,以获得64位支持,因此我希望最近也有其他人走上了这条道路。
我正在为Android64bit ARM编译Speex 1.2。我能够构建speex,但是speexdsp失败了。
以下是我所采取的步骤,然后是失败:
PATH设置为首先查看工具链的bin目录
导出路径=~/speex-工具链/bin:$PATHCC和RANLIB env (可能没有必要?)
导出CC=aarch64-linux-android-gcc导出RANLIB=aarch64-linux-android-ranlib./configure --host=armmake使失败:
make all-recursive
make[1]: Entering directory `/Users/spartygw/Downloads/speexdsp-1.2rc3'
Making all in libspeexdsp
make[2]: Entering directory `/Users/spartygw/Downloads/speexdsp-1.2rc3/libspeexdsp'
CC preprocess.lo
CC jitter.lo
CC mdf.lo
CC fftwrap.lo
CC filterbank.lo
CC resample.lo
In file included from resample.c:104:0:
resample.c: In function 'resampler_basic_direct_single':
resample_neon.h:148:5: error: impossible constraint in 'asm'
asm volatile (" cmp %[len], #0\n"
^
make[2]: *** [resample.lo] Error 1
make[2]: Leaving directory `/Users/spartygw/Downloads/speexdsp-1.2rc3/libspeexdsp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/spartygw/Downloads/speexdsp-1.2rc3'
make: *** [all] Error 2发布于 2019-02-08 07:13:43
与步骤3和步骤4不同,我建议只执行./configure --host=aarch64-linux-android,它负责选择正确的工具,并使目标体系结构正确。
至于主要的问题,编译错误,问题似乎是speexdsp确实支持NEON ( ARM的SIMD指令集),但是它以一种方式检测它(通过测试#include <arm_neon.h>是否工作,以及NEON编译器的本质是否工作,这对于ARM和AArch64都同样工作)。一旦得出支持霓虹灯的结论,它就会通过内联组装( ARM和AArch64不同)继续使用它。
因此得出的结论是speexdsp只支持ARM上的NEON (32位),而不支持64位,但是speexdsp的配置脚本也为AArch64提供了错误的支持。将--disable-neon添加到配置调用中,编译就会成功。
https://stackoverflow.com/questions/54581564
复制相似问题