OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Qt/Qtopia => Topic started by: summer00 on June 08, 2004, 09:18:21 pm

Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 08, 2004, 09:18:21 pm
i tried to cross compile a program with ./configure script, i have everything necessary installed....

this are the steps i have followed

source dev-arm-qpe.sh
./configure
.
error statement:

....Checking for QT library ...not found
.....giving up

any ideas on thi s? thanks a lot
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: doc on June 09, 2004, 08:48:17 pm
You need to obtain the QPE SDK from Trolltech (Either the GPL or Commercial edition) depending on which type of software you are developing:

http://www.trolltech.com/download/qtopia/i...ndex.html?cid=6 (http://www.trolltech.com/download/qtopia/index.html?cid=6)
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 09, 2004, 10:28:50 pm
but i have already installed qtopia-free-1.5.0-1.i386.rpm.....i
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: Mickeyl on June 10, 2004, 06:15:51 am
Which program are you compiling? Are you sure it looks for the embedded version of Qt ?
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: tumnus on June 10, 2004, 06:47:43 am
For starters, your configure command needs to be more like this:

CC=arm-linux-gcc ./configure --target=arm-linux

If that still doesn\'t work, then either:

- The Qtopia SDK didn\'t install properly
or
- Something is wrong with your dev-arm-qpe.sh
or
- The configure script isn\'t working properly

Did you follow the cross-compiler howto (http://docs.zaurus.com/index.php?id=linux_compiler_setup_howto) all the way through, even building the example Qtopia app, just to confirm the toolchain is working?
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 10, 2004, 10:12:14 pm
i tried to execute this :

CC=arm-linux-gcc ./configure --target=arm-linux

here are the results :

loading cache ./config.cache
checking for gcc... arm-linux-gcc
checking whether the C compiler (arm-linux-gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: doc on June 10, 2004, 10:46:42 pm
Either you don\'t have gcc configured right or you haven\'t installed the cross compiler rpms?

What version/distro of Linux are you using?

I have built apps using Red Hat 9 and Fedora Core 1.  Haven\'t tried Core 2 yet.
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 13, 2004, 10:23:25 pm
im using redhat 9 kernel 2.4.26, may i know how to configure both c and c++ compilers? thanks
Quote
Either you don\'t have gcc configured right or you haven\'t installed the cross compiler rpms?

What version/distro of Linux are you using?

I have built apps using Red Hat 9 and Fedora Core 1.  Haven\'t tried Core 2 yet.
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: waalkman on June 13, 2004, 10:36:14 pm
Quote
....Checking for QT library ...not found
.....giving up

any ideas on thi s? thanks a lot


Do you have QT in your library path? Where is your config script looking for QT?

If all else fails, post your configure script.


John
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 13, 2004, 11:05:25 pm
Quote
Quote
....Checking for QT library ...not found
.....giving up

any ideas on thi s? thanks a lot


Do you have QT in your library path? Where is your config script looking for QT?

If all else fails, post your configure script.


John



QT ? a file named \"QT\"?

the library path :
file:/opt/Qtopia/sharp/lib    or   file:/opt/Qtopia/lib ?

i run dev-arm-pde.sh before i execute ./configure, could it be the configuration in dev-arm-pde.sh not correct?
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: waalkman on June 14, 2004, 12:03:27 am
Quote from: \"summer00\"
Quote
Quote
....Checking for QT library ...not found
.....giving up

any ideas on thi s? thanks a lot


Do you have QT in your library path? Where is your config script looking for QT?

If all else fails, post your configure script.


John


Quote

QT ? a file named \"QT\"?  


Well no, Qtopia itself.

Quote

the library path :
file:/opt/Qtopia/sharp/lib    or   file:/opt/Qtopia/lib ?


Good, so where is your ./configure file looking for it?

Quote

i run dev-arm-pde.sh before i execute ./configure, could it be the configuration in dev-arm-pde.sh not correct?


Mmmm, maybe. Post it so brighter minds than mine can have a look-see.


John
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 14, 2004, 12:15:10 am
#################
# file dev-rm-qpe.sh#
#################

#!/bin/bash
# dev-arm-qpe.sh script
# location : /usr/bin
#

if [ -z ${ORG_PATH} ]
then
ORG_PATH=${PATH}
export ORG_PATH
fi

if [ -z ${ORG_LD_LIBRARY_PATH} ]
then
ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
export ORG_LD_LIBRARY_PATH
fi

#CROSSCOMPILE=/opt/Embedix/tools/arm-linux:/usr/local/x86/2.95.3/bin:/opt/Embedix/tools/arm-linux
QPEDIR=/opt/Qtopia/sharp
QTDIR=/opt/Qtopia/sharp
PATH=$QTDIR/bin:$QPEDIR/bin:$CROSSCOMPILE/bin:${ORG_PATH}
TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-sharp-g++/

LD_LIBRARY_PATH=/usr/src/qt-embedded-free-3.3.2/lib:${ORG_LD_LIBRARY_PATH}

### Commented out next line. No need to set LD_LIBRARY_PATH !
### LD_LIBRARY_PATH=$QTDIR/lib:${ORG_LD_LIBRARY_PATH}

export QPEDIR QTDIR PATH LD_LIBRARY_PATH TMAKEPATH PS1
echo \"Altered environment for Sharp Zaurus Development ARM\"


i think if this script is executed, then ./configure will follow tha paths above....correct me if im wrong , thanks
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: Stubear on June 14, 2004, 01:43:09 am
It\'s possible that even with the paths set correctly that configure has been badly set up or is searching for a higher version of QT than the Z uses - have a look in config.log for the exact error - and also the path it is using

Stu
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 14, 2004, 02:29:46 am
my root/config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:533: checking for gcc
configure:646: checking whether the C compiler (gcc  ) works
configure:662: gcc -o conftest    conftest.c  1]&5
configure:688: checking whether the C compiler (gcc  ) is a cross-compiler
configure:693: checking whether we are using GNU C
configure:721: checking whether gcc accepts -g
configure:753: checking how to run the C preprocessor
configure:837: checking for c++
configure:869: checking whether the C++ compiler (c++  ) works
configure:885: c++ -o conftest    conftest.C  1]&5
configure:911: checking whether the C++ compiler (c++  ) is a cross-compiler
configure:916: checking whether we are using GNU C++
configure:944: checking whether c++ accepts -g
configure:976: checking how to run the C++ preprocessor
configure:994: c++ -E  conftest.C ]/dev/null 2]conftest.out
configure:1020: checking whether gcc needs -traditional
configure:1069: checking for moc
configure:1106: checking for uic
configure:1141: checking location of Qt header files


