I finally got around to installing GCC on my Nokia N900 today (using Maemo 5). I found it more challenging than I expected so I figured it would be nice to share how I did it.
First, you’ll need root on the device. If it’s not installed it already, see the instructions for installing and using rootsh.
Next, download the packages required for GCC. These can be found with a bit of searching on the Maemo repositories page. The fremantle and maemo5.0 repositories seem to be the same. For
gcc you’ll need these packages:
g++, you’ll also need these packages:
I downloaded these packages onto my computer and copied them to my N900 via mass storage mode. If downloading them directly to your N900 is easier, you could do that.
Once you have all the packages, you can install them by logging in as root (
sudo gainroot) and then running
dpkg -i <package> for each package. You should be able to do this in the order listed above.
The last two
g++ packages (
g++-4.2) depend on themselves so the procedure isn’t quite as easy (you can’t
dpkg -i one and then the other). First, unpack each of the packages by running
dpkg --unpack <package>. Then run
dpkg --configure -a. This will configure both packages at the same time. If they’re not installed yet, you can run
dpkg -i <package> for each of them.
At this point, you should have
gcc and (optionally)
g++ installed. To invoke them, run
g++-4.2. If you like, you can add your own symlinks to run them as just
After installing GCC, I compiled some trivial C and C++ applications, which ran fine. You may need to install more libraries to compile more complicated applications. You should be able to find such libraries by browsing the fremantle repository.
I’ve tried adding http://repository.maemo.org/ as a repository in “App. manager”, but it failed to find packages, which is why I installed them manually as described above. If you know of a way to make that method work, let me know; it would be much cleaner.
Also let me know If I missed any required packages or have the dependencies out of order.
I could have installed the Maemo SDK on my computer using these instructions, but I prefer to have my development environment right on the device so it is always available when I have my device. To use a nicer keyboard, I can SSH into my N900 from any computer with a full-sized keyboard (not just one with the Maemo SDK installed).
Now that GCC is installed, it’s time to compile tangoGPS, my favorite GPS tracing tool, for Maemo 5. Hopefully I’ll have some results to post soon.