Experimental packages for Symbian development on Linux

Published Friday December 17th, 2010
46 Comments on Experimental packages for Symbian development on Linux
Posted in Build system, Qt, S60, Symbian

Updated: 23rd December 2010

A while back we wrote about how you could do development for Symbian in Linux. However, the process was complicated and required a lot of manual setup. We have now taken the concept one step further and we now have prepackaged environments, complete with compiler, libraries and all you need to start developing!

I’m obligated to report our disclaimer though: These packages are completely unsupported by Nokia. They are provided on a “best effort” basis only, and are not guaranteed to work correctly on your system! Also note that the packages are not guaranteed to receive updates, and in the future the same functionality may be delivered in a different format, for example through the Qt SDK.

In addition, currently you cannot use this approach to develop for the N8, because Qt 4.7.1 is not installable there. When N8 receives its first phone update however, it will be upgraded to Qt 4.7.1, and then you should be able to deploy on it.

Now, with that out of the way, let’s dive into the fun!

Being a Gentoo Linux user myself, it was natural to start by making so-called ebuilds (the package descriptions files for Gentoo). For those not familiar with Gentoo, it doesn’t have real packages, but just recipes for how to install packages. Most packages compile from source this way, but this is not strictly required, since your recipe can also contain references to precompiled binaries. The advantage for me was that by having this recipe for building the packages, I could just create Debian packages using the same recipe, and hence get two package types almost for the price of one!

So in other words, the package types provided are Gentoo ebuilds, and Debian .deb packages. RPM users should be able to use the .deb packages by using alien.

Update: A fellow troll was kind enough to provide RPM packages based on Fedora, so RPM users don’t have to use alien anymore!

For Debian (and Ubuntu) users:

Download and install the following packages (32-bit versions only):

For RPM (Fedora) users:

Download and install the following packages (32-bit versions only):

For Gentoo users:

  1. Install layman if you haven’t already, using emerge -av layman
  2. layman -o http://qt.gitorious.org/qt-labs/symbian-overlay/blobs/raw/master/repositories.xml -L (It’s necessary to list the repositories first to update layman’s idea of what is available)
  3. layman -o http://qt.gitorious.org/qt-labs/symbian-overlay/blobs/raw/master/repositories.xml -A qt-symbian-overlay
  4. To indicate your acceptance of the licenses, add ACCEPT_LICENSE="nokia-eula sourcery-g++" to your /etc/make.conf
  5. emerge -av qt-symbian-libs

For all users:

After installing, please reopen your shell (or reboot) to include the environment changes made by the packages.

Some software is still required on the phone itself and unfortunately, there is no way to automate this. The first thing you need to check is if you have App TRK; some phones have it built in, but most phones don’t. It’s easy to check:

  1. Plug it into your computer using the USB cable.
  2. If it says something along the lines of “Debug Services are available”, then App TRK is built in on your phone.
  3. If this is not the case, please use the instructions from the Qt Documentation for App TRK to get it installed.

In addition, some libraries also need to be preinstalled.

  1. You can check if your phone has the required software by entering the Application Manager. On most phones this is available from either Settings in the main manu, or from within Applications on the main menu.
  2. Look for “PIPS Installer” and “Standard C++ library Common”. If they are both at least version 1.06, then you are fine.
  3. Otherwise you need to install the libraries from here: http://pepper.troll.no/s60prereleases/OpenC-1.7-sis-files.zip.You can use the newly installed runonphone tool to install them by doing runonphone -s <sis-file>.
  4. Finally, Qt itself needs to be installed on the phone, which you can do with the commands:
    1. runonphone -s /usr/share/qt4/qt-symbian/lib/Qt.sis
    2. runonphone -s /usr/share/qt4/qt-symbian/lib/QtWebKit.sis

Of course the users of your application shouldn’t have to do this. To make deployment easy for users, see the Deployment guide for Symbian, particularly the part about Smart Installer.

And that’s it! You are now ready to start developing! The only notable difference when developing for Symbian using this package, is that you must use qmake-symbian rather than just qmake. Using that, you should be able to try your first hello world application with the following commands:

  1. cd <my-hello-world-app>
  2. qmake-symbian
  3. make runonphone

