Installing QTopia today |
|
If you have GCC 2.95.x installedYou can just follow the instruction from this how-to, and all will be good. If you have a newer versionIf 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 instructionsReady-made packagesDownload:
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. GCCDownload 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):
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 scriptA 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:
In this way you'll get the GCC 2.95.3 we just compiled.
|