Failed to compile QT 4.7 to arm
-
Hi
I would like to compile QT 4.7 to arm tegra board.
I have download QT 4.7 and run this command
./configure –platform qws/linux-arm-gnueabi-g++
And I get this error
g++: arm-linux-gnueabi-g++: No Such file or directory.
I update the path with the relevant directory the crosscompile located.
If I write this command this command in the shell
arm-linux-gnueabi-g++
the output is : no input files
so it's seems the path is correct
How can I solve this problem
Kani -
Hi kani,
Try the following:
@
./configure -platform linux-g++ -xplatform qws/linux-arm-gnueabi-g++
@If you are not on Linux, adjust the platform parameter accordingly =)
-
This is the configure line used to build Qt for ARM here, the only difference is that here I build Qt for symbian/linux-gcce.
The binaries (e.g. qmake, moc) will be compiled to x86 so you can run them in your system, but they will generate binaries for ARM.
EDIT: Qt libs itself will be built for ARM.
-
I did this to compile for BeagleBoard (arm):
-
install beagleboard's tool-chain in /usr/local/angstrom (you must install your where you want)
-
extract qt 4.7 source
-
in the source edit mkspecs/qws/linux-arm-g++/qmake.conf remove the content and put:
@
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASEinclude(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)modifications to g++.conf
QMAKE_CC = /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc
QMAKE_CXX = /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++
QMAKE_LINK = /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++
QMAKE_LINK_SHLIB = /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++modifications to linux.conf
QMAKE_AR = /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-objcopy
QMAKE_STRIP = /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-stripload(qt_config)
@You must replace /usr/local/angstrom/arm/bin with your toolchain path and use the right binary (for example your cross-tool gcc should be arm-linux-gnueabi-g++ or arm-linux-g++ ecc... )
-
./configure -opensource -confirm-license -no-qt3support -release -nomake examples -nomake demos -embedded arm -little-endian -xplatform qws/linux-arm-g++ -prefix /opt/qt4-4.7.0-beagle -qt-gfx-vnc
-
make
-
make install (as root)
-
-
Hi
Thanks for the replays
IN qt 4.7 I didn't find any xplatform or -embedded parameters in configuration help.
I have tried ./configure -platform linux-g++ -xplatform qws/linux-arm-gnueabi-g++
but all the bin and lib where compiled to x86 and not arm.
Any others ideas? how to compile it to ARM env nvida tegra board
Kani -
[quote author="kani" date="1285783223"]Hi
Thanks for the replays
IN qt 4.7 I didn't find any xplatform or -embedded parameters in configuration help.
[/quote]Qt 4.7 has this parameter. Maybe it is not listed in --help, but it's another topic.
[quote author="kani" date="1285783223"]
I have tried ./configure -platform linux-g++ -xplatform qws/linux-arm-gnueabi-g++
but all the bin and lib where compiled to x86 and not arm.
Any others ideas? how to compile it to ARM env nvida tegra board
Kani
[/quote]Check if your linux-arm-gnueabi-g++ is in your PATH. Also, take a look if there are other variables to adjust; you can find it in mkspec/qws/linux-arm-gnueabi-g++/qmake.conf
-
I am trying to cross compile QT 4.7 for mini2440 without success. Below is the error:
make[1]: Entering directory/opt/qtsdk-2010.05/qt/src/corelib' /media/b1cc59e2-c2f4-4a5e-acee-fc4dada4edbe/opt/Boardcon/4.3.3/bin/arm-linux-g++ -c -include .pch/release-shared-emb-arm/QtCore -pipe -fno-exceptions -O0 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-arm-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm -I../../include -o .obj/release-shared-emb-arm/qvariantanimation.o animation/qvariantanimation.cpp In file included from animation/qvariantanimation.cpp:694: ../../include/QtCore/qatomic_i386.h: In member function 'bool QBasicAtomicInt::testAndSetOrdered(int, int)': ../../include/QtCore/qatomic_i386.h:144: error: impossible constraint in 'asm' {standard input}: Assembler messages: {standard input}:350: Error: bad instruction
lock'
{standard input}:351: Error: bad instructionincl [r2,#0]' {standard input}:352: Error: bad instruction
setne [fp,#-5]'
{standard input}:390: Error: bad instructionlock' {standard input}:391: Error: bad instruction
decl [r2,#0]'
{standard input}:392: Error: bad instructionsetne [fp,#-5]' make[1]: *** [.obj/release-shared-emb-arm/qvariantanimation.o] Error 1 make[1]: Leaving directory
/opt/qtsdk-2010.05/qt/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2can anybody help me ?