Some known issues:

  • Wine sometimes fails with “Failed to write UIDs” when running the rcomp tool. This is something the installer takes into account when installing, but unfortunately there is no way to fix it permanently for every user without manual intervention. The fix is simple, just execute this on the command line: cp /usr/s60-sdk/epoc32/tools/uidcrc.exe `find ~/.wine/ -ipath '*windows/system32'`
  • The gcce ebuild has turned out to be tricky to get right. Sometimes it hangs for no reason; if this happens you can retry it and it may work the second time, but don’t be surprised if it doesn’t work. If this is the case for you, you can install it manually by executing sh /usr/portage/distfiles/symbian-adt-4.4-172-arm-none-symbianelf.bin. Then you can fool Portage into believing you have installed by adding sys-devel/gcce-4.4.172 to /etc/portage/profile/package.provided.
  • More often than not, runonphone fails to autodetect the USB port for your phone when it’s plugged in. If this happens for you, read the section about configuring the USB serial driver in the Qt Documentation. You may also have to specify the -p parameter with /dev/ttyUSB1 or /dev/ttyACM1 to runonphone, as described here.

Good luck!

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Build system, Qt, S60, Symbian


devurandom says:

I’m trying to get your ebuilds to install, but it does not work for me. Where shall I send the build.log? The error is during unpacking into /var/tmp/portage: “Invalid cross-device link”.

I also have another note: Can sys-devel/gcce be build from-source? ATM it just seems to unpack a huge set of binary blobs into the system. Can maybe sys-devel/crossdev be used here?

devurandom says:

I am having trouble installing sys-devel/gcce-4.4.172-r1 using your ebuilds. The error happens during unpacking to /var/tmp/portage: “Invalid cross-device link”. Where shall I send the build.log?

Can sys-devel/gcce be made to build from source? Currently it just seems to unpack a huge bunch of binary blobs into the system. Maybe use sys-devel/crossdev for the task?

I had an initial look at the toolchain, and it looks quite nice. Using the symbian build tools straight away without going via the symbian-abld system is really nice, too – I didn’t know about this makespec up until now. I’ll try to make use of this makespec with gnupoc, too.

I ran into a small issue, though. When running rcomp, I get the error “Failed to write UIDs to ./.rsc”. I fixed this by copying /usr/s60-sdk/epoc32/tools/uidcrc.exe into ~/.wine/drive_c/windows, but is there any better way for rcomp.exe to find it from the epoc32/tools directory directly?

Also, using native build tools instead of the windows ones through wine would be nice, too. 🙂

André Lochotzke says:

