QtOnTheZ.txt
From OESF
(rv spam) |
|||
(36 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: | ||
| - | =========== | ||
I have been trying for a few weeks various things to get Qt to compile on | 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. | the Zaurus. I was resigned to PyQt then I thought I'd give it one more try. | ||
Line 29: |
Line 28: | ||
I think a script would work fine for this but that's a later step. | I think a script would work fine for this but that's a later step. | ||
| - | == | + | ==My Zaurus== |
| - | 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) | |
| - | + | ||
| - | 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/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/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 61: | ||
needed later. And so linker could find libmng & libpng. | needed later. And so linker could find libmng & libpng. | ||
| - | == | + | ==Steps== |
| - | 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 | |
| - | 4) This fools moc which is looking for this stdc lib of this name in | + | 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) | + | 5) what Qt expects gcc to be called |
| - | + | cp /mnt/cf/bin/c++ /mnt/cf/bin/g++ | |
| - | + | 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 93: |
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 |
| - | + | ||
| - | + | 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== |
| - | + | ||
| - | + | * 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 :) | Your Milage May Vary :) | ||
Line 116: |
Line 125: | ||
-Enjoy | -Enjoy | ||
Jim Murff | Jim Murff | ||
| - | |||
jmurff@pacbell.net | jmurff@pacbell.net | ||
| - | http://www.geocities.com/jmurff1 | ||
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

