版主
主题
回帖0
积分10609
阅读权限200
注册时间2008-11-22
最后登录1970-1-1
在线时间 小时
|
1 平台说明9 Q; E. j: U: b" U4 q
主机平台: Ubuntu 14.04- e4 @9 q7 }: l2 A! O- m! b* s. P. L
' r3 `" p c7 ~4 R7 i6 J. P交叉工具链: FrendlyARM的 arm-Linux-gcc-4.5.1-v6-vfp-20120301.tgz; q# v- C4 x n; Y+ u5 A2 X* H
目标平台:FrendlyARM的Smart210开发板。(Soc是三星的S5PV210,内核是cortex-a8,下面的移植方法是普适的,不是此平台的也可参考下面的移植步骤)
$ U1 g o$ E( q8 z+ l* [) o+ d) l& ~8 z' f# l/ D
Qt版本: Qt-5.3.2# j; F' K, O9 z/ @
4 U0 }4 m8 F |, x" n, k- O& M0 W2 Qt5.3.2在ARM-Linux平台(Mini210开发板)的移植/ F8 a( @: R' L; H
进入Qt5.3.2的源码顶级目录,按照linux系统中自编译软件通用的三个步骤依次执行 ./configure 、make 、make install 即可完成Qt5的编译安装。在执行之前,首先看一下configure的帮助,了解一下各个配置项的作用。
* N; G% l. S1 ^! r. c6 E
* Z/ _; q8 c: W* ^1 L# [. R4 a$ ./configure --help >help.txt ; vi help.txt# k- N- N# P8 h# x) a4 w
9 Y" F+ x8 [6 z$ o
0 h9 z* ~3 `% [2 t! s, j2 N2 J9 Z配置时需要注意的几点是:6 J* y4 p9 M3 b& e
4 S3 o0 }8 e1 [7 @5 f% r7 m
如果是交叉编译,需要配置 xplatform选项,比如要在arm-linux平台上移植Qt的话,就在配置项中加上 -xplatform linux-arm-gnueabi-g++ ,Qt5支持的交叉平台都可在源码顶层目录中的 /qtbase/mkspecs/ 下找到,每个子目录名代表一个交叉平台的名字,移植Qt时应根据自己的实际情况修改平台对应的子目录下的qmake.conf文件,它定义了一些与平台相关的环境变量,如交叉编译器等;
z v J" p7 v+ v7 S. p& w9 N/ ?$ w# C) q0 j
最好不要在编译Qt时使能 C++11,一方面你的编译器可能不支持,另一方面使能这一项后可能出现一部分编译错误;% ^/ Y. u) N/ Y) z& y. K) @" M1 E
% U/ H7 J( ^' m# Q U, V( E7 h如果需要openGL,就需要用 -opengl选项指定opengl的api,对于嵌入式平台,一般使用 opengl ES2,配置选项中加入" -opengl es2 " 。不过想使用openGL可能会比较麻烦,因为openGL一般在有硬件图形加速的条件下才能高效运行,而这需要显卡或Soc厂家提供openGL的支持库,但并不是所有Soc都能找到对应的支持库,比如三星就没有提供S5PV210的openGL库,所以我这里编译的Qt也是没有opengl的。(openGL的替代方案:如果没有厂家提供的硬件图形库,可以考虑使用纯软件实现的opengl,这样的软件库有很多是开源的,如mesa3D库等,不过纯软件实现的opengl在效率方面肯定要比带硬件加速的低很多,而且要想在嵌入式平台上使用,必须将opengl的软件库也交叉编译出来,我在交叉编译mesa3D时遇到了些问题,所以目前还没能在开发板上用上openGL);- Z% E. y3 V; _% x2 O0 U! N
2 [" J+ N9 @' |2 N: p如果想让Qt程序支持多点触摸,在配置时可能需要加上 -mtdev 和 -xinput2 选项,在help中可以找到这两个选项。mtdev包含了应用程序对多点触摸协议的支持,xinput2实现了Linux的输入子系统对多点触摸的支持。在我这里加上这两个选项的话配置会出错,可能还缺乏一些库,所以最后我没有使用这两个选项;
& `. Q4 S- W0 I- m- S5 T- x8 \
8 J& ?( i* ^) S: V m: l" |另外,Qt5默认的qreal类型是64bit的double,如果希望用float类型定义qreal,则在配置选项中加入"-qreal float"。0 D; g4 _4 `2 ~$ k: i+ p
( N. C4 W' [" Q7 G9 E4 a
我的编译过程如下:
1 }; @$ u: b, F- c
' @8 |# _0 Y% p. U7 L* H首先修改 qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf,内容如下:
& g. V6 j4 o6 y; u% v* B$ a+ T9 @' B
[html] view plain copy/ P5 w. Z Z# d2 K
# 6 x' _6 ]! Z1 _- Y: [
# qmake configuration for building with arm-linux-gnueabi-g++ 2 }; T1 x: u$ l7 P
# 8 a/ w' `, z* y" R, ~2 R, ?2 S
" j" w3 W) ?7 U+ A
MAKEFILE_GENERATOR = UNIX
1 |0 J# W6 X( |( D2 r( wCONFIG += incrementar gdb_dwarf_index
1 R+ P. B* F( n" |+ ~QMAKE_INCREMENTAL_STYLE = sublib
/ @( B) g: O* z' {3 AQT_QPA_DEFAULT_PLATFORM = linux #eglfs
) n7 w7 l( G, ]% W1 t$ ]* q* O6 kQMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a
! Y3 T2 k3 D% ]- |) dQMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a 5 D( C$ r# e) @
o4 }* u) i& Q( G' n$ S! i
include(../common/linux.conf) ) ]+ z2 C" P9 B- s8 V; c ]( P3 O9 {
include(../common/gcc-base-unix.conf)
$ o4 I( M4 _ g# n; D! ^include(../common/g++-unix.conf) 9 j, L0 h$ _0 f& o
$ y% a! D4 D0 C# modifications to g++.conf # c0 `. o5 v* v; \3 K3 [6 `
QMAKE_CC = arm-none-linux-gnueabi-gcc ' R2 {, A- g; ]. c
QMAKE_CXX = arm-none-linux-gnueabi-g++
$ ^$ Z8 \" D, b. eQMAKE_LINK = arm-none-linux-gnueabi-g++
; y+ m! K$ a- _/ s' G3 r+ k1 cQMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++ ) a! u0 Z" n) N, c* Y$ [
, g9 V& o& ^; N- y' I4 g
# modifications to linux.conf # v- |6 L( H! b6 n/ T7 u& X. k
QMAKE_AR = arm-none-linux-gnueabi-ar cqs , M' V9 W/ t: e1 n' b
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy 1 [; f9 l4 y0 @* o, G$ `
QMAKE_NM = arm-none-linux-gnueabi-nm -P
/ n/ Y. e3 T" M/ ?" lQMAKE_STRIP = arm-none-linux-gnueabi-strip , [7 B$ @& C4 e2 @& I
load(qt_config) + V; G) y" Z0 M) r3 W9 T2 _5 u
& f2 f! _, f3 z$ w
* ]9 e" u# r3 e$ v" N9 k( ]9 u然后执行:
* v( A. P8 m. }$ O& ?$ l* l[html] view plain copy
& l0 g7 y5 J C8 l, A$ ./configure -release -opensource -xplatform linux-arm-gnueabi-g++ -prefix /opt/Qt-5.3.2/armv7-a -no-c++11 -qreal float
: Q v$ n3 S0 @# @配置结果为:
! `6 Q) \3 w" `. N/ D5 Q) o3 B/ u4 }( ], ]- c' i
[html] view plain copy8 r$ D6 a% W7 T8 g
Configure summary " J2 q: N8 t7 Z/ M' v2 a
' ^% B; `( Y2 {Building on: linux-g++ (i386, CPU features:)
) X _ F6 e/ X: f/ e& hBuilding for: linux-arm-gnueabi-g++ (arm, CPU features:) 9 |, R G0 u( r8 f6 ]% y, G2 i' J s
Platform notes:
! {$ w2 j! T x) Z& Z ! H: A# |2 Z5 @# T
- Also available for Linux: linux-kcc linux-icc linux-cxx 5 H0 t$ ^% z5 V5 I
1 C8 `" G: r, v# BBuild options: 4 k0 l' r- z- L; u' x) B7 |2 {
Configuration .......... accessibility alsa audio-backend clock-gettime clock-monotonic compile_examples concurrent cross_compile evdev eventfd freetype full-config getaddrinfo getifaddrs iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis no-harfbuzz no-pkg-config openssl pcre png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config system-jpeg system-png system-zlib 2 E m8 d$ `2 X% P3 N- Y5 q K. s) _
Build parts ............ libs examples
1 [4 Y; N7 L9 e7 b* I" w Mode ................... release 1 S& p4 W/ B+ Z
Using C++11 ............ no $ _9 s/ p. \" j- R$ S" m, |
Using PCH .............. yes
+ k2 w. g; [! ^% ?1 Z Target compiler supports: & x t$ E7 v, c( E6 e
iWMMXt/Neon .......... no/auto
' J6 t; m/ |- x9 q# R * E: z. H+ Z2 X; c
Qt modules and options: ) n, u# `1 {" E; W' \ t( J
Qt D-Bus ............... no ' t$ O* b. Z6 u- R) t. s
Qt Concurrent .......... yes : a4 P1 {" s4 O; B) s$ C' m
Qt GUI ................. yes
; u( k8 x$ R' }1 \# j2 L Qt Widgets ............. yes
# Z1 |5 P9 U" k* Q Large File ............. yes
# @) u8 m2 B' @ QML debugging .......... yes " ]+ B, |/ i$ M
Use system proxies ..... no
4 j4 q, L1 _% Z4 E4 I) o - C/ m. N. A! c; t2 \
Support enabled for:
5 P8 h3 q# T! x6 q5 L7 _ Accessibility .......... yes ' z- c6 f, B2 P. v* @8 I; B
ALSA ................... yes
. a b1 ^3 {% V$ e CUPS ................... no
" w7 H. E2 F7 `$ W, g Evdev .................. yes / Q; S- W, ]: B2 `
FontConfig ............. no * W& A! Q- b& l4 k+ p. F
FreeType ............... yes (bundled copy)
2 ^2 L7 [: t. X' m1 j, [ Glib ................... no * I! Z5 B9 ^' T. _; f* v! d8 l/ Z2 ~
GTK theme .............. no 6 c) M4 ~5 w9 q/ v5 ?
HarfBuzz ............... no m$ X* ^, N9 {2 l9 W& R
Iconv .................. yes & p/ x3 W+ j' t3 h9 r' I
ICU .................... no
( S5 p1 Q1 a# S# F0 ?" G; m+ ` Image formats:
7 b% K/ |& G7 k# i. d/ D GIF .................. yes (plugin, using bundled copy) - T! `' R; i* ?7 e; {( I" m/ h
JPEG ................. yes (plugin, using system library)
4 F# I& D. ~4 i PNG .................. yes (in QtGui, using system library) % O+ z0 h5 p7 ~/ D7 z$ M! R
journald ............... no 2 N c/ v# u( i/ U
mtdev .................. no
V. o% ]! `% j- r" K6 H Networking:
2 |( U2 F2 U. L/ [( F. ^ getaddrinfo .......... yes
# R6 ? ? Z' s getifaddrs ........... yes 1 h; S) Q1 z7 P
IPv6 ifname .......... yes
, t( u$ p+ E+ V3 u, g2 d6 b OpenSSL .............. yes (loading libraries at run-time) 8 l! z& r5 V/ r: X# ?# n* u. g/ u$ l
NIS .................... yes
2 j- l) G4 c% I) r) J- [ OpenGL / OpenVG: . N/ H5 `! L0 R) M3 T! x
EGL .................. no 2 b) S! l( X1 v8 n1 W
OpenGL ............... no
% S) e: X$ r/ ^2 x. X1 l2 E OpenVG ............... no
* d0 k/ g# j; {6 | PCRE ................... yes (bundled copy) , H" f# ?5 _4 W$ z% a7 v
pkg-config ............. no 2 f3 a4 v; i1 U% _4 `
PulseAudio ............. no 4 y' Z# l2 f0 _3 j
QPA backends: ! o% o E! U" P$ h) w0 Y
DirectFB ............. no
* Y4 a- p8 e; P2 @2 m; u. c EGLFS ................ no
& k" E, G/ e5 U KMS .................. no ! k& b8 a3 g$ W
LinuxFB .............. yes
" L- _. L/ w, @1 Y7 |% i6 x9 w( H XCB .................. no
- \$ U5 G( U2 l! c: {% ^3 k3 b Session management ..... yes 5 _4 z% s, ]1 w K+ k
SQL drivers: * L& S7 C- j. w; V! Z9 Z
DB2 .................. no
! p$ k |$ q; Z0 q. A4 R% W InterBase ............ no
' N6 T- w, v2 X/ q% r MySQL ................ no
/ }9 i: @: @* W+ t+ l OCI .................. no
* d. a9 Z4 ?2 i5 I' u! r8 H2 \ ODBC ................. no
7 i; R! S6 J7 c: `# ] W. u } PostgreSQL ........... no " k" f( R: H0 V( k
SQLite 2 ............. no
' n) [5 ^2 r5 W1 m( R SQLite ............... yes (plugin, using bundled copy) ( m; R5 r& O" \) s% J4 I l
TDS .................. no 6 B$ k0 b! i! i0 M) F- A% o+ d8 E, |
udev ................... no & M7 ?# E8 M1 {0 \ F( Z1 ?5 s! s
xkbcommon .............. no
$ C9 Y' P1 R) f/ _4 d zlib ................... yes (system library)
; L: L2 ^9 H1 P) S% J/ M2 W3 V
! g Y5 i! W( r8 E2 E8 x: a# `% e) G+ w9 M7 D
配置完成后执行:$ @, V/ B2 J& q) [ R
[html] view plain copy! m1 i( k( c; m/ i5 W5 z9 V
$ make -j4 5 C& G4 [, n7 O' @2 X- L
$ sudo make install -j4 8 K& P4 b. X. [8 V- \
1 }) ], v, c* Y$ B- B
3 添加 tslib 支持0 X. L: H) A' o% [/ Z8 z; ]6 G" g
为了使单点触摸屏可用,还需要编译Qt的tslib插件,这需要首先交叉编译好tslib,tslib的编译过程参见:
& j' c# K8 ~4 F
( ]" T( g' B8 o$ S# F; yhttp://blog.csdn.net/newthinker_wei/article/details/8639276, S1 h7 y! b+ f7 y0 }
友善之臂的板子使用了 touchscreen-1wire,这需要按照上文中的步骤对tslib的源码打上补丁(在tslib的源码中添加了一个一线触摸屏的插件)。非友善之臂的板子一般不用打补丁。: ?3 I m0 q( W% M. H! T8 u
" r3 A+ \! m4 m7 D
另一个有用的链接在这儿,这是友善专门为tslib做的一线触摸屏的插件,有源码,上面那篇文章应该也是参考这个源码的:
# g- |8 }0 F+ V" a3 V8 X4 x. i, P a4 I2 L) y& q# _- M3 C7 V
http://www.arm9home.net/read.php?tid-16105.html( f1 |2 }8 d' G) f, A# s0 m, |$ [; v
: |1 d. a) K( |9 p& H/ V注意,对于友善之臂的开发板,如果使用的是单点电阻触摸屏,使用上面的方式移植tslib就可以了。但是对于多点的电容触摸屏,上面的两个网址给出的源码都不适用了,友善的多点触摸屏使用的是goodix公司出的触摸屏,goodix驱动的接口跟友善之前用的触摸屏不一样。因此如果想使用tslib,需要再单独为goodix写个TSLIB插件。tslib源码的plugins目录中就是各个插件的代码,可以参考一下他们,都很简单(主要是实现一个read函数)。但要自己写电容屏的插件貌似比较困难,因为要对驱动程序中多点触摸的数据协议有所了解,这样才能从电容屏的数据中提取出单点数据。友善提供了friendlyarm-ts-mtinput.so 文件(但并没有源码),该文件就在友善自带的tslib中,默认目录为/usr/lib/ts/friendlyarm-ts-mtinput.so。把这个库拷贝到自己编译的tslib插件目录中,再修改配置文件ts.conf,即可使tslib工作。
, I/ z- Y$ u0 Q. X1 r# m; Q将编译出来的tslib拷贝到库开发板后,还需要在板子上设置TSLIB的环境变量,主要的几个变量如下:# W' Y4 H3 H t8 K+ c& w, ~* D1 Q: P: e
: M# f1 e8 i6 f" D& c7 w" o[html] view plain copy
2 R- E3 o' ~: a+ M' n6 U' M5 f$ ?#! /bin/sh
5 s3 X/ |+ ~- M! z F# "source" this file when wanna run a Qt application on the ARM Board.
: Z" q5 s. |+ @
, Y$ W' ~" ^. U############### the below lines are for stardard TSLIB ################## 8 B$ I5 r2 g$ K- j( w" Z
export TSLIB_ROOT=/opt/tslib 8 D+ K7 n1 e+ z6 D+ y$ Y
export TSLIB_CALIBFILE=$TSLIB_ROOT/etc/pointercal
% v$ U2 z% e6 t$ E0 o; kexport TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf - \/ Y; {5 m) @+ o4 N
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts 8 v( s6 n* x4 _# L- B8 `
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
& `6 V0 a* }# \" a#export TSLIB_TSDEVICE=/dev/input/event2 % S/ M1 H3 |$ a: F# ]
: D' [1 U. \9 E ] l! V
################ the below lines are optional ##############
5 u; Z* C8 v; _# t, q#export TSLIB_FBDEVICE=/dev/fb0 * q+ K3 G* z0 B" m4 j4 W
#export TSLIB_CONSOLEDEVICE=none 4 V$ o( r; W$ J* B' n+ F9 l) X' L
9 P0 U9 e9 [! X此外还要修改 ts.conf文件:( e/ J% I- ?/ I
[html] view plain copy
, l: T8 @7 S+ O6 I i#module_raw one_wire_ts_input
% a* [) G4 I6 Omodule_raw friendlyarm-ts-mtinput #使用友善提供的电容屏TSLIB插件。需要先将friendlyarm-ts-mtinput.so拷贝到TSLIB_PLUGINDIR目录中
* k% X5 F: q1 K! k+ _: z
( Z+ o2 C M$ p+ ]module pthres pmin=1 4 M7 g+ |2 O6 Z* W: q# |
module variance delta=30
, c% r4 e5 s. N1 [# M3 Smodule dejitter delta=100 " { ], a3 l# X' T
module linear
6 `, Q- t7 ~ h: S. M# S到此为止 tslib 就基本能用了,首次使用时应先运行 ts_calibrate 进行触摸屏校准。我用的这个版本的tslib自带的ts_calibrate程序不太好用,所以我依然使用友善提供的ts_calibrate进行校准。( Y. Z. ~1 u2 ~, z6 r1 l& W
有了tslib后,进入Qt源码目录中的 "qtbase/src/plugins/generic/tslib/",运行 qmake 生成 Makefile,并在Makefile中将tslib的头文件和库文件路径添加到编译链接选项中(-I /...tslib/include -L/.../tslib/lib);然后运行 make 和 make install即可。这时,Qt5安装目录的 "plugins/generic/"目录下就出现"libqtslibplugin.so"这个库文件了。# i+ D. j( h! y& i
( d" J7 j4 _4 b0 L9 r1 w3 {- r$ {4 运行Qt程序1 \8 Z9 i q9 f0 p4 p( _* g. r9 J
需要说明的是,Qt5.0开始,Qt自身不再单独实现窗口系统,QWS不复存在,取而代之的新机制是QPA(Qt平台抽象),QPA使得Qt对不同平台的支持变得更加灵活,当需要支持一个新平台时,只需为该平台编写一个QPA插件。
' l1 y+ @$ t# Q: Y1 c
/ C0 T, ` D6 s- l& AWith the release of Qt 5.0, Qt no longer contains its own window system implementation: QWS is no longer a supported platform. For single-process use cases, theQt Platform Abstraction is a superior solution......参考 http://qt-project.org/doc/qt-5/embedded-linux.html0 L: F7 L' y9 @
% D$ R9 c9 Q6 }# c" a% B$ k! j9 k编译完Qt后,只需将生成的lib和plugins文件夹拷贝到开发板,另外,当在嵌入式Linux平台上运行应用程序前,应根据自己平台的实际情况提前设置好下面几个环境变量:
2 K4 g& Q8 l; p, q% D- N% J0 z |; E* Y
' C( t+ R, P C2 R[html] view plain copy
/ U1 P6 `$ r! M3 J" @export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/Qt-5.3.2/armv7-a/plugins/platforms " O3 C& H t6 R8 L
export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0 ) x: H$ Y2 r5 Q' b+ W r! y- T: |
export QT_QPA_FONTDIR=/opt/Qt-5.3.2/armv7-a/lib/fonts 7 n/ C2 H- ~# {
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/touchscreen-1wire #使用tslib插件
8 I) z( U+ Z& f5 { `& O; ~ }, t5 S! i: ?
然后就可以运行Qt程序了
$ a. A$ t- e9 G4 n
6 m3 b7 N9 ?3 l+ v: }2 q' i以前Qt4的程序在嵌入式Linux平台运行时,需要在命令行输入-qws选项以启动Qt窗口系统服务,如" ./HelloWorld -qws";而使用Qt5后,不再需要-qws,而需要通过-platform来指定要使用的QPA插件,如" ./HelloWorld -platform linuxfb",如果不指定,则用默认的QPA插件,默认的QPA插件通过上面的QT_QPA_PLATFORM变量指定。: m4 ^* U5 e2 \; C3 u1 `
2 y5 i+ H. v. v- d" q- O. z5 @& K
附: 在Ubuntu 14.04上编译Qt ---(请注意,本小节编译的是PC版Qt,不是ARM版,ARM版Qt的编译过程请参考本文第2节)
0 d$ B) I! z0 `2 g# E+ j3 W' a在Ubuntu 14.04上编译Qt就简单多了,缺少的组件可以很容易下载到。5 h, E c% I: t' G- q5 q. E' z
0 G7 R# y5 t! `) W) i) i首先安装opengl支持(mesa3d),
) _8 q, r M% P# F, \; I$ Y+ v3 z
9 a" P6 G+ _ S: R3 x: P[html] view plain copy
: T4 n( ?: _; c6 Esudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
& x4 u* d, U2 Y如果需要,再安装Qt D-Bus的支持。
4 n0 l/ |/ ]. O: z6 ~! e5 P) Q1 b/ W- c
然后configure,configure过程中可能出现一些错误,基本都是缺少某个库引起的,配置过程中根据错误提示,用apt-get install或Ubuntu Software Center搜索安装缺少的组件。
: Z0 C7 q0 G, J1 @: \; q1 k( V, t7 M; g& h( b% S& F# p: Y
[html] view plain copy2 H* P" u- V: u8 b- L+ z7 ?& [
./configure -release -opensource -prefix /opt/Qt-5.3.2/x86 -no-c++11 -qreal float -opengl 6 I% T9 |3 O/ g+ |. H9 c
配置结果为:
: [8 l0 c5 V L7 h5 K
& c0 V9 l8 N% j* M% f[html] view plain copy" G' i. E# W/ a: I
Configure summary ' Z- w; K# M9 r& {
) C" f* G# C9 Q3 O6 L9 z% |
Build type: linux-g++ (i386, CPU features:) / }. E6 y, k9 r) |- u& t0 l( ]
Platform notes:
6 T' z$ {3 \: j # l0 l; A( l- |- w: t* P
- Also available for Linux: linux-kcc linux-icc linux-cxx , p" Z; I6 A. _$ B9 v
3 y* v; W8 D& ~$ S7 V7 z- \Build options: . k7 y! [. P! U
Configuration .......... accessibility accessibility-atspi-bridge audio-backend avx avx2 clock-gettime clock-monotonic compile_examples concurrent dbus evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib iconv inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap nis no-harfbuzz opengl pcre png posix_fallocate precompile_header qpa qpa reduce_exports reduce_relocations release rpath shared small-config sse2 sse3 sse4_1 sse4_2 ssse3 system-freetype system-jpeg system-png system-zlib xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput2 xkbcommon-qt xlib xrender - J+ J3 h6 m* L1 u- N/ A9 c* Q
Build parts ............ libs tools examples
/ z) j5 V/ d# R% {9 f0 Q0 V3 q Mode ................... release 1 K0 e3 M% }5 `" {* d& u2 `
Using C++11 ............ no & y! e% j; _4 S0 L9 w5 n; ^
Using PCH .............. yes 2 G. z8 t; o' ]; [: v3 F1 Y; L
Target compiler supports:
' g. o' F* Y. S& u SSE2/SSE3/SSSE3 ...... yes/yes/yes " B- s, ~/ H) @! \( y8 Q8 T
SSE4.1/SSE4.2 ........ yes/yes / p4 K! L h% o' o
AVX/AVX2 ............. yes/yes 4 Q: k# x6 a8 ]2 n0 P
- b$ ]- S, `% @
Qt modules and options:
- _. x) I1 W8 j# J Qt D-Bus ............... yes (loading dbus-1 at runtime) [. G1 ~: q* r
Qt Concurrent .......... yes
8 v4 ]8 f: c# Q; `, m. A3 u8 S Qt GUI ................. yes
E) r: j0 P5 [( k* r Qt Widgets ............. yes
$ y+ j0 M1 j! T/ {5 K) N0 F Large File ............. yes ' \; X- m( j! w5 i4 p* q7 d1 f
QML debugging .......... yes
7 r& f+ r1 J$ ]6 \ Use system proxies ..... no
" J4 E9 y) }+ _6 v, t& h ( r& S; ?; K, {8 l
Support enabled for:
" }9 L: y& H5 q4 j M6 m Accessibility .......... yes # L$ M8 i% s) f3 R3 \0 Z" H* z+ O
ALSA ................... no % F8 Z4 N2 J; h6 Z- o) N
CUPS ................... no 9 V& ?: Y V, R' C7 f
Evdev .................. yes & Y( @0 J9 D5 n8 a* H& e6 d1 j; K: ^
FontConfig ............. yes
Q: s- c- p! s, R8 O+ m8 d6 _# f, B FreeType ............... yes (system library)
8 q7 b+ K6 M9 H Glib ................... yes 9 J$ K8 a. y4 t/ y+ \& O
GTK theme .............. no 7 O1 g& E e3 K' v4 e( }' a* r
HarfBuzz ............... no
# d9 K' T* c7 o5 [5 f# D( F Iconv .................. yes
( [" B' }5 m# [% @- u0 W ICU .................... no
6 h3 P P2 M2 ?$ H Image formats: 8 c( C( a) D V* h/ r& k9 B
GIF .................. yes (plugin, using bundled copy) 2 f" H' u$ s7 x
JPEG ................. yes (plugin, using system library) 9 y1 J% U. q. |5 _7 ]& J
PNG .................. yes (in QtGui, using system library)
9 e0 Q" F) p, }" P3 ? journald ............... no $ p9 y% k0 Z) Q% T- D% I! P h. n
mtdev .................. no ( J1 t- R& ~. j
Networking:
) F" k1 r; @8 |! X# w6 i getaddrinfo .......... yes - r3 L0 `, q3 L5 d' u$ B
getifaddrs ........... yes 5 D3 f/ g' _1 r+ S2 g. i
IPv6 ifname .......... yes # C' X3 S. t' _3 _3 ?
OpenSSL .............. no 9 ^/ N5 s2 Y/ Z. b" D8 Q7 x. P, p
NIS .................... yes 8 ]& X4 D6 |) l0 M: `
OpenGL / OpenVG:
* L- Q( n7 H1 z8 j EGL .................. no
& C" H+ ?' c$ E/ A" `/ w OpenGL ............... desktop
, d) O6 L9 t' c/ X" d, p: ~& ^. C OpenVG ............... no # c% V* }1 i! \% }) h
PCRE ................... yes (bundled copy)
" H% j0 G7 o- V+ g& o8 A+ \( P7 C9 U pkg-config ............. yes
; d: X2 g; M/ }9 E6 P PulseAudio ............. no 6 z' B2 G$ {( ]2 M ^0 E
QPA backends: , P7 F3 N2 ?* o% j+ c
DirectFB ............. no V. u) m5 Q2 W5 h* u2 z- H
EGLFS ................ no - W; p7 J2 B3 S- I; H5 d" t
KMS .................. no
+ L' K8 h9 K4 M3 J A5 | LinuxFB .............. yes
" c9 k1 X [: j6 x XCB .................. yes (system library) % {" i( B; z# ?$ l
EGL on X ........... no & |( D( H0 x( @3 P! L
GLX ................ yes 3 c) V3 z$ G; Y. \
MIT-SHM ............ yes
: E! N; ?$ S" v* H Xcb-Xlib ........... yes - F3 D: l' ? F$ F" u4 K9 C8 X
Xcursor ............ yes (loaded at runtime) ; ]& p' c4 T6 s) g7 _4 t+ O
Xfixes ............. yes (loaded at runtime) ( h. M4 q5 t/ j
Xi ................. no 1 A, S* G' H9 U% n- A% n& D
Xi2 ................ yes
# N3 p/ i! g& J2 R! b Xinerama ........... yes (loaded at runtime) 9 A( n( m& I8 S }6 A+ `6 W
Xrandr ............. yes (loaded at runtime) G1 o. h0 s2 E9 ^" R
Xrender ............ yes 1 m& J* ?( ^4 Q4 O
XKB ................ no & ]) c1 Q5 b; [) P' f
XShape ............. yes
# ~9 H& U# I+ r5 L8 c$ q1 M0 L5 j XSync .............. yes ; G$ r& W& P! Z }. @! ?% \" g
XVideo ............. yes
& y2 l8 }( n0 ?# D: ]" R1 u: x5 _" @ Session management ..... yes 0 x: z" Y, y& R8 E) Q
SQL drivers: 6 R7 {3 C. _- W$ _) J# T) l
DB2 .................. no 4 O- \. ~9 d8 Q, Z
InterBase ............ no
& |' V3 g4 n' C" j% |8 X6 [) h MySQL ................ no % A: k+ d; C9 p' O! J! y3 r) G/ q7 I
OCI .................. no
. l& y* ]" n d8 K. J- A# U7 i ODBC ................. no
+ c% h* m0 I2 @' ?4 K8 _1 b PostgreSQL ........... no $ E7 F" ^! [, f' S% s) N9 n N; A
SQLite 2 ............. no $ Y4 z9 j0 l \) O' [9 S
SQLite ............... yes (plugin, using bundled copy) q* `* B6 m5 L _0 v
TDS .................. no
' S/ o; j( T. {( x udev ................... yes
% Z' k7 E6 L6 O) [& s9 j/ G9 g xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb) ) M8 a+ m C& c V7 |
zlib ................... yes (system library) 8 S |4 N" {, I1 ]2 g" X
# X. Z2 ~" f0 F( K7 ~4 h$ {4 V
NOTE: libxkbcommon and libxkbcommon-x11 0.4.1 or higher not found on the system, will use
; h! e* `. x8 \2 h# l' g5 hthe bundled version from 3rd party directory.
C! W5 A W- w @
$ z& W: \9 B/ A' W1 u最后make和make install即可。
& y9 `7 b- Q" v: x
4 s* l7 t* n% `$ l
& p3 X# m/ z# {* F3 Q另外,编译完Qt5.3.2后,发现Qt assistant打开之后内容是空的,查询不到任何东西。需要打开assistant,点击Edit->preference菜单,选择Documents选项卡,点击add向assistant添加文档,文档类型为 *.qch 。但Qt5中似乎文档并不是现成的,需要在编译完Qt后再去编译他的文档。步骤为:2 I- N1 w3 v I" B- j! U3 T
3 i$ l8 e% {4 c; b, d+ F: N进入已经编译过的Qt源码顶层目录,输入- \& A* _% e2 [ U9 `2 R) Q
[html] view plain copy3 {+ x, V" T7 w
$ make docs
* r% `& }# F9 e这条指令会生成Qt各个模块的文档,但这些文档分散于不同的子源码目录中,最好将他们集中拷贝出来放到Qt的安装目录中,我的做法如下,当执行完make docs后,在源码顶层目录输入:(/opt/Qt-5.3.2是我的安装目录)6 t% r/ W4 e5 q0 P2 H
[html] view plain copy
; h- E/ g! H# D y. r+ n- q$ sudo mkdir /opt/Qt-5.3.2/docs_for_assistant 4 Y: ^3 f* x) A2 M) S
$ sudo cp `find ./ -name *.qch` /opt/Qt-5.3.2/docs_for_assistant 5 a' U9 Y. B) M8 s( k
然后打开assistant,将 /opt/Qt-5.3.2/docs_for_assistant 目录中的*.qch文件全部add进去。 |
|