cannot execute binary file
I downloaded the QT Embedded evaluation package (qt-embedded-linux-eval-src-4.5.0.tar.tar) and installed on Ubuntu 8.10. After configuring and compiling, I am not able to run any QT embedded examples. I understand that QT embedded using the Virtual Frame Buffer (qvfb) when running from my desktop therefore I was able to start qvfb but still was unable to run any QT embedded examples. I get the following error message “cannot execute binary fileâ€, any help will be appreciated. Below are the steps:
1). My target platform is ARM therefore I configured QT for ARM.
./configure -embedded arm -xplatform qws/linux-arm-g++
2). Next I ran make and everything compiled and linked ok, all examples were built.
3). Next I ran make install via sudo
4). Next I cd to the addressbook/part1 example and tried to run it.
a). start virtual frame buffer in the background
qvfb &
b). start the part1 example
./part1 –qws –display QVFb:0
bash: ./part1: cannot execute binary file
---- snippet of readelf header ------
$ readelf -h part1
ELF Header:
Magic: 7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: ARM
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x9fcc
Start of program headers: 52 (bytes into file)
Start of section headers: 13652 (bytes into file)
Flags: 0x2, has entry point, GNU EABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 6
Size of section headers: 40 (bytes)
Number of section headers: 35
Section header string table index: 32
Re: cannot execute binary file
Below are the parameters from the part1 Makefile when it is executed manually.
mturner@VB-Ubuntu:~/myqt/qt-embedded-linux-eval-src-4.5.0/examples/tutorials/addressbook/part1$ make -f Makefile
arm-linux-g++ -c -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_EDITION=QT_EDITION_DESKTOP -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../mkspecs/qws/linux-arm-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -I. -I.moc/release-shared-emb-arm -I.uic/release-shared-emb-arm -o .obj/release-shared-emb-arm/main.o main.cpp
arm-linux-g++ -fno-exceptions -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.5.0-arm/lib -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.5.0-arm/lib -o part1 .obj/release-shared-emb-arm/addressbook.o .obj/release-shared-emb-arm/main.o .obj/release-shared-emb-arm/moc_addressbook.o -L/home/mturner/myqt/qt-embedded-linux-eval-src-4.5.0/lib -lQtGui -L/home/mturner/myqt/qt-embedded-linux-eval-src-4.5.0/lib -lQtNetwork -lQtCore -lm -lrt -ldl -lpthread