我在我的x86 ubuntu 14.04目标上交叉编译qt4.7.4到aarch64 linux板,我成功了。
但是,有一个问题:我找不到bin/lrelease
和lib/libQtDesigner.so
等等。
我如何配置它以便我可以构建它们?
我的配置是这样的:
export ROOTFS=/aarch64_2
export CROSS_COMPILE=aarch64-unknown-linux-gnueabi
export PKG_CONFIG_PATH=$ROOTFS/usr/local/lib/aarch64-linux-gnu/pkgconfig:$ROOTFS/usr/lib/aarch64-linux-gnu/pkgconfig:$ROOTFS/usr/lib/pkgconfig:$ROOTFS/usr/share/pkgconfig:$ROOTFS/usr/local/lib/pkgconfig:$ROOTFS/usr/local/share/pkgconfig
./configure -release -v -fast -opensource
-developer-build -confirm-license
-nomake examples -nomake demos
-nomake docs -nomake translations
-no-openssl -webkit -no-qt3support
-no-rpath -phonon -no-opengl
-dbus -arch aarch64 -xplatform linux-g++-aarch64 -force-pkg-config
和mkspecs / linux-g ++ - aarch64 / qmake.conf是:
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/g++.conf)
include(../common/linux.conf)
QMAKE_CC = $$(CROSS_COMPILE)-gcc
QMAKE_CXX = aarch64-unknown-linux-gnueabi-g++
QMAKE_LINK = aarch64-unknown-linux-gnueabi-g++
QMAKE_LINK_SHLIB = aarch64-unknown-linux-gnueabi-g++
QMAKE_AR = $$(CROSS_COMPILE)-ar cr
QMAKE_OBJCOPY = $$(CROSS_COMPILE)-objcopy
QMAKE_STRIP = $$(CROSS_COMPILE)-strip
QMAKE_LFLAGS_RELEASE = -Wl,-O2
QMAKE_INCDIR += $$(ROOTFS)/usr/include
QMAKE_INCDIR += $$(ROOTFS)/usr/include/aarch64-linux-gnu
QMAKE_LIBDIR += $$(ROOTFS)/usr/lib
QMAKE_LIBDIR += $$(ROOTFS)/usr/lib/aarch64-linux-gnu
QMAKE_LIBDIR += $$(ROOTFS)/lib
QMAKE_LIBDIR += $$(ROOTFS)/lib/aarch64-linux-gnu
QMAKE_INCDIR_X11 = $$(ROOTFS)/usr/include
QMAKE_LIBDIR_X11 = $$(ROOTFS)/usr/lib
QMAKE_INCDIR_OPENGL = $$(ROOTFS)/usr/include
QMAKE_LIBDIR_OPENGL = $$(ROOTFS)/usr/lib
#QMAKE_CFLAGS = -fpermissive
QMAKE_LFLAGS = -Wl,-rpath-link $$(ROOTFS)/usr/lib -Wl,-rpath-link $$(ROOTFS)/usr/lib/aarch64-linux-gnu -Wl,-rpath-link $$(ROOTFS)/lib -Wl,-rpath-link $$(ROOTFS)/lib/aarch64-linux-gnu
答案 0 :(得分:1)
最后,我知道为什么。 configure shell有一个注释:交叉编译时,默认情况下不构建工具。因此,如果我们进行交叉编译并且我们想要编译工具,只需在命令行添加-make工具。