Hi,
I don't fully understand how to cross-compile a Qt program for arm.
I have a debian machine with the IDE (X11/x86) and I need to cross-compile my projets for QtEmbedded (arm) without X or framebuffer - just console projects.
If I undestood correctly I must cross-compile the QtEmbedded before, and then cross-compile my own application with them.
This is my mkspec:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC = arm-linux-gnueabi-gcc
QMAKE_CXX = arm-linux-gnueabi-g++
QMAKE_LINK = arm-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-linux-gnueabi-objcopy
QMAKE_STRIP = arm-linux-gnueabi-strip
load(qt_config)
|
Here the ./configure command:
|
Source code
|
1
|
./configure -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-webkit -no-gui -release -opensource -shared -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -fast -prefix /home/mark/QtSDK/arm -v
|
When I launch make I get the following error:
|
Source code
|
1
2
3
4
|
/home/mark/QtSDK/QtSources/4.8.1/bin/moc: /home/mark/QtSDK/QtSources/4.8.1/bin/moc: cannot execute binary file
make[1]: *** [.moc/release-shared-emb-arm/moc_qabstractanimation.cpp] Error 126
make[1]: Leaving directory `/home/mark/QtSDK/QtSources/4.8.1/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2
|
What's bin/moc?
|
Source code
|
1
2
|
file bin/moc
bin/moc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x33db628d7325eab3ef1b7fafff2cb7a26026cfd8, not stripped
|
well, I see it was cross-compiled and of course it cannot be executed on the host machine.
Questions:
- do you see any evidence of mistakes?
- how should I fix the issue?
Thanks in advance