QtOnTheZ.txt

From OESF

(Difference between revisions)
Jump to: navigation, search
(Packages)
Current revision (23:22, 25 September 2007) (edit) (undo)
(rv spam)
 

(26 intermediate revisions not shown.)

Line 1:

Line 1:

-
Setup of Qt Embeded on the Zaurus
+
* Setup of Qt Embeded on the Zaurus
-
by Jim Murff March 23, 2002
+
* by Jim Murff March 23, 2002
 +
* Re-creation of the original document - website no longer available
==Background==
==Background==

Line 36:

Line 37:

==Packages==
==Packages==
-
1) http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/qt-embedded_2.3.2-2.dsc
+
1) Readme like file. Gave me a clue what else QT needed. (libpng, libmng, libz, libjpeg)
-
Readme like file. Gave me a clue what else QT needed. (libpng, libmng, libz, libjpeg)
+
-
2) The distrubution with all header files.
+
http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/qt-embedded_2.3.2-2.dsc
 +
 
 +
 
 +
2) The distribution with all header files.
http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/libqt-emb-dev_2.3.2-2_arm.deb
http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/libqt-emb-dev_2.3.2-2_arm.deb
-
3) http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/qt-emb-doc_2.3.2-2_all.deb
+
3) The docs(man & http), example code and tutorials.
-
The docs(man & http), example code and tutorials.
+
 
 +
http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/qt-emb-doc_2.3.2-2_all.deb
 +
 
 +
4) Other files
-
4) ** http://ftp.nl.debian.org/debian/pool/main/z/zlib/zlib1g-dev_1.1.4-1_arm.deb
+
** http://ftp.nl.debian.org/debian/pool/main/z/zlib/zlib1g-dev_1.1.4-1_arm.deb
http://ftp.nl.debian.org/debian/pool/main/libp/libpng/libpng2-dev_1.0.12-3_arm.deb
http://ftp.nl.debian.org/debian/pool/main/libp/libpng/libpng2-dev_1.0.12-3_arm.deb
http://ftp.nl.debian.org/debian/pool/main/libm/libmng/libmng-dev_1.0.3-3_arm.deb
http://ftp.nl.debian.org/debian/pool/main/libm/libmng/libmng-dev_1.0.3-3_arm.deb

Line 57:

Line 63:

==Steps==
==Steps==
-
1) I used this command to unpack everything into a temporary directory
+
1) I used this command to unpack everything into a temporary directory on the CF card.
-
on the CF card.
+
-
dpkg-deb -xX <filename>.deb /mnt/cf/temp
+
-
This puts everything in a tree /mnt/cf/temp/usr.
+
-
2) I moved all the Qt HTML files to my SD card where I store all my man pages
+
dpkg-deb -xX <filename>.deb /mnt/cf/temp
-
(converted to HTML using man2html).
+
-
mv /mnt/cf/temp/usr/share/doc/html /mnt/card/html/qt-emed
+
-
3) mv /mnt/cf/temp/usr/bin/moc /mnt/cf/bin # Where gcc lives.
+
This puts everything in a tree /mnt/cf/temp/usr.
-
4) This fools moc which is looking for this stdc lib of this name in
+
 
-
$QTDIR (/home/QtPalmtop).
+
2) I moved all the Qt HTML files to my SD card where I store all my man pages (converted to HTML using man2html).
 +
 
 +
mv /mnt/cf/temp/usr/share/doc/html /mnt/card/html/qt-emed
 +
 
 +
3) Move it to where gcc lives.
 +
 
 +
mv /mnt/cf/temp/usr/bin/moc /mnt/cf/bin
 +
 
 +
