看上一篇文章,先编译ltib。
1 资源准备
解压qt-everywhere-opensource-src-4.7.3.tar.gz至home目录,解压mkspecs.mx5x.tar.gz至qt-everywhere-opensource-src-4.7.3根目录。
2 Ltib安装
使用./ltib –c进行配置ltib安装,选择一下包:
amd-gpu-x11-bin-mx51
libz160-bin
fontconfig
freetype
glib2
gstreamer
gstreamer-plugins-base
gstreamer-plugins-good
gstreamer-plugins-bad
gstreamer-plugins-ugly
Liberationfonts
libjpeg
libpng
liboil
libxml2
mysql
tslib
X11(X.Org 7.5)
X11/libICE
X11/libSM
zlib
3 安装支持库
sudo apt-get install bison flex libphonon-dev libicu-dev libsqlite3-dev libxext-dev libxrender-devgperf libfontconfig1-dev libphonon-dev g++
sudo apt-get install libx11-dev libjpeg-dev libxext-dev x11proto-xext-devlibxtst-dev libpng12-dev
4 创建链接
进入ltib目录下的rootfs/usr/lib
sudo ln -s libgsl-fsl.so libgsl.so
创建/tftpboot/ltib指向rootfs
sudo ln -s /home/uu/ltib/rootfs /tftpboot/ltib
5 安装
进入qt-everywhere-opensource-src-4.7.3目录
执行
./configure-arch arm -xplatform linux-g++-mx5x -release -prefix /usr/local/Qt-4.7.3-mx53ARD-x11-multimedia -phonon -phonon-backend -qt-gfx-linuxfb -qt-kbd-tty -little-endian-host-little-endian -fontconfig -sm -opengl es2
5.1 make
可能会出现以下错误:
5.1.1 错误1
make[1]:*** No rule to make target `../JavaScriptCore/release/libjscore.a', needed by`../../../../lib/libQtWebKit.so.4.7.3'. Stop.
make[1]:Leaving directory`/home/uu/qt-everywhere-opensource-src-4.7.3/src/3rdparty/webkit/WebCore'
make:*** [sub-webkit-make_default-ordered] Error 2
修正:
$cd src/3rdparty/webkit/JavaScriptCore/release/
$cp jscore. libjscore.a
$cd -
$make
5.1.2 错误2
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/../../../../arm-fsl-linux-gnueabi/bin/ld:cannot find -lpnp_basictools
collect2:ld returned 1 exit status
make[3]:*** [plugandpaint] Error 1
make[3]:Leaving directory`/home/uu/qt-everywhere-opensource-src-4.7.3/examples/tools/plugandpaint'
make[2]:*** [sub-plugandpaint-make_default-ordered] Error 2
make[2]:Leaving directory `/home/uu/qt-everywhere-opensource-src-4.7.3/examples/tools'
make[1]:*** [sub-tools-make_default] Error 2
make[1]:Leaving directory `/home/uu/qt-everywhere-opensource-src-4.7.3/examples'
make:*** [sub-examples-make_default-ordered] Error 2
修正:
$cd examples/tools/plugandpaint/plugins/
$cp pnp_basictools. libpnp_basictools.a
$cd -
$make
5.1.3 错误3
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/../../../../arm-fsl-linux-gnueabi/bin/ld:cannot find -ldemo_shared
collect2:ld returned 1 exit status
make[2]:*** [deform] Error 1
make[2]:Leaving directory `/home/uu/qt-everywhere-opensource-src-4.7.3/demos/deform'
make[1]:*** [sub-deform-make_default] Error 2
make[1]:Leaving directory `/home/uu/qt-everywhere-opensource-src-4.7.3/demos'
make:*** [sub-demos-make_default-ordered] Error 2
修正:
$cd demos/shared/
$cp demo_shared. libdemo_shared.a
$cd -
$make
5.2 sudo make install
sudo make install