【问题标题】:Failing to compile vlc for android无法为 android 编译 vlc
【发布时间】:2015-01-22 20:04:34
【问题描述】:

我正在根据 Ubuntu 14.04 上的以下建议为 Android 编译 VLC

https://wiki.videolan.org/AndroidCompile

export ANDROID_SDK=/home/user/my/tools/android-sdk
export ANDROID_NDK=/home/user/my/tools/android-ndk-r9c
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools
export ANDROID_ABI=armeabi-v7a
export NO_FPU=0

git clone git://git.videolan.org/vlc-ports/android.git
sh compile.sh

但我收到以下错误

gcc -std=gnu99  -I.     -g -O2 -MT freading.o -MD -MP -MF .deps/freading.Tpo -c -o freading.o freading.c
gcc -std=gnu99  -I.     -g -O2 -MT gl_list.o -MD -MP -MF .deps/gl_list.Tpo -c -o gl_list.o gl_list.c
mv -f .deps/gl_list.Tpo .deps/gl_list.Po
In file included from clean-temp.h:22:0,
                 from clean-temp.c:23:
./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^
gcc -std=gnu99  -I.     -g -O2 -MT localcharset.o -MD -MP -MF .deps/localcharset.Tpo -c -o localcharset.o localcharset.c
In file included from freadahead.h:18:0,
                 from freadahead.c:20:
./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^
In file included from freading.h:18:0,
                 from freading.c:20:
./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^
make[4]: *** [freading.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [freadahead.o] Error 1

我唯一没有尝试过的是更新 NDK 或切换到 CrystaX NDK。

PS 我有 NDK r9(根据项目页面上的建议),但在编译失败后我得到了最新的 r10d 和同样的问题。

git checkout tags/1.0.0git checkout tags/0.9.9

我有 Ubuntu 14.04 64 位。

【问题讨论】:

标签: android android-ndk libvlc


【解决方案1】:

我建议您从该 master 分支进行克隆,并且 master 中有错误,请尝试从另一个头克隆或使用标签进行概述,看看这里:
http://git.videolan.org/?p=vlc-ports/android.git;a=summary

【讨论】:

  • compile.sh 下载 VLC 源代码。有以下一行:TESTED_HASH=036010e最喜欢下载正确的版本。
  • 我不是说下载失败我是说master分支的当前源码有错误,所以你应该尝试克隆另一个分支
  • 我遇到了git checkout tags/1.0.0git checkout tags/0.9.9 同样的问题。
猜你喜欢
  • 2016-08-26
  • 1970-01-01
  • 2013-12-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-02
相关资源
最近更新 更多