我一直在尝试使用LibVLC for Android,我按照https://wiki.videolan.org/AndroidCompile的说明操作,让它完美地用于ARM。但是,在尝试将其编译为x86时,我设置了:
导出ANDROID_ABI = x86
然后以相同的方式编译,但现在我有一个问题,因为它无法编译。这是一个截断的构建日志:
~/vlc-android$ sh compile.sh
VLC source found
Building tools
You are ready to build VLC and its contribs
Building the contribs
Generating EGL pkg-config file
Generating GLESv2 pkg-config file
Guessing build system... x86_64-linux-gnu
Creating configuration file... config.mak
Bootstrap completed.
...
config.status: executing libtool commands
Type "make; make install" to compile and install Speex
cd speexdsp && make install
make[1]: Entering directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp'
Making install in libspeexdsp
make[2]: Entering directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp/libspeexdsp'
CC resample.lo
In file included from resample.c:104:0:
resample_neon.h:142:21: error: redefinition of 'inner_product_single'
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
^
In file included from resample.c:100:0:
resample_sse.h:40:21: note: previous definition of 'inner_product_single' was here
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
^
make[2]: *** [resample.lo] Error 1
make[2]: Leaving directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp/libspeexdsp'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp'
make: *** [.speexdsp] Error 2
据我所知,在该项目中由于某种原因,ARM头和SSE头都被包含在内,导致重新定义错误。但是,我不知道为什么或尝试修复它的原因。任何建议都会非常感激。
答案 0 :(得分:0)
Autoconf看起来不太正确,x86构建与NEON指令集无关,因此不应包含resample_neon.h。我还没有找到根本原因但是要快速解决方案,请在resample.c
下打开../vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp/libspeexdsp
并删除以下行:
...
#ifdef _USE_NEON
#include "resample_neon.h"
#endif
...
然后重新运行compile.sh,你应该得到一个适用于你的x86模拟器/设备的apk。