Qt 4.7.0 for Symbian on Linux (now with Qt Creator support!)

It’s been some time since my last update on the Qt for Symbian Linux installer. My colleague Bruno Abinader did a great job in the meantime, by releasing his own modified “all-in-one” script that installed gnupoc, Qt, Qt Mobility and Smart Installer :D.

From now on, I’ll follow Bruno’s idea and provide a single script that installs everything you need for Qt for Symbian development on Linux. This version will install just gnupoc and Qt, but next ones should support Qt Mobility and Smart Installer as well. I also temporarily disabled support for S60 3.1 SDK, so for now there is only S60 5.0 SDK support.

Some of you might have noticed that the official Qt 4.7.0 documentation has some experimental installation instructions for Linux. Unfortunately, it requires compiling Qt from sources, which might take long time and currently requires the non-free ARM RVCT compiler. The instructions on this post are my attempt on creating a usable setup in a user-friendly way.

So, enough explanations, let’s go to the instructions!


Download all required files to a single directory (e.g. “~/downloads”):

For building the native tools from gnupoc, you will need:

  • the GCC C/C++ compilers
  • development files for zlib
  • development files for openssl

On Ubuntu, you can install these using the following command:

sudo apt-get install build-essential zlib1g-dev libssl-dev


Install everything using a single command:

./qt_for_symbian_4.7.0_linux_installer_v4.sh \
    <download-dir> \

Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <install-dir> with the destination directory (e.g. “~/gnupoc”). Note that both directories must have absolute paths.

If installation was successful, you should see the message “Installation has finished!” followed by some instructions. Follow those to setup Qt Creator and/or command line.

Device setup

Install Qt on the phone, by copying and installing the <install-dir>/qt_4.7.0/qt_installer.sis package. This single SIS file has all necessary dependencies for running Qt applications.

Additionally, if you plan to use Qt Creator, I suggest installing s60_5_0_app_trk_3_2_7.sisx. It will allow quickly testing your application directly on the device through bluetooth. Also make sure your desktop and phone are paired, then run these commands:

sdptool browse local | grep -q "Service Name: Serial Port" \
  || sdptool add SP
sudo rfcomm listen rfcomm0

The first command makes sure the Serial Port service is only added once, and the second one creates the /dev/rfcomm0 device. You should see output like:

Serial Port service registered
Waiting for connection on channel 1

On the phone, open App TRK (It should be under the “RnD Tools” directory). It will show “Status: Not connected”. Go to Options -> Settings, and make sure “Connection” is set to “Bluetooth”. Next, go to Options -> Connect and select your desktop from the Bluetooth devices shown. On the phone, you should see:

Status: Connected
BT Dev Name: <your_computer_name>
BT Port number: 1

While on your desktop console:

Connection from XX:XX:XX:XX:XX:XX to /dev/rfcomm0
Press CTRL-C for hangup

Now, when you click “Run” on Qt Creator, you should see something like this on its “Console Window”:

Executable file: /home/lizardo/gnupoc/sdk_5.0/epoc32/release/$(PLATFORM)/$(TARGET)/animatedtiles.exe
Package: 117288 2010-10-11T11:43:23 /home/lizardo/NokiaQtSDK/Examples/4.6/animation/animatedtiles/animatedtiles.sis
Deploying application to 'Bluetooth device (/dev/rfcomm0)'...
Copying installation file...
Installing application...
Starting application...
Application running with pid 1134.

And the application should install and open directly on your phone 🙂 Enjoy!


About lizardo

My hobby: figure out how systems are expected to work; induce them to work unexpectedly; and responsibly disclose.
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