Thanks a lot for this. I’m running Ubuntu 10.10 64bit and already have Qt for Symbian (S60 5th Edition) including QtMobility set up (using https://github.com/mstorsjo/gnupoc-package). It was a pain to get there (lots of compiling). My includes are still messy but it works. Most of my development I do with Qt for Linux plus QtMobility (also build by hand).

Could you maybe include QtMobility? It would be so much better to already have it in the packages.
AFAIK the smart installer does not support Qt 4.7.1 yet or does it?

With QtCreator development is also possible and you can even use Bluetooth to connect to your device. So there is no need to use the command line but it is certainly very useful for the initial setup.

Recluse says:

SmartInstaller is still 4.6.3 for me.

Robin Lobel says:

When can we expect the new 4.7.1 SDK ? (Qt+Qt Creator)

devurandom says:

(In reply to comment #3)
> Also, using native build tools instead of the windows ones through wine would be nice, too.
These ebuilds are not using gnupoc, are they?

The source version of Sourcery G++ is available at [1]. I also used OpenC 1.7.5 from [2], which worked well, and the newer Symbian3 SDK from [3].

The installation of all that was quite smooth, and iirc most of it was from source. It would be really nice if you could create an ebuild for each of those. 🙂 (Back then I was doing this on Ubuntu, but it should be a lot simpler on Gentoo.)

[1] http://www.codesourcery.com/sgpp/lite/arm/portal/release1258
[2] http://www.forum.nokia.com/info/sw.nokia.com/id/91d89929-fb8c-4d66-bea0-227e42df9053/Open_C_SDK_Plug-In.html
[3] http://www.forum.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html

Niko Sams says:

Wow, this is just great, I would never have dreamed of a gentoo overlay! You are my hero 😀

Sauron says:

>WARNING: One or more repositories have missing repo_name entries:

Huh! Oo. Probably worth a bit polished overlay, in accordance with the Gentoo Overlay rules?
Also, why not install QtDeclarative libraries and includes?
And is there any possibility to use cmake?

Øyvind says:

Does this include an emulator? Or is it possibly to run a symbian emulator on linux yet?

David says:

Do you know if Nokia plan to embed Qt in older phones (like 5800XM)?

I remember seeing a flashlight app in Ovi Store that required the Qt libraries, and the users were all mad about having to download +13MB for just a flashlight app. The conclusion they came was that it was probably a trojan or something worse.

jasper says:

Isn’t it obvious guys? Symbian development for Linux is not receiving any love from Nokia.

I just hope Meego doesn’t suffer the same fate.

Tim says:


If you can release the source packages, people like myself can rebuild them for x86_64, or use “alien” to convert them to other linux distros.

Alex says:

Are QtWebKit and QtMobility libraries included in qt-symbian-libs-4.7.1.deb package?

aportale says:

@jasper: I read and noted your comment to the admittedly very Windows centric article. Kristian now gave a preview of his work on the Linux side, and now you still come to the same conclusions 🙂 Believe me, most Qt trolls want to have this stuff working on Linux.

miksuh says:

@ jasper

> Isn’t it obvious guys? Symbian development for Linux is not receiving any love from
> Nokia.

No it is not because that’s not really true. Nokia is already offering remote compiler which makes it possible to build Qt apps for the Symbian even if you are using Linux. I’m using remote compiler every day and it works just fine. Remote compiler plugin for the Qt Creator is part of Nokia Qt SDK. So actually official tools do make building, packaging and signing Symbian Qt apps possible on Linux, just not by using local toolkit yet. I’m sure that it’s only matter of time when Nokia Qt SDK supports local compiling for the Symbian too.

Kristian Amlie says:

> “Invalid cross-device link”

This is most likely because your /usr and /var directory are mounted on different drives. I use hardlinking of libraries inside the ebuild to save time, and I thought “cp -l” would cope with this, but apparently not. I’ll see if I can add a quick solution by skipping hardlinks in that case.

About compiling GCCE from source: This was actually be initial plan, but it turned out that their build files are hopefully messed up and contain a lot of hardcoded, absolute paths to their build farm, so it was difficult to adapt it. I decided it was not worth the effort and went for the prebuilt binaries. If someone figures out how to build it, I’d happily add it though.

@Martin Storsjö:
Ah yes, I forgot to mention the UID issue in the blog post. That has been known for a long time, but the only workaround I know about is what you mentioned. And yes, using native Linux tools would be even better. Maybe in the next version!

@André Lochotzke:
QtMobility support would be nice, but I can’t say at the moment when or if it will be included.
And you may be right about the smart installer, it probably doesn’t support 4.7.1 yet. I’m sure the support is underways though.
QtCreator uses the same codebase as runonphone to connect to the phone, so you are of course free to use that.

Some warnings from the overlay are expected. This is not a “proper” overlay yet (though I might make it into one later).
As for missing QtDeclarative, that was not intentional. But yes, you’re right, the headers are missing. I’ll take a look at that for the next update.

No emulator support on Linux, I’m afraid.

> Do you know if Nokia plan to embed Qt in older phones (like 5800XM)?

Yes, they don’t.

Debian source packages are not available, since they were built on Gentoo. You can see the build recipes here though: http://qt.gitorious.org/qt-labs/symbian-overlay/blobs/master (example: http://qt.gitorious.org/qt-labs/symbian-overlay/blobs/master/dev-libs/qt-symbian-libs/qt-symbian-libs-4.7.1.ebuild)

@Alex: QtWebKit, yes. QtMobility, no.

jasper says:

@aportale: I have no doubt with the commitment of the QT devs to make Symbian development on Linux a reality. What I’m saying is that Nokia doesn’t seem to care. I have nothing against you guys, I really appreciate your efforts.

@miksuh: “it’s only a matter of time”, I said that to my self too…more than a year ago. I bought my Nokia 5800 August last year, by October this year, I can no longer wait.

When Symbian and Meego SDKs for Linux gets to the level of maturity as the Android SDK only will I start developing mobile QT apps again.

kenya888 says:

Hello, thank you for your great work! Especially Gentoo ebuild overlay make me so happy!:D I’d like to comment gcce ebuild.
On amd64 environment, tools of gcce needs some 32bit emulation libraries. There are two dependencies to use them, I think.

1. app-emulation/emul-linux-x86-baselibs
2. “multilib” USE flag for sys-libs/glibc

It may be good if these dependencies are added to the gcce ebuild next update:-) Anyway I’m very glad to know Qt Labs guys like Gentoo! 🙂

Kristian Amlie says:

Thanks! I’ll include those dependencies in the next update!

Timothy Murphy says:

@jasper, Nokia’s official build system for Symbian^3 and above is called Raptor (aka sbsv2). ABLD has been deprecated. Raptor works on Linux and Windows right now and is fully supported and maintained on both platforms. It’s in the official S^3 SDK for windows and there is no real problem getting that to work on linux. If you have the tools (e.g. elf2e32, rcomp and gcce) for linux then it’s all go.

Raptor is compatible with all the ABLD file formats (bld.inf and mmp etc) which you may think a disadvantage, but at least you get the full capability of the build system – supporting the entire range of Symbian programming including Qt and implemented as correctly as a full-time team can do it (because we have to use it to build Symbian itself).

Arul says:

I could not access this much lacked of, and often reported, website.
Please advice me if the site quoted is incorrect? Thanks

Troller says:

I really hope you guys are working 24/7 on bringing 4.7 to the N8. I am already working on a QML app for it and can’t release it without 4.7.

Kristian Amlie says:

I have now updated the Gentoo overlay with fixes for: “Invalid cross-device link”, “missing QtDeclarative headers”, and “missing dependencies to 32-bit emulation libraries on 64-bit platforms”. This also resulted in the qt-symbian-libs deb package receiving an update to include the missing QtDeclarative headers.

In addition, a fellow troll was kind enough to provide RPM packages based on Fedora, so RPM users don’t have to use alien anymore!

The “Failed to write UIDs” issue cannot be fixed in the package, but requires manual intervention, so I have added that to the Known Issues section.

sahumada says:


I think fedora users need to run s60-sdk.sh before qmake-symbian (it will take effect automatically next reboot). Something like:

# cd
# source /etc/profile.d/s60-sdk.sh
# qmake-symbian
# make runonphone


Kristian Amlie says:

Yes, actually that’s true for all Linux distributions. I added a short note to the “all users” section to reinitialize the shell.

devurandom says:

@Kristian: Did you have a look at the gnupoc scripts? They seemed to build a large portion of the SDK more or less natively.

Oh, and can you please run these commands? 🙂

echo qt-symbian > profiles/repo_name
svn add profiles/repo_name
svn commit -m “Add repo_name”

devurandom says:

Quick audit of the gcce ebuild: You use a lot of “cp” (and “addwrite”, shudder). Consider using “dobin” and similar functions instead.

The Developer Manual [1] and the Ebuild HOWTO in the Developer Handbook [2] are good resources.

[1] http://devmanual.gentoo.org/
[2] http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?full=1#book_part2_chap1

devurandom says:

Sorry for the comment spam, but I noticed just now that you are not copying the GCCE files, but my entire system into the chroot… You’re *cloning* an *entire* system and install it into itself… I’ll leave my comments at “this is ugly” and keep the rest for myself…

Kristian Amlie says:

Ah, that’s what the repo_name thing was! Nothing beats clear instructions! 😉 I’ll get that in there as well.

As for the GCCE, I never said it wasn’t ugly! 😉 But sadly, that installer is incredibly difficult to get running properly. I tried just extracting the files directly from the image, but the Java installer does some magic behind the scenes, so not all files are available this way. And when I tried just running the installer without chroot, I discovered that it’s writing all over the place, even outside of where you asked to install. The file writing prevention that the sandbox is supposed to provide proved ineffective against the installer as well, so in the end, I didn’t really have any other choice than a chroot. The number of libraries I copy into it can obviously be shrunk, but after the first handful I gave up trying to sort through exactly which ones, since I was using hardlinks anyway. But I understand that this is a very heavyweight solution when you can’t use hardlinks.

If you really care about it, feel free to try to figure out exactly *which* libraries are needed in the chroot, and I’ll be happy to patch it so it only copies those over.

Why not just use this archive? I have in my time turned out to create a working environment with it.

devurandom says:

@Kristian: Can you at least change addwrite/ to addpredict/ ? See the Developer Manual [1] and the Gentoo Bugday section on the Sandbox [2] for information on the topic.

[1] http://devmanual.gentoo.org/function-reference/sandbox-functions/index.html
[2] http://bugday.gentoo.org/sandbox.html

Eero Penttinen says:

@Troller: u bet – we are really working hard to ensure we can make Qt 4.7 available for S^3 based devices ASAP. It would have been great to make an updated version of Qt 4.7 for S^3 available for development purposes (and later deployment) but we run into some issues in the SDK creation process (not technical though) causing some undesired delays.

However, stay tuned – it won’t take long 🙂

devurandom says:

@Kristian: I used dev-embedded/sgpp-lite-arm-symbian-bin (it hopefully enters the tree soon, I talked to vapier@g.o about it) to build qt-symbian-libs. The patch below was necessary for that to work. First it sets the obvious dependency, then it prevents a lot of “undefined reference to _Unwind_*” errors during linking.

Can you maybe give me write permission to the overlay repository on Gitorious? Then I could cleanup the ebuilds a bit, and include dev-embedded/sgpp-lite-arm-symbian-bin as long as it is not in the main tree yet. I go there under the same name as here.

— a/dev-libs/qt-symbian-libs/qt-symbian-libs-4.7.1-r1.ebuild
+++ b/dev-libs/qt-symbian-libs/qt-symbian-libs-4.7.1-r1.ebuild
@@ -22,7 +22,10 @@ IUSE=””
– >=sys-devel/gcce-4.4.172
+ || (
+ >=dev-embedded/sgpp-lite-arm-symbian-bin-2010.09.54
+ >=sys-devel/gcce-4.4.172
+ )

QT4_EXTRACT_DIRECTORIES=”src tools/shared/symbian tools/shared/windows”
@@ -122,6 +125,10 @@ src_prepare() {
cp $EPOCROOT/epoc32/tools/uidcrc.exe `find $HOME/.wine -ipath ‘*windows/system32’`

epatch “${FILESDIR}/installing_headers_should_not_require_building.patch”
+ sed -i “${S}”/mkspecs/features/symbian/symbian_building.prf
+ -e ‘s:-lgcc:-lgcc_eh:’
+ || die

src_configure() {

Silur says:

I’ve been waiting for months for theese packages. i’m developing in mandriva 2010.2. Tested with all possible objects of Qt (avalaible on S60) and works perfect! 😀
Thanks a lot Qt Labs.

Tim Kelly says:

Nice work! I was able to build and deploy the easing animation demo on E7, building under Creator 2.0.95. I did get a build launched with -spec symbian-sbsv2 with some config edits and it seemed to invoke it OK as well (i.e. qmake and build sequence), but will need a Symbian^3 kit for that since S60 5th doesn’t support SBS.

QtOpenGL libraries are missing (but not the headers). 🙁

Kristian Amlie says:

Happy new year, everyone!

@Aleksey Sidorov: I will consider that for the next release.

@devurandom: The repository is a mirror of an internal repository, so unfortunately I cannot give direct write access. However, you can clone the repository on Gitorious and use the merge request feature to post patches. Then I can cherry-pick patches into the branch.
The use of sgpp-lite-arm-symbian-bin is interesting. Do you know if your patch is compatible with gcce as well?
addpredict doesn’t work for the installer, which is why I had to use the chroot. And in the chroot, we need real writes, so I have to use addwrite.

Kristian Amlie says:

@Thiago Marcos P. Santos: QtOpenGL is not present in the Windows release of Qt 4.7.1 either. I’m not 100% sure, but I think the reason is that SDKs older than Symbian^3 do not come with OpenGL support. Also, very few devices before Symbian^3 based ones have OpenGL (N95 is the only one I know about).

PK says:

where x64? *.deb 64-bit?

Kristian Amlie says:

Sorry, only 32-bit packages for the moment.

Aki says:

Fabulous. I think this is by far the best ‘sdk’ for symbian. I’m hoping to see qmake-maemo and qmake-meego as well, as this makes the scratchbox games seem really rather clumsy.

PK says:

Will the 32 bit version on a 64 system?

Kristian Amlie says:

@PK: They should. Both Gentoo and Debian install 32-bit compatibility libraries by default. I haven’t checked Fedora personally, but I’m pretty sure they do as well.

Barış Ürüm says:

Good days ahead then… Thank you nokia developers! We have long waited for this enhancement!

David says:

>> Do you know if Nokia plan to embed Qt in older phones (like 5800XM)?

>Yes, they don’t.

This makes me sad. I hope Nokia reconsiders his position. IMO Qt should be embedded like Java.

Commenting closed.

Get started today with Qt Download now