首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >构建LibVLC for x86

构建LibVLC for x86
EN

Stack Overflow用户
提问于 2014-10-28 13:14:46
回答 1查看 1.1K关注 0票数 6

我一直试图在安卓系统中使用LibVLC,我遵循了https://wiki.videolan.org/AndroidCompile的说明,并让它在ARM上工作得很好。但是,当试图将其编译为x86时,我设置:

导出ANDROID_ABI=x86

然后以同样的方式编译,但现在我遇到了一个问题,因为它无法编译。下面是一个截断的构建日志:

代码语言:javascript
运行
复制
~/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标头都包括在内,从而导致重新定义错误。然而,我不知道为什么,也不知道如何解决它。如有任何建议,将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-17 10:29:47

Autoconf看起来不太正确,x86构建与NEON指令集无关,因此不应该包含resample_neon.h。我还没有找到根本原因,但是要快速解决这个问题,请在resample.c下打开../vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp/libspeexdsp并删除以下行:

代码语言:javascript
运行
复制
...
#ifdef _USE_NEON
#include "resample_neon.h"
#endif
...

然后重新运行compile.sh,您应该为您的x86仿真器/设备获得一个工作apk。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26609320

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档