修改编译配置
cd /work/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/linux-arm-gnueabi-g++
vi qmake.conf
./configure -prefix /qemu_arm/qt-everywhere/qt5.7.0 \
-opensource \
-release \
-make libs \
-confirm-license \
-xplatform linux-arm-gnueabi-g++ \
-shared \
-qt-zlib \
-no-gif \
-qt-libjpeg \
-no-nis \
-no-opengl \
-no-cups \
-no-glib \
-no-dbus \
-no-rpath \
-no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 \
-no-avx \
-no-openssl \
-no-c++11\
-nomake tools \
-qreal float \
-qt-libpng \
-tslib \
-nomake examples \
-I /qemu_arm/qt-everywhere/ts_lib/include \
-L /qemu_arm/qt-everywhere/ts_lib/lib
进入Qt5.3.2的源码顶级目录,按照Linux系统中自编译软件通用的三个步骤依次执行 ./configure 、make 、make install 即可完成Qt5的编译安装。在执行之前,首先看一下configure的帮助,了解一下各个配置项的作用。
$ ./configure --help >help.txt ; vi help.txt
四、移植 tslib
1、解压&配置&编译
如果不是使用的韦老大的虚拟机可能还需要安装一下几个包 autoconf automake libtool
#sudo apt-get install autoconf automake libtool
tar zxvf tslib-1.4.tar.gz
sudo mkdir -p /usr/local/tslib
cd tslib
./autogen.sh
./configure --host=arm-linux ac_cv_func_malloc_0_nonnull=yes CC=arm-none-linux-gnueabi-gcc CXX=arm-none-linux-gnueabi-g++ -prefix=/qemu_arm/qt-everywhere/ts_lib
make
sudo make install
如果编译过程中遇到 undefined reference to 'rpl_malloc',前面配置完成之后修改 config.h.in 文件,注释掉文件最后的 #undef malloc ,重新 make 即可。
安装完成之后,tslib 就安装在虚拟机 /usr/local/tslib 目录下