CentOS6.2下编译xbmc

下载 xbmc,下载地址为  http://ftp.sunet.se/pub/multimedia/xbmc/releases/source/xbmc-12.1.tar.gz

执行  ./configure :


第一次碰到的错误如下:


configure: Using Python 2.6
checking for main in -lGL... yes
checking for main in -lGLEW... no
configure: error: Could not find a required library. Please see the README for your platform.
[root@localhost xbmc-12.1]# 

到sourceforge.net上下载并安装glew库

http://nchc.dl.sourceforge.net/project/glew/glew/1.9.0/glew-1.9.0.tgz


第二次碰到的错误如下:

checking for main in -lGL... yes
checking for main in -lGLEW... yes
checking for main in -lGLU... yes
checking for mysql_config... /usr/bin/mysql_config
checking ass/ass.h usability... no
checking ass/ass.h presence... no
checking for ass/ass.h... no
configure: error: Could not find a required library. Please see the README for your platform.
[root@localhost xbmc-12.1]# 

该错误是缺少 libass 库, 下载地址为  http://libass.googlecode.com/files/libass-0.10.1.tar.gz

安装 libass库时, 又提示如下错误


checking for FREETYPE... yes
checking for FRIBIDI... configure: error: Package requirements (fribidi >= 0.19.0) were not met:

No package 'fribidi' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FRIBIDI_CFLAGS
and FRIBIDI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

该错误是缺少 Fribidi库, 下载地址为  http://fribidi.org/download/fribidi-0.19.5.tar.bz2

安装完毕 fribidi库之后, 再安装libass,

还是提示上面的错误, 原因是 PKG_CONFIG_PATH环境变量配置不正确,

像下面这样配置一下即可。

[root@localhost libass-0.10.1]# find / -name pkgconfig
/usr/lib/pkgconfig
/usr/local/lib/pkgconfig
/usr/lib64/pkgconfig
/usr/share/pkgconfig

[root@localhost libass-0.10.1]# 
[root@localhost libass-0.10.1]# find / -name pkg-config
/usr/bin/pkg-config

[root@localhost libass-0.10.1]# 
[root@localhost libass-0.10.1]# export PKG_CONFIG=/usr/bin/pkg-config
[root@localhost libass-0.10.1]# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

第三次碰到的错误如下 :

checking for ass/ass.h... yes
checking mpeg2dec/mpeg2.h usability... no
checking mpeg2dec/mpeg2.h presence... no
checking for mpeg2dec/mpeg2.h... no
configure: error: Could not find a required library. Please see the README for your platform.

缺少libmpeg2这个库,下载地址为 http://dldx.csdn.net/fd.php?i=745950618472611&s=5050e77eeb594d67be6b3350ce6323f0

下载安装好后继续。

第四次碰到的错误如下 :

checking mpeg2dec/mpeg2.h usability... yes
checking mpeg2dec/mpeg2.h presence... yes
checking for mpeg2dec/mpeg2.h... yes
checking for mpeg2dec/mpeg2convert.h... yes
checking mad.h usability... no
checking mad.h presence... no
checking for mad.h... no
configure: error: Could not find a required library. Please see the README for your platform.

该错误是缺少 libmad 库, 下载地址为 http://nchc.dl.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz

那就下载安装吧,但是 make libmad的时候出如下错误

