android-vlc 编译过程中遇到的问题

时间:2022-06-27 15:54:30

vlc-android 源码下载及主要编译过程可以参考vlc官方微博,地址如下:
https://wiki.videolan.org/AndroidCompile

在vlc-android编译过程中,我遇到了很多问题,在此记录一下:

1 vlc依赖库a52dec编译时报错,如下:
mkdir -p – /home/chen/workspace/vlc-android/vlc/contrib/x86_64-linux-android/share/aclocal && cd a52dec && autoreconf -fiv -I/home/chen/workspace/vlc-android/vlc/contrib/x86_64-linux-android/share/aclocal
autoreconf: Entering directory `.’
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal -I /home/chen/workspace/vlc-android/vlc/contrib/x86_64-linux-android/share/aclocal –force
aclocal: warning: autoconf input should be named ‘configure.ac’, not ‘configure.in’
autoreconf: configure.in: tracing
autoreconf: configure.in: not using Libtool
autoreconf: running: /home/chen/workspace/vlc-android/vlc/extras/tools/build/bin/autoconf –include=/home/chen/workspace/vlc-android/vlc/contrib/x86_64-linux-android/share/aclocal –force
configure.in:74: error: possibly undefined macro: AC_DISABLE_SHARED
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:75: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.in:76: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /home/chen/workspace/vlc-android/vlc/extras/tools/build/bin/autoconf failed with exit status: 1
make: * [.a52] Error 1
contribs: make failed

解决办法:
apt-get install libtool 安装libtool,若问题还未得到解决,进到 vlc/contrib/contrib-android-x86_64-linux-android(注:因为我指定的平台是x86_64所以是这个目录,如果制定其他平台,则路径替换为 vlc/contrib/contrib-android-host-linux-android)目录,打开Makefile,找到
PATH := (abspath../../extras/tools/build/bin): (PATH)
export PATH
注释掉这两行,然后在当前目录下执行
export PATH=$PATH:/opt/android-ndk-r12b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin
make -j1
make install
中间可能遇到遇到一些错误,大部分都是需要升级或安装一些工具,依赖库等
编译完成后,回到vlc-android目录下,重新执行
sh compile.sh -a x86_64