我在交叉构建环境(GAR环境,MiniMyth2项目)中从Qt4(4.8.6)转到Qt5(5.4.1)。
我完美地构建并运行Qt4。 我已经成功交叉编译并安装Qt5。 供参考 - 这是配置输出:
Configure summary
Building on: linux-g++-64-garbuild (x86_64, CPU features: mmx sse sse2)
Building for: linux-g++-64-garhost (x86_64, CPU features: mmx sse sse2)
qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_MTDEV CONFIG += use_libmysqlclient_r QT_LIBS_DBUS = -ldbus-1 QT
_CFLAGS_DBUS = -I/home/piotro/minimyth-dev/images/main/usr/include/dbus-1.0 -I/home/piotro/minimyth-dev/images/main/usr/lib/dbus-1.0
/include QT_HOST_CFLAGS_DBUS = -I/home/piotro/minimyth-dev/images/build/usr/include/dbus-1.0 -I/home/piotro/minimyth-dev/images/bui
ld/usr/lib/dbus-1.0/include QT_CFLAGS_GLIB = -pthread -I/home/piotro/minimyth-dev/images/main/usr/include/glib-2.0 -I/home/piotro/m
inimyth-dev/images/main/usr/lib/glib-2.0/include QT_LIBS_GLIB = -lgthread-2.0 -pthread -lrt -lglib-2.0 QMAKE_CFLAGS_FONTCONFIG = -
I/home/piotro/minimyth-dev/images/main/usr/include/freetype2 QMAKE_LIBS_FONTCONFIG = -lfontconfig -lfreetype QMAKE_INCDIR_LIBUDEV
= QMAKE_LIBS_LIBUDEV = -ludev -lrt QMAKE_X11_PREFIX = /usr QMAKE_XKB_CONFIG_ROOT = /usr/share/X11/xkb QMAKE_CFLAGS_XCB = QMAKE_LI
BS_XCB = -lxcb-sync -lxcb-xfixes -lxcb-randr -lxcb-render -lxcb-image -lxcb-shm -lxcb-keysyms -lxcb-icccm -lxcb-shape -lxcb sql-dri
vers = sql-plugins = mysql qmake switches .........
Build options:
Configuration .......... alsa audio-backend avx avx2 c++11 clock-gettime clock-monotonic concurrent cross_compile dbus dbus-linked
evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib iconv icu inotify ipv6ifname large-config largefile libudev linuxf
b medium-config minimal-config mremap no-harfbuzz opengl openssl-linked pcre png posix_fallocate qpa qpa reduce_exports reduce_reloc
ations release shared silent small-config sse2 sse3 sse4_1 sse4_2 ssse3 system-freetype system-jpeg system-png system-zlib xcb xcb-g
lx xcb-plugin xcb-xlib xinput2 xkbcommon-qt xlib xrender
Build parts ............ libs
Mode ................... release
Using C++11 ............ yes
Using gold linker....... no
Using PCH .............. no
Target compiler supports:
SSE2/SSE3/SSSE3 ...... yes/yes/yes
SSE4.1/SSE4.2 ........ yes/yes
AVX/AVX2 ............. yes/yes
Qt modules and options:
Qt D-Bus ............... yes (linked to dbus-1)
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... no
Use system proxies ..... no
Support enabled for:
Accessibility .......... no
ALSA ................... yes
CUPS ................... no
Evdev .................. yes
FontConfig ............. yes
FreeType ............... yes (system library)
Glib ................... yes
GTK theme .............. no
HarfBuzz ............... no
Iconv .................. yes
ICU .................... yes
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using system library)
PNG .................. yes (in QtGui, using system library)
journald ............... no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
OpenSSL .............. yes (linked to the libraries)
NIS .................... no
OpenGL / OpenVG:
EGL .................. no
OpenGL ............... desktop
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ no
KMS .................. no
LinuxFB .............. yes
XCB .................. yes (system library)
EGL on X ........... no
GLX ................ yes
MIT-SHM ............ yes
Xcb-Xlib ........... yes
Xcursor ............ no
Xfixes ............. yes
Xi ................. no
Xi2 ................ yes
Xinerama ........... yes
Xrandr ............. yes
Xrender ............ yes
XKB ................ yes
XShape ............. yes
XSync .............. no
XVideo ............. yes
Session management ..... no
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ yes (plugin)
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
udev ................... yes
xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
zlib ................... yes (system library)
不幸的是,朗姆Qt申请的任何尝试都会返回:
root@FE-AMDe2100:~ # /usr/bin/mythfrontend.sh
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Reinstalling the application may fix this problem.
Aborted
运行LDD显示我认为所有的库都存在
root@FE-AMDe2100:~ # /usr/local/bin/ldd -r -d /usr/lib/qt5/plugins/platforms/libqxcb.so
/usr/local/bin/ldd: line 124: 1: not found
linux-vdso.so.1 => (0x00007fff1fdb8000)
libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f7120378000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f7120166000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f711ff61000)
libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0x00007f711fd4b000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f711fb2c000)
libxcb-image.so.0 => /usr/lib/libxcb-image.so.0 (0x00007f711f927000)
libxcb-icccm.so.4 => /usr/lib/libxcb-icccm.so.4 (0x00007f711f723000)
libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f711f51e000)
libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007f711f317000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f711f115000)
libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007f711ef08000)
libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0x00007f711ed04000)
libxcb-keysyms.so.1 => /usr/lib/libxcb-keysyms.so.1 (0x00007f711eb02000)
libxcb-xkb.so.1 => /usr/lib/libxcb-xkb.so.1 (0x00007f711e8e8000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f711e6a2000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f711e3e9000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f711e100000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f711def5000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f711dbc3000)
libQt5Gui.so.5 => /usr/lib/qt5/lib/libQt5Gui.so.5 (0x00007f711d4ea000)
libQt5Core.so.5 => /usr/lib/qt5/lib/libQt5Core.so.5 (0x00007f711cdcb000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f711cb43000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f711c927000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f711c5f9000)
libc.so.6 => /lib/libc.so.6 (0x00007f711c27b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f711c066000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f711be51000)
/lib64/ld-linux-x86-64.so.2 (0x00007f712084a000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f711bc4e000)
libxcb-util.so.1 => /usr/lib/libxcb-util.so.1 (0x00007f711ba49000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f711b67a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f711b463000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f711b250000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f711afed000)
librt.so.1 => /lib/librt.so.1 (0x00007f711ade5000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f711aba8000)
libm.so.6 => /lib/libm.so.6 (0x00007f711a924000)
libicui18n.so.54 => /usr/lib/libicui18n.so.54 (0x00007f711a4bb000)
libicuuc.so.54 => /usr/lib/libicuuc.so.54 (0x00007f711a11b000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f7119eef000)
libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007f7119ca7000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f7119aa4000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f711989f000)
libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0x00007f711969b000)
libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f7119498000)
libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x00007f7119296000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f711908d000)
libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007f7118e8b000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f7118c86000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f7118a79000)
libicudata.so.54 => /usr/lib/libicudata.so.54 (0x00007f711704e000)
root@FE-AMDe2100:~ #
我试图添加
QT_PLUGIN_PATH=/usr/lib/qt5/plugins/platforms/
minimyth@FE-AMDe2100:~ $ env
USER=minimyth
XINITRC=/etc/X11/xinit/xinitrc
HOME=/home/minimyth
KDE_HOME_READONLY=1
XSERVERRC=/etc/X11/xinit/xserverrc
LOGNAME=minimyth
USE_VDPAU_COLORKEY=1
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/libexec:/usr/lib/qt5/bin
ICEAUTHORITY=/home/minimyth/.ICEauthority
DISPLAY=:0.0
LANG=en_US.UTF-8
PERL_BADLANG=0
SHELL=/bin/ash
PWD=/home/minimyth
QT_PLUGIN_PATH=/usr/lib/qt5/plugins/platforms/
仍然没有去: - (
基本上我没有问题可能是......
有什么想法吗?