4) This fools moc which is looking for this stdc lib of this name in $QTDIR (/home/QtPalmtop).
-
ln -s /mnt/cf/lib/lib/libstdc++-3-libc6.1-2-2.10.0.so $QTDIR/libstdc++-libc6.2-2.so.3
+
ln -s /mnt/cf/lib/lib/libstdc++-3-libc6.1-2-2.10.0.so $QTDIR/libstdc++-libc6.2-2.so.3
-
5) cp /mnt/cf/bin/c++ /mnt/cf/bin/g++ # what Qt expects gcc to be called
+
5) what Qt expects gcc to be called
-
6) mv /mnt/cf/temp/usr/include/qt /mnt/cf/include
+
cp /mnt/cf/bin/c++ /mnt/cf/bin/g++
-
7) ln -s /mnt/cf/include/qt $QTDIR/include
+
6)
-
8) mv /mnt/cf/temp/usr/lib/* /mnt/cf/lib
+
mv /mnt/cf/temp/usr/include/qt /mnt/cf/include
 +
 
 +
7)
 +
 
 +
ln -s /mnt/cf/include/qt $QTDIR/include
 +
 
 +
8)
 +
 
 +
mv /mnt/cf/temp/usr/lib/* /mnt/cf/lib
9) Create all library links:
9) Create all library links:
 +
> cd $QTDIR
> cd $QTDIR
> ln -s libjpeg.so libjpeg.a
> ln -s libjpeg.so libjpeg.a

Line 90:

Line 108:

> ln -s libz.so libz.a
> ln -s libz.so libz.a
-
10) Only thing left was getting some DEFINES defined in the Makefiles.
+
10) Only thing left was getting some DEFINES defined in the Makefiles. Had to add -DQT_NO_DRAGANDDROP & -DQT_NO_PROPERTIES to the SYSCONF_CXXFLAGS
-
Had to add -DQT_NO_DRAGANDDROP & -DQT_NO_PROPERTIES to the SYSCONF_CXXFLAGS
+
-
SYSCONF_CXXFLAGS= -pipe -DQWS -fno-exceptions -fno-rtti -O2
+
SYSCONF_CXXFLAGS= -pipe -DQWS -fno-exceptions -fno-rtti -O2 -fno-default-inline -Wall -W -DQT_NO_DRAGANDDROP -DQT_NO_PROPERTIES
-
-fno-default-inline -Wall -W -DQT_NO_DRAGANDDROP -DQT_NO_PROPERTIES
+
11) The example files have hardcoded paths to the includes. I had to remove these too.
11) The example files have hardcoded paths to the includes. I had to remove these too.
- 
==Final Note==
==Final Note==

Current revision

  • Setup of Qt Embeded on the Zaurus
  • by Jim Murff March 23, 2002
  • Re-creation of the original document - website no longer available

Contents

Background

I have been trying for a few weeks various things to get Qt to compile on the Zaurus. I was resigned to PyQt then I thought I'd give it one more try. Searching google for "Qt embedded" proved to be the thing that got me to the right resources. I found this: http://ftp.nl.debian.org/debian. It has everything you can ever imagine in debian package format which BusyBox on the Z happens to be able to unpack.

I was able to get qt-docs, qt-dev and support packages.The site has everything compiled already in many formats including ARM. Also it has lots of source.

Weirdly, using ARM compiled stuff, once I got everything in place it would compile fine but linker core-dumped right at the end of the link when it was close to dumping the executible. I thought i was done for. My goal was to minimally edit the Makefiles that came with the code so they would just work. But all the libraries listed were static. Then I realized - duh! - most of the libraries are already on the Z in dynamic format. So, I created links to them that the Makefiles were looking for (e.g. libqte.a -> to the libqte.so.x.x.x etc.) Then I added the two optional libraries listed in the makefiles (libpng, libmng)that were not on the Z -- And it worked!! The only other problem I found was on the more complicated tutorials and examples I needed some #defines. This required reading some of the header files.

I am not sure what I can legally distribute; so right now here are the just steps I took. I think a script would work fine for this but that's a later step.

My Zaurus

  • Rom 1.11
  • 128Mb SD card (fat16)
  • 512Mb CF card (fat16)
  • ZGCC installed on CF card.

Packages

1) Readme like file. Gave me a clue what else QT needed. (libpng, libmng, libz, libjpeg)

http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/qt-embedded_2.3.2-2.dsc 


2) The distribution with all header files.

http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/libqt-emb-dev_2.3.2-2_arm.deb


3) The docs(man & http), example code and tutorials.

http://ftp.nl.debian.org/debian/pool/main/q/qt-embedded/qt-emb-doc_2.3.2-2_all.deb

4) Other files

  ** http://ftp.nl.debian.org/debian/pool/main/z/zlib/zlib1g-dev_1.1.4-1_arm.deb
     http://ftp.nl.debian.org/debian/pool/main/libp/libpng/libpng2-dev_1.0.12-3_arm.deb
     http://ftp.nl.debian.org/debian/pool/main/libm/libmng/libmng-dev_1.0.3-3_arm.deb
  ** http://ftp.nl.debian.org/debian/pool/main/libj/libjpeg6b/libjpeg-progs_6b-5_arm.deb
   
  ** OPTIONAL I got all these files just to get/have the headers in case they are 
     needed later. And so linker could find libmng & libpng.

Steps

1) I used this command to unpack everything into a temporary directory on the CF card.

dpkg-deb -xX <filename>.deb  /mnt/cf/temp

This puts everything in a tree /mnt/cf/temp/usr.


2) I moved all the Qt HTML files to my SD card where I store all my man pages (converted to HTML using man2html).

mv /mnt/cf/temp/usr/share/doc/html /mnt/card/html/qt-emed 

3) Move it to where gcc lives.

mv /mnt/cf/temp/usr/bin/moc /mnt/cf/bin 

4) This fools moc which is looking for this stdc lib of this name in $QTDIR (/home/QtPalmtop).

ln -s /mnt/cf/lib/lib/libstdc++-3-libc6.1-2-2.10.0.so $QTDIR/libstdc++-libc6.2-2.so.3

5) what Qt expects gcc to be called

cp /mnt/cf/bin/c++ /mnt/cf/bin/g++      

6)

mv /mnt/cf/temp/usr/include/qt /mnt/cf/include

7)

ln -s /mnt/cf/include/qt $QTDIR/include

8)

mv /mnt/cf/temp/usr/lib/* /mnt/cf/lib

9) Create all library links:

  > cd $QTDIR
  > ln -s libjpeg.so libjpeg.a
  > ln -s /mnt/cf/lib/libmng.a .
  > ln -s /mnt/cf/lib/libpng.a .
  > ln -s libqpe.so.1.5.0 libqpe.a  # just in case :)
  > ln -s libqte.so.2.3.2 libqte.a
  > ln -s libz.so libz.a

10) Only thing left was getting some DEFINES defined in the Makefiles. Had to add -DQT_NO_DRAGANDDROP & -DQT_NO_PROPERTIES to the SYSCONF_CXXFLAGS

SYSCONF_CXXFLAGS= -pipe -DQWS -fno-exceptions -fno-rtti -O2 -fno-default-inline -Wall -W -DQT_NO_DRAGANDDROP -DQT_NO_PROPERTIES

11) The example files have hardcoded paths to the includes. I had to remove these too.

Final Note

  • This is as far as I have gotten. Feedback is welcome.
  • I waste space on my cards because Fat16 doesn't support links. You can do better if you have ext2 formated cards.
  • I do get memory warnings when compiling, but I only have the konsole open and I ignore them and everything compiles and links fine.
  • If I compile only and then link seperatly it is happier less to no warnings. Also I tried without Qtopia running and it works well. Not even slow really.

Your Milage May Vary :)

-Enjoy Jim Murff jmurff@pacbell.net

Personal tools