环境 ubuntu14.0 arm开发板
源
1 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty main multiverse restricted universe 2 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-backports main multiverse restricted universe 3 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-proposed main multiverse restricted universe 4 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-security main multiverse restricted universe 5 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-updates main multiverse restricted universe 6 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty main multiverse restricted universe 7 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-backports main multiverse restricted universe 8 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-proposed main multiverse restricted universe 9 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-security main multiverse restricted universe 10 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-updates main multiverse restricted universe 11 deb http://ports.ubuntu.com precise main restricted universe multiverse 12 deb-src http://ports.ubuntu.com/ubuntu-ports/ precise main universe
源码下载地址 http://mirrors.neusoft.edu.cn/videolan/vlc/2.2.4/vlc-2.2.4.tar.xz
wget http://mirrors.neusoft.edu.cn/videolan/vlc/2.2.4/vlc-2.2.4.tar.xz
安装依赖库
apt-get install liblua5.1-0-dev liblua50-dev liblualib50-dev liblivemedia-dev libogg-dev libmad0-dev libfaad-dev liba52-dev libflac-dev apt-get install libmpeg2-4-dev
tar xf vlc-2.2.4.tar.xz
cd vlc-2.2.4
./configure --prefix=/usr/local/vlc --enable-run-as-root --enable-x11 --enable-xvideo --disable-gtk --enable-sdl --enable-avcodec --enable-avformat --enable-swscale --enable-mad --enable-libdvbpsi --enable-a52 --enable-libmpeg2 --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-live555 --with-live555-tree=/usr/lib/live --enable-caca --enable-skins --enable-alsa --disable-kde --enable-ncurses --enable-release --disable-qt4
make && make install
错误:
configure: error: Library ogg vorbis >= 1.1 vorbisenc >= 1.1 needed for vorb
解决方法: apt-get install libvorbis-dev
configure: error: Library ogg speex >= 1.0.5 needed for speex was not found
apt-get install libspeex-dev
configure: error: Library ogg theoradec >= 1.0 theoraenc needed for theora was not found
apt-get install libtheora-dev
configure: error: Library caca >= 0.99.beta14 needed for caca was not found
apt-get install libcaca-dev
configure: error: No package 'alsa' found. alsa-lib 1.0.24 or later required.
apt-get install libalsa-ocaml-dev
configure: error: No package 'ncursesw' found
apt-get install libncursesw5-dev
configure: error: libgcrypt version 1.1.94 or higher not found. Install libgcrypt or pass --disable-libgcrypt.
apt-get install libgcrypt-dev
错误
make[4]: 正在进入目录 `/root/vlc-2.2.4/modules'
CC codec/avcodec/libavcodec_plugin_la-avcodec.lo
codec/avcodec/avcodec.c: In function ‘CloseDecoder’:
codec/avcodec/avcodec.c:365:9: error: implicit declaration of function ‘av_free’ [-Werror=implicit-function-declaration]
av_free( p_sys->p_context->extradata );
^
codec/avcodec/avcodec.c: In function ‘ffmpeg_OpenCodec’:
codec/avcodec/avcodec.c:407:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
else if (p_sys->p_context->width != p_dec->fmt_in.video.i_width)
^
codec/avcodec/avcodec.c:411:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
else if (p_sys->p_context->height != p_dec->fmt_in.video.i_height)
^
cc1: some warnings being treated as errors
make[4]: *** [codec/avcodec/libavcodec_plugin_la-avcodec.lo] 错误 1
make[4]:正在离开目录 `/root/vlc-2.2.4/modules'
make[3]: *** [all-recursive] 错误 1
make[3]:正在离开目录 `/root/vlc-2.2.4/modules'
make[2]: *** [all] 错误 2
make[2]:正在离开目录 `/root/vlc-2.2.4/modules'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/root/vlc-2.2.4'
make: *** [all] 错误 2
解决方法:
修改文件
vi /root/vlc-2.2.4/modules/Makefile
在2640行 删除 -Werror-implicit-function-declaration