配置ARM平台的Qt遇到过很多困难,特别是增加phonon支持,更是麻烦,
编译phonon之前,必须先编译必要的依赖包,否则不会成功,
其中设置PKG_CONFIG_PATH很关键,让后面安装的包可以找到包依赖
phonon依赖以下几个包,所以先安装,我把这几个包全部安装在/opt/gst/:
- libxml2 v2.7.7 or later
- libcheck v0.9.8 or later
- liboil v0.3.2 or later
- gstreamer v0.10.0 or later
- gst-plugins-base v0.10.0 or later
其中liboil又依赖glib,所以安装liboil之前应该先安装glib
/home/cody/gst是编译的主目录,如果出现没找到某某包的错误,应先检查PC Linux环境是否已经安装相应的包
cd /home/cody/gst
export PKG_CONFIG_PATH=/opt/gst/lib/pkgconfig
libxml2

wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz
tar xvf libxml2-2.7.2.tar.gz
cd libxml2-2.7.2
./configure CROSS_COMPILE=arm-linux- --host=arm-linux --prefix=/opt/gst
make
make install
glib

git clone git://git.gnome.org/glib
cd glib
git checkout -b stable 2.22.3
./autogen.sh –noconfigure
touch arm.cache gedit arm.cache
复制下面内容到arm.cache:
glib_cv_long_long_format=yes
glib_cv_stack_grows=no
glib_cv_working_bcopy=no
glib_cv_uscore=no
ac_cv_func_posix_getpwuid_r=yes
ac_cv_func_nonposix_getpwuid_r=no
ac_cv_func_posix_getgrgid_r=no
./configure --cache-file=arm.cache --host=arm-linux --prefix=/opt/gst
make
出错一个错误: libgio-2.0.so, not found
解决: make LDFLAGS="-rpath $PWD/gmodule/.libs"
make install
liboil

git clone git://anongit.freedesktop.org/liboil
cd liboil
git checkout -b stable liboil-0.3.15
./autogen.sh ./configure --prefix=/opt/gst/ --host=arm-linux
make
make install
libcheck

下载:http://sourceforge.net/projects/check/ 目前为止最新版本是 check-0.9.11.tar_2.gz
解压,进入源代码目录 配置:
./configure --prefix=/opt/gst --host=arm-linux
make
make install
gstreamer

git clone git://anongit.freedesktop.org/gstreamer/gstreamer
cd gstreamer
git checkout -b stable RELEASE-0.10.25
./autogen.sh --noconfigure
./configure --build=i686-linux --host=arm-linux \
--prefix=/opt/gst/ --enable-playbin2 --disable-loadsave --disable-gtk-doc \
ac_cv_func_register_printf_function=no --disable-tests --disable-valgrind
错误:
../arm-none-linux-gnueabi/bin/ld: cannot find -lgobject-2.0
解决: 切换到普通用户再重头来一次
make
make install
gst-plugins-base

先安装liboil-dev: sudo aptitude install liboil-dev
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-base
cd gst-plugins-base
git checkout -b stable RELEASE-0.10.25
./autogen.sh –noconfigure
./configure --build=i686-linux --host=arm-linux --prefix=/opt/gst --disable-valgrind --disable-x --disable-gnome_vfs --disable-alsa --disable-ogg --disable-pango --disable-theora --disable-vorbis --disable-examples
make
make install
qt-4.8.5
下载qt-everywhere-opensource-src-4.8.5.tar.gz, PC端和ARM端都是同一个文件,下载地址:http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz
解压进入qt主目录然后配置,如果没问题的话,将不会看到phonon不能被支持之类的

./configure -embedded arm -prefix /opt/qt-4.8.5-arm -confirm-license -opensource -xplatform qws/linux-arm-g++ -v -no-largefile -opensource -confirm-license -no-xmlpatterns -no-qt3support -multimedia -audio-backend -glib -phonon -phonon-backend -declarative -qt-mouse-tslib -I/opt/tslib/include -L/opt/tslib/lib -I/opt/gst/include -L/opt/gst/lib -I/opt/gst/include/glib-2.0 -I/opt/gst/lib/glib-2.0/include -I/opt/gst/include/gstreamer-0.10/gst -L/opt/gst/lib/gstreamer-0.10 -force-pkg-config
我这里配置完成之后提示如下:
Qt is now configured for building. Just run ‘make‘.
Once everything is
built, you must run ‘make install‘.
Qt will be installed into
/opt/qt-4.8.5-arm
To reconfigure, run ‘make confclean‘ and ‘configure‘.
检查configure没问题之后
make
make install
ARM qt 4.8.5 phonon,布布扣,bubuko.com
ARM qt 4.8.5 phonon
原文:http://www.cnblogs.com/openusb/p/3611240.html