34 Responses to Qt 4.7.0 for Symbian on Linux (now with Qt Creator support!)

  1. Hey!

    Waited a long time to see something new on this topic from you 😉

    Looks nice, but I didnt try it yet.

    I think Qt 4.7.0 for Symbian isnt really necessary by now.
    As far as I know Ovi Store by Nokia doesnt support Qt 4.7.0 at the moment as well as the smart installer doesnt support it too.

    Therefore I still use Qt 4.6.3 til this will change.

    Or am I wrong?



  2. Hi Wolfgang, altough Qt 4.6.3 is now present in a large scale of Symbian devices, the most recent Nokia devices such as the N8 already comes with Qt 4.7 embedded on it, so it’s a good idea to start thinking about an upgrade 🙂

    • Sorry didnt see your comment 🙂

      Please look at my answer above.

      Do you have any sources which state Qt 4.7 is already supported?
      e.g. Nokia N8 is already shipped in Germany and the links I posted above arent very old.

      So I dont know what to think.
      I had Qt 4.7 installed, but after i noticed these statements I downgraded to 4.6 for actual development.

      • lizardo says:

        Hi Wolfgang,

        Thanks for your comments. It’s unfortunate that N8 does not come with 4.7 pre-installed. As you noticed, gnupoc supports 4.6 as well, so I’ll see about adding support for it as well on my installer.


  3. ssorgatem says:

    I tried to install it, and everythin seemed to go OK, but now i only have .exe’s in ~gnupoc/qt_4.7/bin (that means that i’m missing qmake, moc, rcc et al.)

    I followed the steps on this blog. Did I do something weird or is there a bug in the script?

    Anyways, thank you for your great work 😉

    • lizardo says:

      The qmake build is done by gnupoc. Can you get a full installation log (e.g. ./qt_for_symbian_4.7.0_linux_installer_v4.sh … > /tmp/install.log) and put it somewhere so I can take a look? Thanks for testing!

  4. ssorgatem says:

    I uploaded the install log here: http://www.mediafire.com/file/q7ljw066h4fdyjy/install.log

    It’s 8,7 Mb… heavier than the gnupoc package xD

    With the reinstall I didn’t get the native qt tools, either.

    • lizardo says:

      From your install log, I can see the problem now:

      + [ /home/ssorgatem/gnupoc//qt_4.7.0 != ]
      + ./mergedir qt_temp/$OUTDIR/bin /home/ssorgatem/gnupoc//qt_4.7.0
      + rm -rf qt_temp
      + set +x
      [: 83: 1: unexpected operator

      For some reason, your /bin/sh did not recognize this line from gnupoc-package-1.17/sdks/install_qt_4.7.0:

      if [ “$QTDEST” != “” ]; then ./mergedir qt_temp/\$OUTDIR/bin $QTDEST; fi

      Can you check whether /bin/sh is a symlink, and if so, to which shell it is pointing to? And if it is not pointing to /bin/bash, try changing to it.

      Generally, you can do so by “ln -sf /bin/bash /bin/sh” (make sure /bin/bash exists).

      Let me know if it fixes the problem!


  5. ssorgatem says:

    In effect, /bin/sh points to /bin/dash.

    So it seems it’s a bug somewhere (in dash or in gnupoc-package-1.17/sdks/install_qt_4.7.0). Maybe the script should call /bin/bash instead of /bin/sh to avoid it 🙂

    With bash it works now 😉

    Thank you for your work

  6. samdev says:


    I actually have the same problem as you ssorgatem, let me know how did you resolve it, did you recompile all? after making changement of the call of /bin/sh to /bin/bash??

    Thank you

    • ssorgatem says:

      yep, all (that is, running the install script)

      I also removed manually the previous incomplete install before running it.

  7. Hi!
    After I read in the comments about the dash vs. bash thing, I was able to install everything without a problem.
    Thank you very much!

  8. Paul Labedan says:


    First, thanks for this very usefull script.
    Then, could you set the shell to bash as default to avoid all the dash/bash problems in the future?


  9. Adriano says:


    What should I do if I want to use QtMobility in linux?

    Thanks in advance

    • j says:

      Get qt-mobility-symbian-opensource-1.1.0.zip, unzip it, see INSTALL.symbian for installation instructions. I had to comment out “contains(QT_CONFIG, opengl): QT += opengl” from gnupoc/qt_4.7.0/mkspecs/features/mobility.prf. Works fine.

  10. Allen says:

    A 4.6.3 + smartinstaller script would be nice. Got the 4.7 installed, but N8 doesn’t like the binary built from it. Thanks and looking forward to 4.6.3 installer.

    • lizardo says:

      While the next version of my installer script does not come, you can always install gnupoc manually and use it to install 4.6.3 + smartinstaller:


      My installer is just a wrapper script around gnupoc that makes the installation more automatic and adds a few changes to allow integration with Qt Creator.

  11. andre says:

    I set up Qt4.7.1, QtMobility1.1.0 and QtCreator2.1.0beta2 using the latest gnupoc package from git.

    The problem I’m having has to do with the bluetooth QtCreator setup.

    Using the following works fine with Ubuntu, but I would like for QtCreator to do the listening part.
    sdptool add SP
    sudo rfcomm listen rfcomm0
    Strangely enough there is no rfcomm0 device node under /dev.

    When I run QtCreator as root (sudo ./qtcreator) there is no need for “sudo rfcomm listen rfcomm0” and I even get the device information (CPU: v4.0 ARM 920T, little endian, App TRK: v3.2 TRK-Protokoll: v3.6). Even though there also is no /dev/rfcomm0.

    I tried the following.
    sudo mknod /dev/rfcomm0 c 216 0
    sudo chown : /dev/rfcomm0
    Now root privileges should no be required to access /dev/rfcomm0 but for some reason QtCreator still cannot connect. The dialog “Waiting for bluetooth connection” never goes away.

    Do you have an idea on how to get this to work without having to run QtCreator as root.


    • andre says:

      After trying many different things

      echo “sdptool add SP” >> ~/.profile
      sudo chmod +s /usr/bin/rfcomm

      makes it possible.

      • andre says:

        Under Projects > Targets > Run it is neccessary to hit the refresh button next to “Device on serial port: Bluetooth device (/dev/rfcomm0)” once.
        Otherwise QtCreator waits for the device connection indefinitely.

  12. ayke says:

    ‘If installation was successful, you should see the message “Installation has finished!” followed by some instructions. Follow those to setup Qt Creator and/or command line.’

    But, when the operation was complete, my terminal did a bit strange (gnome-terminal) and I only had the last part of the instructions.
    Can someone tell me where to find those instructions? I didn’t find them in the install script. fgrep for some of the words that I had on the install directory, had no succes (didn’t find anything)

    • andre says:

      Just execute:
      ./qt_for_symbian_4.7.0_linux_installer_v4.sh –keep –noexec –target qt_for_symbian

      You will then find install.sh in the just created qt_for_symbian folder.

  13. Janno says:

    I got error that ‘Basic XLib functionality test failed!’. Installing libxext-dev package solved the problem for me (Ubuntu 10.10)

  14. cfaure says:

    Hi Lizardo,

    Thanks for this great job,
    now i can compile with qt 4.7.0 and mobility 1.1.0,
    compilation ok!!!

    Now the problem: the generated sis file can’t install on symbian device, the installer don’t prompt for autorization (capabilities) and fail.

    With remote compiler i see a patch step with “elftran” about capabilities.

    Do you have any idea on how to add this step in the generation of the sis file?


  15. Adriano says:

    Hi Lizardo,

    cfaure, I got the same error when I was trying to install the camera example that comes qt-mobility.

    I’m also having problems with deployment of my qml files:

    “$ make debug-gcce”
    … //A lot of lines that seems the correct building step//…
    Deploying changed files…
    /bin/sh: Syntax error: Unterminated quoted string
    /bin/sh: Syntax error: Unterminated quoted string

    Taking a look at the generated Makefile I found out some backslashes in the path of some files. Replacing for the normal slashes didn’t solve the problem: error messages are gone, i can install my app, but i can’t loading the qml files. So the deployment didn’t happen yet.

    Any clues?


  16. lamikae says:

    If I understood all this properly, the script and this guide is about deploying for Symbian^1. What about Symbian^3? The gnupoc-package changelog tells that it was included in gnupoc 1.18, but this script still uses version 1.17.

    A guide for absolute newbies developing Qt apps for Symbian^3 would be SUPERB..

  17. First off, thanks a lot for this guide.

    I’ve followed the instructions in the GNUPOC README and gotten build system ready for Symbian targets using bldmake, abld etc. I’ve also installed Nokia Qt SDK 1.0.2 which includes Qt 4.7.0 I guess.

    Could you tell me how exactly you patched qmake to add extra targets, and how you integrated this with Qt Creator? I tried comprehending your install script but it’s designed for a different version of the Symbian S60 SDK, and it also isn’t designed to work with the Nokia Qt SDK.

    [Ubuntu 10.10 32bit, Nokia Qt SDK 1.0.2, Qt 4.7.0, Symbian S60 3rd FP1 SDK, GNUPOC 1.19]


    • lizardo says:


      Sorry about the late response. My script should work just fine with Nokia Qt SDK (I actually use it). The only difference I see is that you use the Symbian S60 3.1 SDK, which I never used.

      You can check the installation script in http://pastebin.com/R2NhNvvH (this is from v4). You can also extract the installation script contents by running:

      ./qt_for_symbian_4.7.0_linux_installer_v4.sh --noexec --keep --target /tmp/tmp_dir

      And checking the contents of the /tmp/tmp_dir directory (install.sh is the installation script).

      Hope that helps,

  18. NilusAlex says:

    Excellent job! Thank you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s