seems like it stoped at Qt header files
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: zenyatta on June 14, 2004, 04:28:23 am
summer00: now you need to look inside configure at line 1141 and find out what exactly it is trying to do when it fails. It will check for the existence of certain files in certain directories. You can then find those files and copy them to the directories where configure is looking.

z.
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: summer00 on June 14, 2004, 04:39:59 am
this is it :

echo $ac_n \"checking location of Qt header files\"\"... $ac_c\" 1]&6
echo \"configure:1138: checking location of Qt header files\" ]&5
if eval \"test \"`echo \'$\'\'{\'ac_cv_qt_inc\'+set}\'`\" = set\"; then
  echo $ac_n \"(cached) $ac_c\" 1]&6
else
 
  if test -f $QTDIR/include/qglobal.h; then
    ac_cv_qt_inc=$QTDIR/include
  elif test -f /usr/lib/qt3/include/qglobal.h; then
    ac_cv_qt_inc=/usr/lib/qt3/include
  elif test -f /usr/local/include/qt/qglobal.h; then
    ac_cv_qt_inc=/usr/local/include/qt
  elif test -f /usr/include/qt/qglobal.h; then
    ac_cv_qt_inc=/usr/include/qt
  elif test -f /usr/share/qt3/include/qglobal.h; then
    ac_cv_qt_inc=/usr/share/qt3/include
  elif test -f /usr/include/qglobal.h; then
    ac_cv_qt_inc=/usr/include
  fi
fi

i have no idea whta QTDIR is ....
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: Mickeyl on June 14, 2004, 05:05:08 am
It would help if you would describe what you are doing, i.e. what application you want to compile against what set of libraries for what target platform.
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: zenyatta on June 14, 2004, 05:06:53 am
QTDIR is an environment variable. Environment variables are maintained by the shell (the program that manages the command line). You can list all environment variables and their values if you type

env

at the command line. You need to set QTDIR to the location of your Qt files. So if you installed Qt in, for example, /usr/share/qt2.3.3 you should type

QTDIR=/usr/share/qt2.3.3
export QTDIR
./configure

at the command line.

If you don\'t know where your Qt is installed, try this command:

ipkg files qt-devel

It will list all files in the qt-devel package - all of them will be under one directory (and you should set that as QTDIR). If the command tells you that qt-devel is not installed then... well, you need to install qt-devel.

Alternatively, you can do

find / -name qglobal.h

which will find all files named \"qglobal.h\" on your Zaurus. You can then set QTDIR so that configure finds that file.

Hope this helps.

z.
Title: Cross compiling cpp(gcc-cross-2.95)-QT library not found
Post by: waalkman on June 14, 2004, 09:31:52 pm
Yeah, it looks like it can\'t find the header file where your program expects them to be.

This problem happens (for example) when the developer uses Distro-X to create the program and you use Distro-Y to try to build it (SuSE and Redhat users had/have this problem quite often).

The reason is because Distro-X will install its Qtopia header files in one location and Distro-Y will install the exact same files somewhere else!

Proof that the farm is indeed run by lunatics.


John