首先安装依赖库:
apt-get install -ylibdbus-1-dev lua5.1 liblua5.1-dev libmad0-dev libavcodec-dev libavformat-devlibswscale-dev libpostproc-dev liba52-dev libxcb1-dev libxcb-shm0-devlibxcb-xv0-dev libx11-xcb-dev libgl1-mesa-dev libqt4-dev libgcrypt11-dev
下载vlc,ftp://ftp.videolan.org/pub/videolan/vlc/
然后用最新的VLC-2.2.1编译,出现如下错误:
__builtin_unreachable,编译时出现这个错误!
在
#ifdef __GNUC__ //gcc编译器定义的一个宏
# definelikely(p) __builtin_expect(!!(p), 1)
# defineunlikely(p) __builtin_expect(!!(p), 0)
# defineunreachable() __builtin_unreachable()
#else
# definelikely(p) (!!(p))
# defineunlikely(p) (!!(p))
# defineunreachable() ((void)0)
#endif
GCC编译
typedef structfilter_owner_t
{
void *sys;
union
{
struct
{
picture_t * (*buffer_new)( filter_t* );
} video;
struct
{
subpicture_t * (*buffer_new)(filter_t * );
} sub;
};
} filter_owner_t;
认为定义有问题,如果修改的话,涉及的地方又比较多,实在难以处理。
而且,类似这样的定义很多,无法处理。
但编译vlc-1.1.7是通过的。
接着下载vlc-2.2.1编译就出现如下错误 :
CC video_chroma/libi420_rgb_mmx_plugin_la-i420_rgb16_x86.lo
video_chroma/i420_rgb16_x86.c:In function ‘I420_R5G6B5’:
video_chroma/i420_rgb16_x86.c:333:internal compiler error: in memory_address, at explow.c:493
V2.1.5也不行:
CC libdeinterlace_plugin_la-algo_x.lo
deinterlace/algo_x.c:In function ‘XDeintBand8x8MMXEXT’:
deinterlace/algo_x.c:503:internal compiler error: in memory_address, at explow.c:493
Please submit afull bug report,
with preprocessedsource if appropriate.
V2.1.2还是不行:
CC libdeinterlace_plugin_la-algo_x.lo
deinterlace/algo_x.c:In function ‘XDeintBand8x8MMXEXT’:
deinterlace/algo_x.c:503:internal compiler error: in memory_address, at explow.c:493
Please submit afull bug report,
with preprocessedsource if appropriate.
See
make[4]: ***[libdeinterlace_plugin_la-algo_x.lo] Error 1
make[4]: Leavingdirectory `/home/openipc/vlc-2.1.2/modules/video_filter'
V2.0.1编译正常:
make[2]: Enteringdirectory `/home/openipc/vlc-2.0.1'
GEN cvlc
GEN rvlc
GEN svlc
GEN qvlc
GEN vlc
make[2]: Leavingdirectory `/home/openipc/vlc-2.0.1'
make[1]: Leavingdirectory `/home/openipc/vlc-2.0.1'
vlc-2.0.9'编译正常:
GEN vlc
make[2]: Leavingdirectory `/home/openipc/vlc-2.0.9'
make[1]: Leavingdirectory `/home/openipc/vlc-2.0.9'
编译选项:
./configure--disable-lua --disable-mad --disable-avcodec --disable-avformat--disable-swscale --disable-postproc --disable-a52 --disable-mkv
实际上,就不要ffmpeg。如果包括进来的话,configure会出错:
checking forAVCODEC... yes
configure: error:libavcodec versions 55 and later are not supported yet.
配套的ffmpeg要退回到ffmpeg1.2.12。
1.2.12 was released on 2015-02-12. It is the latest stable FFmpegrelease from the 1.2 release branch, which was cut from master on 2013-03-07.Amongst lots of other changes, it includes all changes from ffmpeg-mt, libavmaster of 2013-03-07, libav 9 as of 2013-03-07.
It includes the following library versions:
libavutil 52. 18.100
libavcodec 54. 92.100
libavformat 54. 63.104
libavdevice 54. 3.103
libavfilter 3. 42.103
libavresample 1. 1. 0
libswscale 2. 2.100
libswresample 0. 17.102
libpostproc 52. 2.100