cc1: error: unrecognized command line option "-fforce-mem"
make[2]: *** [version.lo] 错误 1
make[2]: Leaving directory `/root/libmad-0.15.1b'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/libmad-0.15.1b'
make: *** [all] 错误 2

编辑 Makefile 文件, 查找到 
"-fforce-mem"
将其删除, 然后再make即可。

第五次碰到的错误如下 :

checking samplerate.h usability... no
checking samplerate.h presence... no
checking for samplerate.h... no
configure: error: Could not find a required library. Please see the README for your platform.
[root@localhost xbmc-12.1]# 
该错误是缺少  libsamplerate-devel  库,

执行   yum install libsamplerate-devel  进行安装。


第六次碰到的错误如下 :

checking ogg/ogg.h usability... no
checking ogg/ogg.h presence... no
checking for ogg/ogg.h... no
configure: error: Could not find a required library. Please see the README for your platform.
[root@localhost xbmc-12.1]# 

该错误是缺少  libogg-devel 库,

执行  yum install libogg-devel  进行安装。


第七次碰到的错误如下 :

checking vorbis/vorbisfile.h usability... no
checking vorbis/vorbisfile.h presence... no
checking for vorbis/vorbisfile.h... no
configure: error: Could not find a required library. Please see the README for your platform.

缺少 libvorbis-devel 库, 执行  yum  install  libvorbis-devel  命令进行安装。


第八次碰到的错误如下 :

checking libmodplug/modplug.h usability... no
checking libmodplug/modplug.h presence... no
checking for libmodplug/modplug.h... no
configure: error: Could not find a required library. Please see the README for your platform.

缺少 libmodplug库, 下载地址为  http://nchc.dl.sourceforge.net/project/modplug-xmms/libmodplug/0.8.8.4/libmodplug-0.8.8.4.tar.gz

下载安装吧。


第九次碰到的错误如下 :

checking FLAC/stream_decoder.h usability... no
checking FLAC/stream_decoder.h presence... no
checking for FLAC/stream_decoder.h... no
configure: error: Could not find a required library. Please see the README for your platform.
该错误是缺少 FLAC库, 下载
下载地址   :

http://xiph.org/flac/download.html

http://sourceforge.net/projects/flac/files/flac-src/

真实的下载地址为  http://ncu.dl.sourceforge.net/project/flac/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz

下载后安装了继续。


第十次碰到的错误如下 :

checking for main in -lbz2... yes
checking for main in -ljpeg... yes
checking for main in -ltiff... no
configure: error: Could not find a required library. Please see the README for your platform.

缺少 libtiff 库,找下载地址,

下载地址为  http://download.osgeo.org/libtiff/ 

我选择的版本为  http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz

下载安装后继续。


第十一次碰到的错误如下 :

checking for main in -lpthread... yes
checking for main in -llzo2... no
configure: error: Could not find a required library. Please see the README for your platform.
缺少  liblzo2 这个库。
官方地址为  http://www.oberhumer.com/opensource/lzo/

下载地址为  http://www.oberhumer.com/opensource/lzo/download/

下载的文件为  http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz

安装后再继续。


第十二次碰到的错误如下 :

checking for hci_devid in -lbluetooth... no
Could not find suitable version of libbluetooth
checking for main in -lyajl... no
configure: error: Could not find a required library. Please see the README for your platform.
下载  blue, 官网地址为   http://www.bluez.org/download/

文件下载地址为   https://www.kernel.org/pub/linux/bluetooth/bluez-4.101.tar.xz 

不要下载最新的 bluez-5.2.tar.xz 

解压命令为   

xz  -d  bluez-4.101.tar.xz

tar  -xvf   bluez-4.101.tar.xz

然后执行  ./configure 安装 bluez 包

碰到错误为 :

checking for DBUS... no
configure: error: D-Bus >= 1.4 is required

D-BUS的官网地址为   http://www.freedesktop.org/wiki/Software/dbus#Download

下载地址为  http://dbus.freedesktop.org/releases/dbus/


安装DBUS碰到下面的错误:

checking for XML_ParserCreate_MM in -lexpat... no
configure: error: Could not find expat.h, check config.log for failed attempts

执行如下命令即可:

[root@localhost dbus-1.6.4]# yum install expat-devel

下来安装 bluez 又碰到了  

checking for GLIB... no
configure: error: GLib >= 2.28 is required

如果碰到这个错误, 就要小心了, GLib库不能乱更新, 否则会把系统相关的很多进程搞得无法运行。

看来还是 bluez的版本太高了, 重新下载 更老的版本吧。

下载地址为 :http://bluez.sf.net/download/bluez-libs-3.36.tar.gz

这个老的版本安装很顺利。

下来在解决下面这个错误 :

checking for main in -lyajl... no
执行命令   yum install yajl-devel   即可解决该错误。

然后继续。


第十三次碰到的错误如下:

checking for main in -ltinyxml... no
configure: error: Could not find a required library. Please see the README for your platform.

tinyxml的官网为  http://www.grinninglizard.com/tinyxml/index.html

下载地址为 :http://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.zip

这个库的编译我就不说了,因为没有 Makefile文件,所以自己编译个静态库, 复制到  /usr/lib/目录即可。


第十四次碰到的错误如下:

checking for CDIO... no
configure: error: Could not find a required library. Please see the README for your platform.
要疯了, 没玩没了的依赖库啊。上帝啊。

缺少 libcdio库, 该库的官网为  http://www.gnu.org/software/libcdio/

下载地址为   https://savannah.gnu.org/git/?group=libcdio

得通过git下载,命令如下:

git clone git://git.savannah.gnu.org/libcdio.git

然后   cd   libcdio

然后   ./autogen.sh
然后   make

然后   make   install

即可成功。


第十五次碰到的错误如下:

checking for TAGLIB... no
configure: error: Could not find a required library. Please see the README for your platform.

缺少库  TAGLIB,官网地址为   http://taglib.github.io/

文件下载地址为   :  http://taglib.github.io/releases/taglib-1.8.tar.gz

该 taglib 库要用CMake来编译,CMake的编译命令如下所示 :

  cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_RELEASE_TYPE=Release
  make
  make install

我用命令 yum  install  cmake 安装了 2.6版本的cmake, 然后执行

cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_RELEASE_TYPE=Release
出现了如下错误:

-- Ensure you cppunit installed version is at least 1.12.0
CMake Error at CMakeLists.txt:98 (file):
  file does not recognize sub-command COPY

官方说是个BUG, 那就下载最新的2.8版本吧。

下载了最新版本2.8的CMAKE后, 执行

./configure --prefix=/usr

gmake

gmake   install

cmake  --version  

显示如下:

[root@localhost cmake-2.8.10.2]# cmake --version
cmake version 2.8.10.2

安装cmake成功。

下来进入到  taglib-1.8目录执行编译命令, 很顺利,成功了。

下来继续吧。


第十六次碰到的错误如下:

checking for TAGLIB... yes
checking for LIBBLURAY... no
checking for main in -ldl... yes
checking for main in -lresolv... yes
checking for main in -ljasper... no
configure: error: Could not find a required library. Please see the README for your platform.
缺少库  libjasper, 执行命令 

yum  install  libjasper-devel    

进行安装, 然后继续。


第十七次碰到的错误如下:

checking for SDL... no
configure: error: Could not find a required library. Please see the README for your platform.

缺少库  SDL, 执行命令

yum   install   SDL-devel

进行安装, 然后再继续。

这次又碰到了下面的错误:

checking for main in -lSDL_image... no
configure: error: Could not find a required library. Please see the README for your platform.
缺少 库 SDL_image, 找到下载地址   http://www.libsdl.org/projects/SDL_image/

下载地址为   http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz 

下载后安装。然后再继续。


第十八次碰到的错误如下:

checking for main in -lmicrohttpd... no
configure: error: Could not find a required library. Please see the README for your platform.
然后再下载 libmicrohttpd 这个库进行安装。


第十九次碰到的错误如下:

configure: == ProjectM enabled. ==
checking for sftp_tell64 in -lssh... no
configure: error: == Could not find libssh. ==

缺少 libssh库, 官网为   http://www.libssh.org/get-it/

文件下载地址为 :http://www.libssh.org/files/0.5/ 

下载    http://www.libssh.org/files/0.5/libssh-0.5.3.tar.gz  文件

要用CMake进行安装。

执行cmake相关命令, 碰到如下错误:

[root@localhost build]# cmake /root/libssh-0.5.3/ -DCMAKE_INSTALL_PREFIX=/usr
CMake Error at cmake/Modules/MacroEnsureOutOfSourceBuild.cmake:13 (message):
  libssh requires an out of source build.  Please create a separate build
  directory and run 'cmake /path/to/libssh [options]' there.
Call Stack (most recent call first):
  CMakeLists.txt:40 (macro_ensure_out_of_source_build)


CMake Error at cmake/Modules/MacroEnsureOutOfSourceBuild.cmake:14 (message):
  Remove the file CMakeCache.txt in /root/libssh-0.5.3 first.
Call Stack (most recent call first):
  CMakeLists.txt:40 (macro_ensure_out_of_source_build)


-- Configuring incomplete, errors occurred!

执行命令 

[root@localhost libssh-0.5.3]# vi CMakeLists.txt
修改CMakeLists.txt文件中的下面的部分, 直接注释掉即可。

# disallow in-source build
include(MacroEnsureOutOfSourceBuild)
#macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")

然后再cmake 即可成功。

然后继续。


第二十次碰到的错误如下:

checking librtmp/log.h usability... no
checking librtmp/log.h presence... no
checking for librtmp/log.h... no
configure: == Could not find libRTMP. RTMP support disabled. ==
checking librtmp/amf.h usability... no
checking librtmp/amf.h presence... no
checking for librtmp/amf.h... no
checking librtmp/rtmp.h usability... no
checking librtmp/rtmp.h presence... no
checking for librtmp/rtmp.h... no
checking for main in -lsmbclient... no
configure: error: Could not find a required library. Please see the README for your platform.
缺少 librtmp 库  和 samba 库。

1.安装 librtmp库

网上找不到 librtmp库, 费了一番功夫, 找到一个方法:

Install Howto

    Create the repository config file /etc/yum.repos.d/linuxtech.repo:

    [linuxtech]
    name=LinuxTECH
    baseurl=http://pkgrepo.linuxtech.net/el6/release/
    enabled=1
    gpgcheck=1
    gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET

    Install librtmp rpm package:

    # yum install librtmp

上面配置好以后, 执行

yum  install  librtmp-devel   即可OK了。


2.安装samba库

samba库倒是好安装, 问题是生成不了   libsmbclient.a,  生成的都是动态库so文件。郁闷了好久找不到办法。

yum  install  libsmbclient-devel  也成功了, 就是没有 libsmbclient.a 这个静态库文件。

最后下载了  libsmbclient-devel.rpm 包, 然后执行命令

rpm2cpio *.rpm | cpio -div   解压出  rpm 包里的文件, 复制 libsmbclient.a 文件 到  /usr/lib64/目录

这关是过了, 但是不知道以后会不会有问题。继续吧。


第二十一次碰到的错误如下:

checking vdpau/vdpau.h usability... no
checking vdpau/vdpau.h presence... no
checking for vdpau/vdpau.h... no
== Could not find libvdpau. VDPAU support disabled. ==
checking for main in -lva... no
== Could not find libva. VAAPI support disabled. ==
checking libcrystalhd/libcrystalhd_if.h usability... no
checking libcrystalhd/libcrystalhd_if.h presence... no
checking for libcrystalhd/libcrystalhd_if.h... no
== Could not find libcrystalhd. CrystalHD support disabled. ==
checking for libcrystalhd soname... /usr/bin/ld: mode elf_x86_64
./configure: line 24965: [: too many arguments
no
configure: WARNING: Unable to determine soname of libcrystalhd library
configure: WARNING: libcrystalhd support disabled
configure: == VDADecoder support manually disabled. ==
configure: == VTBDecoder support manually disabled. ==
configure: == OpenMax support manually disabled. ==
checking yajl/yajl_version.h usability... no
checking yajl/yajl_version.h presence... no
checking for yajl/yajl_version.h... no
checking for gawk... yes
checking for cmake... yes
checking for gperf... no
configure: error: Could not find a required program. Please see the README for your platform.

执行命令

yum install libcrystalhd-devel

yum install gperf


到此, ./configure 命令总是是成功了, 不知道编译的时候还会出啥幺蛾子。


编译的时候碰到如下错误:

DVDStateSerializer.cpp: In static member function ‘static bool CDVDStateSerializer::DVDToXMLState(std::string&, const dvd_state_t*)’:
DVDStateSerializer.cpp:207: 错误:no match 为‘operator<<’在‘stream << xmlDoc’中
这个错误的原因是  :

tinyxml.h 头文件中没有定义  TIXML_USE_STL

添加 

#define    TIXML_USE_STL  1

即可make成功。

/root/xbmc/

你可能感兴趣的:(CentOS6.2下编译xbmc)