2 u014652086 u014652086 于 2016.05.11 15:30 提问

QT5 交叉编译 配置configure出错
  • cd qtbase
  • /opt/qt-everywhere-opensource-src-5.4.1/qtbase/configure -top-level -v -prefix /opt/qt-everywhere-opensource-src-5.4.1/_install -opensource -confirm-license -release -make libs -xplatform linux-arm-gnueabi-g++ -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-zlib -no-opengl -no-sse2 -no-openssl -no-nis -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -nomake examples -nomake tools -nomake tests

This is the Qt Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) versions 3.

You have already accepted the terms of the Open Source license.

arm-none-linux-gnueabi-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
arm-none-linux-gnueabi-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
Symbolic function binding disabled.
DEFAULT_INCDIRS="/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2
/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/arm-none-linux-gnueabi
/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/include/c++/4.5.2/backward
/usr/local/arm/arm-2011.03/lib/gcc/arm-none-linux-gnueabi/4.5.2/include
/usr/local/arm/arm-2011.03/lib/gcc/arm-none-linux-gnueabi/4.5.2/include-fixed
/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/include
/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/libc/usr/include
"
DEFAULT_LIBDIRS="/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/libc/lib
/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/libc/usr/lib
/usr/local/arm/arm-2011.03/lib/gcc/arm-none-linux-gnueabi/4.5.2
/usr/local/arm/arm-2011.03/lib/gcc
/usr/local/arm/arm-2011.03/arm-none-linux-gnueabi/lib
"
Creating qmake...
gmake: Nothing to be done for `first'.
Running configuration tests...
Failed to process makespec for platform 'linux-arm-gnueabi-g++'
/opt/qt-everywhere-opensource-src-5.4.1/qtbase/configure: line 3869: /opt/qt-everywhere-opensource-src-5.4.1/qtbase/bin/qmake: cannot execute binary file

4个回答

u014652086
u014652086   2016.05.11 15:31

配置文件入下:
#!/bin/sh
echo 'build Qt5 for embedded linux Author ZYP'
mkdir _install
$PWD/configure -v \
-prefix $PWD/_install \
-opensource -confirm-license \
-release \
-make libs \
-xplatform linux-arm-gnueabi-g++ \
-optimized-qmake \
-pch \
-qt-sql-sqlite \
-qt-libjpeg \
-qt-zlib \
-no-opengl \
-no-sse2 \
-no-openssl \
-no-nis \
-no-cups \
-no-glib \
-no-xcursor -no-xfixes -no-xrandr -no-xrender \
-no-separate-debug-info \
-nomake examples -nomake tools -nomake tests
#make && make installs

u014652086
u014652086   2016.05.11 15:32

交叉编译工具链:
[root@localhost qt-everywhere-opensource-src-5.4.1]# arm-none-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/arm/arm-2011.03/bin/../libexec/gcc/arm-none-linux-gnueabi/4.5.2/lto-wrapper
Target: arm-none-linux-gnueabi
Configured with: /scratch/janisjo/arm-linux-lite/src/gcc-4.5-2011.03/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} -D__CS_SOURCERYGXX_MAJ__=2011 -D__CS_SOURCERYGXX_MIN__=3 -D__CS_SOURCERYGXX_REV__=41 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2011.03-41' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpc=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-libelf=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41)

u014652086
u014652086   2016.05.11 15:34

修改编译配置文件:
[root@localhost qt-everywhere-opensource-src-5.4.1]# cat qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
#

qmake configuration for building with arm-linux-gnueabi-g++

#

MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib

QT_QPA_DEFAULT_PLATFORM = linux #eglfs

QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a

QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

modifications to g++.conf

QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

modifications to linux.conf

QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_NM = arm-none-linux-gnueabi-nm -P
QMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)

hgz_gs
hgz_gs   2017.05.17 16:52

解决了吗。。。。。难兄难弟

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!