compiling qtopia

avinash mlv
I am compiling qtopia on rhel-6 32bit on VM Ware there are several issues
being reported.I have purchased your product MINI2440 from that CD i have
installed Qtopia-sdk when i try to configure it several issues are being
reported Kindly resolve them 

My compiler is  installed as 
[root@localhost local]# l
4.4.3  arm-linux-gcc-4.4.3.tar
[root@localhost local]# pwd
/usr/local
[root@localhost local]# 

I have set the required  path as shown below:
[root@localhost qt-everywhere-opensource-src-4.6.1]# echo $PATH
/usr/local/4.4.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbi
n:/home/avinash/bin:/home/avinash/bin


My directory structure is

[avinash@localhost x86-qte-4.6.1]$ ls
build-all  mycon  mysp1  qt-everywhere-opensource-src-4.6.1 
qt-sdk-linux-x86-opensource-2010.01.bin  run
[avinash@localhost x86-qte-4.6.1]$ 

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

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.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_STRIP             = arm-none-linux-gnueabi-strip

load(qt_config)
#
# qmake configuration for common gcc
#

QMAKE_CC                = gcc
QMAKE_CFLAGS            += -pipe
QMAKE_CFLAGS_DEPS       += -M
QMAKE_CFLAGS_WARN_ON    += -Wall -W
QMAKE_CFLAGS_WARN_OFF   += -w
QMAKE_CFLAGS_RELEASE    += -O0
QMAKE_CFLAGS_DEBUG      += -g
QMAKE_CFLAGS_SHLIB      += -fPIC
QMAKE_CFLAGS_STATIC_LIB += -fPIC
QMAKE_CFLAGS_YACC       += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS   += -fvisibility=hidden
QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o
${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}


                                                                           
                                                                           
              
"qmake.conf" 20L, 624C                                                     
                                                                         
18,1          All

[root@localhost qt-everywhere-opensource-src-4.6.1]# ls
bin            config.tests  configure.exe  doc       include 
LGPL_EXCEPTION.txt  LICENSE.GPL3  mkspecs  projects.pro  README  tools
changes-4.6.1  configure     demos          examples  INSTALL  lib         
       LICENSE.LGPL  mycon    qmake         src     translations
[root@localhost qt-everywhere-opensource-src-4.6.1]# cat mycon
./configure -embedded arm -shared -release -no-largefile -qt-sql-sqlite
-no-qt3support -no-phonon -no-svg -no-scripttools -nomake demo -nomake
examples -qt-decoration-default -no-opengl -qt-gfx-linuxfb
-little-endian[root@localhost qt-everywhere-opensource-src-4.6.1]# 
[root@localhost qt-everywhere-opensource-src-4.6.1]# ./mycon
Which edition of Qt do you want to use ?

Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.

o


You have not explicitly asked to use pkg-config and are cross-compiling.
pkg-config will not be used to automatically query cflag/lib parameters for
dependencies


This is the Qt for Embedded Linux 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 General Public License (GPL) versions 3.

Type '3' to view the GNU General Public License version 3.
Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license? yes

Creating qmake. Please wait...
g++ -c -o option.o -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators
-Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/includ
e
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/includ
e/QtCore
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/src/co
relib/global
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/src/co
relib/xml
-DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC
-DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/mkspec
s/qws/linux-x86-g++
-DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT 
option.cpp
gmake: g++: Command not found
gmake: *** [option.o] Error 127
[root@localhost qt-everywhere-opensource-src-4.6.1]# 

[root@localhost x86-qte-4.6.1]# which g++
/usr/bin/which: no g++ in
(/usr/local/4.4.3/bin:/usr/local/4.4.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/loc
al/sbin:/usr/sbin:/sbin:/home/avinash/bin:/home/avinash/bin)
[root@localhost x86-qte-4.6.1]# ^C
[root@localhost x86-qte-4.6.1]# 
[root@localhost x86-qte-4.6.1]# export
PATH=$PATH:/usr/local/4.4.3/arm-none-linux-gnueabi/bin;

[root@localhost x86-qte-4.6.1]# ls
build-all  mycon  mysp1  qt-everywhere-opensource-src-4.6.1 
qt-sdk-linux-x86-opensource-2010.01.bin  run
[root@localhost x86-qte-4.6.1]# which g++
/usr/local/4.4.3/arm-none-linux-gnueabi/bin/g++

Creating qmake. Please wait...
g++ -c -o option.o -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators
-Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/includ
e
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/includ
e/QtCore
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/src/co
relib/global
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/src/co
relib/xml
-DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC
-DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS
-I/home/avinash/armtools/x86-qte-4.6.1/qt-everywhere-opensource-src-4.6.1/mkspec
s/qws/linux-x86-g++
-DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT 
option.cpp
g++: error trying to exec 'cc1plus': execvp: No such file or directory
Assembler messages:
Fatal error: Invalid -march= option: `armv4t'
gmake: *** [option.o] Error 1
[root@localhost qt-everywhere-opensource-src-4.6.1]# 


I do not know how to resolve the problem.Kindly get back  to
me at the earliest.
Regards
Avinash

arvindvish
Hi Avinash,

I have been looking at your problem.

I kind of feel you should change your compiler from 4.4.3 to 4.5.1.

in qmake.conf  do not use arm-none-linux-gnueabi-gcc. instead keep

it to arm-linux-gcc everywhere.

in mkspecs/common/g++.conf

instead of QMAKE_CC                = gcc

use 

QMAKE_CC                = arm-linux-gcc

Likewise for g++.

export PATH=/usr/local/4.5.1/bin:$PATH;
export PATH=$PATH:/usr/local/4.5.1/arm-none-linux-gnueabi/bin;

Now extract your qtsdk.
Go to mkspecs/qws/linux-arm-g++/qmake.conf.
Make the necessary changes.
Likewise make the necessary changes in mkspecs/common/g++.conf.

Now come to qmake directory and do ./mycon.

This should work better than before.

Regards
Arvind