PDA

View Full Version : Trying hard for qt-embedded compilation, but giving file in wrong format.



mukesh.savaliya
16th January 2012, 08:04
Hi,All

I have downloaded qt-everywhere-opensource-4.7.2.tar.gz. My target board is iMX51 with cortex-A8 processor. I am using toolchain gcc-4.4.4-glibc-2.11.1-multilib-1.0 compiled with the ltib given by freescale.

I am trying to compile qt-embedded with the following features as availble on qt support site.

./configure -v -embedded arm -xplatform qws/linux-arm-g++ -prefix /opt/qt-embedded-4.7.2/ -no-webkit -no-qt3support -no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools -opensource -confirm-license -little-endian -host-little-endian -qt-mouse-tslib -v

But i am getting the below error:

/usr/bin/ld: project.o: Relocations in generic ELF (EM: 40)
project.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status


For tslib My procedure is as below and its installed successfully.

$cd tslib
$run ./autogen.sh

$export CC=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc
$export CXX=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-g++
$export CONFIG_SITE=arm-linux.autogen

$./configure --build=i386-linux --host=arm-linux --target=arm --enable-input --prefix=/opt/tslib/

$make

$sudo make install

Thank you.

mukesh.savaliya
16th January 2012, 11:29
Friends,

When i Exported the Cross compiler and recompile the qt, it works fine and gets installed at the /opt/qt-embedded-4.7.2. All the executables generated are for the ARM. Now, when i do qmake, it generates Makefile too but for the host system instead of ARM.

The Makefile is like this:

/************************************************** **********************************/
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake

/************************************************** **********************************/

This means qmake is not configured properly. Can some one please help me, what went the wrong ? what should i change ?
Thank you.

mukesh.savaliya
25th January 2012, 05:33
Finally done.

Thank you for your great support.