Installing QTopia today ======================= If you have `GCC 2.95.x`_ installed =================================== You can just follow the instruction from `this how-to`_, and all will be good. If you have a newer version =========================== If for example you actually do C++ development, you can't use a GCC before 3.1, as it would lack some fundamental components (stingstream, just to say one) and have several quite big bugs. Here lies the problem: the packages suggested by `the afore-mentioned how-to`_ are compiled using GCC 2.95.2, and since the ABI has changed radically, programs compiled with GCC 3.x will not link against those qt-embedded libraries. So we just install GCC 2.95.2, right? **Wrong!** GCC 2.95.2 has a bug in the libio library (basis for C++ streams) which makes it impossible to compile it against glibc 2.2 (and since you have an up-to-date GCC, I'm sure you'll have an up-to-date glibc, too) (the type for file offsets has changed: from int to a struct containing two int, to allow for 64 bit file positions). We need to use GCC 2.95.3, which contains a fix for this problem (as far as I could see from the diff, it shouldn't support files larger than 4GB, but since we are going to use to test programs intended for a Zaurus, it's not such a limitation) (the ABI of .3 is the same as the .2 one) Now we don't want 2.95 to overwrite our 3: we want to install it in a separate directory. This is accomplished passing the --prefix option to the configure script. Step-by-step instructions ------------------------- Ready-made packages ``````````````````` Download: * `gcc 2.95.2 cross compiler x86-arm`_ * `binutils 2.11.2 cross x86-arm`_ * `glibc 2.2.2 arm`_ * `header Linux 2.4.6 arm`_ * `QTopia 1.5.0 free edition, both x86 and arm`_ Install all of them (using rpm, as root). Two directories will be created: /opt/Embedix with the arm toolchain, and /opt/Qtopia with libraries and programs to compile both for x86 and arm. GCC ``` Download gcc-core-2.95.3.tar.gz and gcc-g++-2.95.3.tar.gz from a `GNU mirror`_. To compile (I assume you put the GCC tarballs in /tmp): * cd /tmp * tar zxvf gcc-core-2.95.3.tar.gz;tar zxvf gcc-g++-2.95.3.tar.gz * mkdir gcc-obj;cd gcc-obj * ../gcc-2.95.3/configure --prefix=/opt/Embedix/native --enable-shared * make bootstrap * make install (this should be done as root, unless you gave your normal user write permissions on /opt/Embedix) It might be a bit strange to put a native compiler under /opt/Embedix, but it looked convenient, to make it clear in which context it is used. Some script ``````````` A couple of scripts are very usefule to set up enviornment variables in the two cases: native compilation (during development) and cross-compilation (at the end, to deploy the program for the Zaurus). Get them from Sharp: `dev-x86-qpe`_ and `dev-arm-qpe`_. In dev-x86-qpe change the lines setting PATH and LD_LIBRARY_PATH with the following: :: PATH=$QTDIR/bin:$QPEDIR/bin:/opt/Embedix/tools/bin:/opt/Embedix/native/bin:${ORG_PATH} LD_LIBRARY_PATH=$QTDIR/lib:/opt/Embedix/native/lib:${ORG_LD_LIBRARY_PATH} .. In this way you'll get the GCC 2.95.3 we just compiled. .. _`dev-x86-qpe`: http://docs.zaurus.com/downloads/dev-x86-qpe.sh .. _`binutils 2.11.2 cross x86-arm`: http://docs.zaurus.com/downloads/binutils-cross-arm-2.11.2-0.i386.rpm .. _`gnu mirror`: http://www.gnu.org/server/list-mirrors.html .. _`qtopia 1.5.0 free edition, both x86 and arm`: http://docs.zaurus.com/downloads/qtopia-free-1.5.0-1.i386.rpm .. _`glibc 2.2.2 arm`: http://docs.zaurus.com/downloads/glibc-arm-2.2.2-0.i386.rpm .. _`header linux 2.4.6 arm`: http://docs.zaurus.com/downloads/linux-headers-arm-sa1100-2.4.6-3.i386.rpm .. _`the afore-mentioned how-to`: http://docs.zaurus.com/linux_compiler_setup_howto.shtml .. _`this how-to`: http://docs.zaurus.com/linux_compiler_setup_howto.shtml .. _`dev-arm-qpe`: http://docs.zaurus.com/downloads/dev-arm-qpe.sh .. _`gcc 2.95.x`: http://gcc.gnu.org/gcc-2.95/ .. _`gcc 2.95.2 cross compiler x86-arm`: http://docs.zaurus.com/downloads/gcc-cross-sa1100-2.95.2-0.i386.rpm