jump to navigation

Installing Qt for Symbian SDK 4.6.2 on Linux February 18, 2010

Posted by lizardo in Linux.
Tags: , , ,
trackback

Qt 4.6.2 was released last Monday, so I took some time to update the GnuPoc and Qt installer scripts I previously released for 4.6.1.

Besides the upgrade to Qt 4.6.2, there are other minor changes:

  • Both installers now check MD5 signatures of the necessary files, to make sure they are not corrupted.
  • The GnuPoc installer now supports the 3.1 SDK (see updated instructions below).
  • Added “unset QMAKESPEC” command to setup instructions (at least Gentoo sets it globally, which affects qmake).

The instructions are basically the same as the previous ones, but I will post the full instructions here for completeness.

Preparation

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

Installation

First, install GnuPoc + S60 SDK + the Open C/C++ plugin:

./gnupoc_1.15_installer_v2.sh \
    <download-dir> \
    <gnupoc-dir>\
    <x.y>

Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), <gnupoc-dir> with the destination directory for GnuPoc and the SDK files (e.g. “~/gnupoc”) and <x.y> with the SDK version you want to install (e.g. “3.1″ or “5.0″). Note that both directories must have absolute paths.

If installation was successful, you should see an output like:

Installation has finished. Before using the GnuPoc SDK, run these commands on the console:
 
export PATH=<gnupoc-dir>/bin:$PATH
export EPOCROOT=<gnupoc-dir>/symbian-sdks/5.0/ # trailing "/" is required!
 
(These commands must be run again every time a new console is opened.)

Run the commands as instructed on the message. Next, install Qt for Symbian:

./qt_for_symbian_4.6.2_linux_installer_v3.sh \
    <download-dir> \
    <qt-s60-dir>

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

If installation was successful, you should see an output like:
Installation has finished. Before using the Qt for Symbian SDK, run this command on the console:
 
export PATH=<qt-s60-dir>/bin:$PATH
unset QMAKESPEC    # make sure there is no QMAKESPEC variable set
 
(This command must be run again every time a new console is opened.)

Before using Qt for Symbian, you should run the command as instructed on the message above.

Usage example

To test the installation, I will describe how to build the “colliding mice” example.

  1. cd into the example source:
  2. cd <qt-s60-dir>/examples/graphicsview/collidingmice/

  3. Now build the example and generate the SIS file
  4. qmake
    make debug-gcce
    make sis

A few notes:

  • Make sure Qt is installed on the device before installing Qt applications. The easiest way to install it is to copy the “qt_installer.sis” package found under <qt-s60-dir> over bluetooth and open the received message to begin the installation.
  • Only the “debug-gcce” (if you are using the GCCE toolchain AKA “CodeSourcery toolchain”) or “debug-armv5″ (if you are using RVCT) will work, because the current Qt releases only ship debug versions of the libraries
About these ads

Comments»

1. Installing Qt for Symbian SDK 4.6.1 on Linux « Anderson Lizardo's Blog - February 18, 2010

[...] Installing Qt for Symbian SDK 4.6.1 on Linux January 21, 2010 Posted by lizardo in Linux. Tags: Linux, qt, S60, symbian trackback ***For Qt 4.6.2 and S60 3.1 SDK support, be sure to read the updated post*** [...]

2. Wolfgang - February 18, 2010

Thanks again for your work!

I’ll try it later this day.

Your link to “qt-symbian-opensource-4.6.2.exe” is not set correctly, it still links against the 4.6.1 version!

lizardo - February 18, 2010

Oops, should be fixed now :) Thanks.

3. Wolfgang - February 18, 2010

I think its working fine so far.

But there are two small problems if i follow these instructions
http://labs.trolltech.com/blogs/2010/02/15/qt-for-symbian-and-the-nokia-smart-installer-beta/

Executing “make installer_sis” i get the following output:
“make -s -f Makefile sis
Processing xxx_debug-gcce.pkg…
Created xxx_unsigned.sis

Successfully created xxx.sis for debug-gcce using certificate: Self Signed!
make -s -f Makefile ok_installer_sis
make[1]: execvp: createpackage.bat: Keine Berechtigung(no authorization)
make[1]: *** [ok_installer_sis] Fehler(error) 127
make: *** [installer_sis] Fehler(error) 2″

That is why i changed createpackage.bat to createpackage.sh in my Makefile.
Then i get something like this:
“make -s -f Makefile ok_installer_sis
Processing xxx_installer.pkg…
xxx_installer.pkg(26) : error: file not found
xxx_installer_unsigned.sis: No such file or directory

SIS creation failed!”

Looking at my xxx_installer.pkg i recognized that the script could not find my xXx.sis but xxx.sis exists. There is a problem with the capitalization at this part. xXx is the spelling of the filename in my .pro file.

After changing the filename from xxx.sis to xXx.sis it creates the xxx_installer.sis correctly.

Maybe you change these two things? ;-)

lizardo - February 18, 2010

I would be surprised if “make installer_sis” worked without any changes :) Anyway, I’ll add it to the TODO list for the next installer update. Thanks for testing!

4. Timo - February 19, 2010

Thanks for 3rd version, been waiting that!

5. chuckmo - February 23, 2010

Open C/C++ 1.7 is released. Would you please update your script?

lizardo - February 23, 2010

See http://bugreports.qt.nokia.com/browse/QTBUG-8395 , OpenC/C++ 1.7 does not work with Qt yet :(

When that is fixed I can update the script.

chuckmo - February 23, 2010

Thanks for the info. Nokia should make things easier.

6. protected * void / QtMobility Project, ou desenvolvendo para Symbian no Linux - February 25, 2010

[...] nos afasta mais deste objetivo. O colega Lizardo, não muito feliz com a dependência do Janelas, adaptou com sucesso o famigerado GNUPOC para funcionar com o Qt 4.6.X, dando-nos assim um ambiente agradável de [...]

7. Rene Jensen - March 10, 2010

Insanely many thanks!

I have on several occasions been trying to get into Symbian development for at least 3-4 years! In every case I tried in vain to install the behemoths of tools on all my xp/vista machines with various versions of perl (whatever could be found in proximity to the obsolete required version), and on both fat and ntfs filesystems using all the hideous tricks with python script to delete files during installation because fat filesystems break under the load. And so on and on and on…

All along I wanted to get away from windows and back to linux again.

Using your script it took less than 15 minutes to produce a sis on my ubuntu!

Symbian vendors should reward you with a private jet!

8. Abhishek - March 13, 2010

I am following this post to setup the environment but I am getting error something like this
$ sh gnupoc_1.15_installer_v2.sh . ~/GnuPoc ~/3.1
Verifying archive integrity… All good.
Uncompressing Unofficial GnuPoc 1.15 installer (OpenC + S60 SDK)…..
ERROR: SDK version /home/abhishek/3.1 is not supported by this installer

i have tried this with 5.0 but still the same error ..
following is the list of software packages and scripts i have downloaded
gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2
qt-symbian-opensource-4.6.2.exe
gnupoc_1.15_installer_v2.sh
S60_5th_Edition_SDK_v1_0_en.zip
gnupoc-package-1.15.tar.gz
s60_open_c_cpp_plug_in_v1_6_en.zip
qt_for_symbian_4.6.2_linux_installer_v3.sh

please guide me :)

lizardo - March 14, 2010

The last argument for gnupoc_1.15_installer_v2.sh must be just the version number (“x.y”), e.g.:

$ sh gnupoc_1.15_installer_v2.sh . ~/GnuPoc 3.1

Abhishek - March 14, 2010

Thanks a lot its working :)

9. Bruno - March 24, 2010

Thanks a lot. Maybe I’m trivial but can I use qtcreator? If yes can I build a project with him?

Bruno - March 25, 2010

I tried to install qt creator, then I made a project and then I tried to compile with the above procedure but without success in fact I obtained some error related to QMAKESPEC variable:
QMAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: /home/bruno/Dati/Qt/Programmi/Address_book/part1/part1.pro

(the part1.pro was created by qt creator)
can you help me?
Thanks

lizardo - March 25, 2010

I never attempted Qt Creator integration… As you can see from the message after you install Qt for Symbian, you need to set some environment variables prior to trying to build. You may need to fiddle with some Qt Creator configuration to set these variables (I don’t know how to do this, sorry).

10. Grego - April 6, 2010

If you want to install multiple Symbian SDKs, like 3.1fp1, and 5.0, how would you proceed?

11. Oskari - April 13, 2010

I got the QtCreator part working. :-)

First go to Options -> Qt Versions and add the new Qt just installed.

Then you have to go to the projects settings and change it to use the new qt version.

After that, edit build steps so that the make command has “debug-gcce” in it (you can also add the “make sis” step …).

Now edit the build environment variables to correspond to the ones above (EPOCROOT, PATH).

After this I tried to build my test app, and qmake didn’t like some UID or something. So I went to symbiansigned.com and got me one unprotected UID and put it to my .pro -file: “symbian:TARGET.UID3 = 0xDEADBEEF”.

I think that’s everything I did, and I got it working. At least the .sis installed on my N97 and the app worked :-)

12. Stepping Toward Symbian Open Source Tools on Linux and Mac « Paul Beusterien's Blog - April 14, 2010

[...] for more of a Linux or Mac SDK, Martin Storsjö’s site and/or Anderson Lizardo’s blog are good references. If you’re more energetic, you could build some of the other tools [...]

13. Stepping Toward Symbian Open Source Tools on Linux and Mac | Symbian Blog - April 21, 2010

[...] looking for more of a Linux or Mac SDK, Martin Storsjö’s site and/or Anderson Lizardo’s blog are good [...]

14. schemacs - April 23, 2010

export PATH=/home/lele/Install/gnupoc//bin:$PATH
export EPOCROOT=/home/lele/Install/gnupoc//symbian-sdks/3.1/ # trailing “/” is required!

Note EPOCROOT is wrong for “//”,I just install the gnupoc use this
./gnupoc_1.15_installer_v2.sh /home/lele/Downloads/DownThemAll/ /home/lele/Install/gnupoc/ 3.1
,pls check the script(it’s hard for me to check).

15. spamhere1983 - April 27, 2010

can’t download anything neither I can open website:

franciscoalecrim.com

Can you give an alternate DL-Link for your scripts pls?

16. spamhere1983 - April 27, 2010

ok dunno what’s going on, but over webproxy I was able to download the files.

17. spamhere1983 - April 27, 2010

Getting this error:

cc -I. -c -o elf_phnum.o elf_phnum.c
cc -I. -c -o elf_shnum.o elf_shnum.c
cc -I. -c -o elf_shstrndx.o elf_shstrndx.c
cc -I. -c -o elf_scn.o elf_scn.c
elf_scn.c: In function ‘_libelf_load_scn’:
elf_scn.c:96: error: expected expression before ‘struct’
gmake[1]: *** [elf_scn.o] Error 1
gmake[1]: Leaving directory `/tmp/selfgz267842234/gnupoc-package-1.15/tools/elf2e32/libelf-elftoolchain’
gmake: *** [libelf/lib/libelf.a] Error 2
Unexpected error: aborting.

lizardo - April 27, 2010

Which system are you trying to build on?

18. spamhere1983 - April 27, 2010

Hi,

I’m using Gentoo ~amd64 tryed gcc-4.4.2 and gcc-3.4.6

when I comment following (line 96) in elf_scn.c it compiles:

if (!STAILQ_EMPTY(&e->e_u.e_elf.e_scn)) {
// assert(STAILQ_FIRST(&e->e_u.e_elf.e_scn) ==
// STAILQ_LAST(&e->e_u.e_elf.e_scn, _Elf_Scn, s_next));

But i think it’s not a good “solution”…..

lizardo - April 27, 2010

Someone reported the same issue on gentoo before… You might want to look for older comments from previous posts. I don’t remember if the fix was something like this.

Markus Rathgeb - April 28, 2010

The bug has been fixed the last days:
http://bugs.gentoo.org/show_bug.cgi?id=305075

19. spamhere1983 - April 27, 2010

Hi thanks for reply,

I found the comments and he did the same, as I did.

20. Markus Rathgeb - April 29, 2010

Hello!
Yesterday I “played” a little with the development environment and here of my results (improvements?):

File:
qt-4.6.2/mkspecs/common/symbian/symbian.conf
The line
SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6
could be replaced with
SYMBIAN_PLATFORMS = GCCE
So the generated makefile (by qmake) will just contain working targets.

All “tools” that could be found in “gnupoc/tools/bin” and there is an equivalent wrapper (for the windows executable with wine) in “gnupoc/symbian-sdks/5.0/epoc32/tools” should be replace the wrapper.

I began to integrate the SDK in the new Nokia SDK beta released for two days and it uses the tool of the “epoc32/tools” directory…. The replacement works for me (so far I proceeded yesterday).

Are the above steps okay?

lizardo - April 29, 2010

Nice tips! A few comments:

1) ARMV5 is also valid if you have RVCT installed.
2) These wrappers come from gnupoc, which is installed following the “official” instructions from http://www.martin.st/symbian/ . Improvements on this regard should be sent to the gnupoc maintainer.
3) I began playing with Nokia Qt SDK this week too. I plan to mix the Linux/Win32 versions so that we get a nice integrated environment for Linux too. Note that as said on the beta announcement, they have plans to release symbian support for Linux too, but it is still some months ahead. I also don’t have a schedule for when I will have this working (as I’m also working on other things). Let me know if you manage to have it nicely integrated, and post it somewhere :)

Regards.

Markus Rathgeb - April 29, 2010

Perhaps my english grammar is to bad…

Additional to your point number two:
“gnupoc/symbian-sdks/5.0/epoc32/tools” contains wrapper that are using wine.
“gnupoc/tools/bin” contains elf files
So not the gnupoc maintainer should improve something.
Your installer should settup the sdk, that “gnupoc/symbian-sdks/5.0/epoc32/tools” does also use the native one.
Or am I missing something.

To point number one:
Your installier could ask, if there is another toolchain installed and adjust the supported platforms in symbian.conf (gcce or/and armv5).

lizardo - April 29, 2010

1) Anything not directly related to Qt is handled by the gnupoc installer. My installer just “wraps” the gnupoc + qt installation in a automated script. So you should ask the gnupoc maintainer to change those scripts that call wine…

2) Feel free to send a patch with this improvement :) In http://lizardo.wordpress.com/2010/01/21/installing-qt-for-symbian-sdk-4-6-1-on-linux/#comment-93 I describe how to “unpack” and modify the installer script. IMHO, the way it is, it is not a problem, as long as you remember to call the appropriate target.

Best Regards.

21. Markus Rathgeb - April 29, 2010

IMHO the following steps should be enough:

$ cd ${HOME}/downloads/qt-symbian/gnupoc-symbian-sdk/

$ ls -1
gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2
gnupoc_1.15_installer_v2.sh
gnupoc-package-1.15.tar.gz
qt_for_symbian_4.6.2_linux_installer_v3.sh
qt-symbian-opensource-4.6.2.exe
S60_5th_Edition_SDK_v1_0_en.zip
s60_open_c_cpp_plug_in_v1_6_en.zip

$ chmod 0755 gnupoc_1.15_installer_v2.sh
$ ./gnupoc_1.15_installer_v2.sh `pwd` ${HOME}/symbian/gnupoc 5.0

$ export PATH=${HOME}/symbian/gnupoc/bin:$PATH
$ export EPOCROOT=${HOME}/symbian/gnupoc/symbian-sdks/5.0/ # trailing “/” is required!

$ chmod 0755 qt_for_symbian_4.6.2_linux_installer_v3.sh
$ ./qt_for_symbian_4.6.2_linux_installer_v3.sh `pwd` ${HOME}/symbian/gnupoc/qt-4.6.2

$ export PATH=${HOME}/symbian/gnupoc/qt-4.6.2/bin:$PATH
$ unset QMAKESPEC # make sure there is no QMAKESPEC variable set

———————————

export PATH=${HOME}/symbian/gnupoc/tools/bin:${PATH}

cd ${HOME}/symbian/gnupoc/symbian-sdks/5.0/epoc32/tools
for i in ${HOME}/symbian/gnupoc/tools/bin/*
do
if [ -f ${i} ]; then
if [ -e `basename ${i}` ]; then
cp -iv ${i} .
fi
fi
done

sed ‘s:SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6:SYMBIAN_PLATFORMS = GCCE:g’ -i /home/maggu2810/symbian/gnupoc/qt-4.6.2/mkspecs/common/symbian/symbian.conf

———————————

# Just SETUP QtCreator of the Nokia Qt SDK

$ cd ~/NokiaQtSDK
$ QtCreator/bin/qtcreator

Tools, Options
Qt Versions
+
Version Name: Qt Symbian
qmake Location: ${HOME}/symbian/gnupoc/qt-4.6.2/bin/qmake
S60 SDK: ${HOME}/symbian/gnupoc/symbian-sdks/5.0/
CSL/GCCE Directory: ${HOME}/symbian/gnupoc/bin

———————————

# EXIT QT-CREATOR AND SHELL SO THAT ALL VARIABLES ARE AT DEFAULT VALUES
# START NEW SHELL

———————————

# Just ONE environment that I need to set

export PATH=${HOME}/symbian/gnupoc/tools/bin:${PATH}
cd ~/NokiaQtSDK
QtCreator/bin/qtcreator

22. Paulo Mendonça - May 4, 2010

Hi. how can we install qt mobility apis on top of the qt-for-symbian sdk installed by your scripts?

If it is possible, how could we do that?

23. Protected * Void / Symbian development using Linux on real life… - May 5, 2010

[...] didn’t have yet an official way to compile our applications on linux, so we used (and still use) Lizardo’s patchs that enables gnupoc to compile Qt-symbian applications on [...]

24. Symbian development using Linux on real life… | Maemo Nokia N900 - May 5, 2010

[...] didn’t have yet an official way to compile our applications on linux, so we used (and still use) Lizardo’s patchs that enables gnupoc to compile Qt-symbian applications on [...]

25. Tero - June 3, 2010

Thanks. Your Qt for Symbian on Linux installer saved me a lot of time trying to figure out how to get Qt going for Symbian, I’m sure. I’ve been using GnuPoc for ages, but new to Qt.

As an improvement suggestion for next release, as someone who’s got all of the v3.1, v3.2, and v5.0 SDKs installed, would speed up installations if the EPOCROOT specific bits (of which there aren’t many) could be separated to their own script. So basically set up everything in QT_S60_DIR with one installer, and then run a separate installer script for each SDK to create the .dso/.lib symlinks and copy the epoc32 files.

26. The Selfish Bit - August 15, 2010

Building Symbian Qt 4.6.3 in GnuPoc 1.16 using OpenC/C++ 1.7.5…

How to build Symbian Qt 4.6.3 in GnuPoc 1.16 using OpenC/C++ 1.7.5 under Linux……

27. klebermota.eti.br » Blog Archive » Qt para Desenvolvimento Symbian no Linux - September 21, 2010

[...] Installing Qt for Symbian SDK 4.6.2 on Linux – Anderson Lizardo (Passos adicionais para o Qt – baseado no Qt 4.6.2 mas que funcionam no Qt 4.6.3) [...]

28. Miklós - September 23, 2010

Hi,

I have installed the stuff successfully, but I cannot get the Qtcreator build. I have added all the stuff to the .bashrc. (EPOCROOT, etc.) If I open a console I can run qmake, make debug-gcce successfully. If I run the QtCreator from the same prompt (same env). It fails to build with:

BLDMAKE ERROR: ERROR: CPP executable not found in path
BEGIN failed--compilation aborted at /opt/gnupoc/symbian-sdks/5.0/epoc32/tools//checkgcc.pm line 84.
Compilation failed in require at /opt/gnupoc/symbian-sdks/5.0/epoc32/tools//prepfile.pm line 20.
BEGIN failed--compilation aborted at /opt/gnupoc/symbian-sdks/5.0/epoc32/tools//prepfile.pm line 20.
Compilation failed in require at /opt/gnupoc/symbian-sdks/5.0/epoc32/tools//modload.pm line 49.

Of course I have added the debug-gcce make argument.
Any ideas?

29. Harshit sharma - October 8, 2010

When i use QT4 on linux it successfully detects all the version name, qmake , s60 location but CSL/GCCE directory and carbide directory are empty

lizardo - October 11, 2010
30. My blog in 2010 « Anderson Lizardo's Blog - January 2, 2011

[...] Installing Qt for Symbian SDK 4.6.2 on Linux February 201044 comments and 1 Like on WordPress.com, 3 [...]

31. ema - February 4, 2011

i’ve come into this a bit late…hello? anyone still here? um, my computer rejects qmake (suggesting i install it before using it) bloody rude, so i did then it seem annoyed about debug-gcce…i suspect there is a pattern to my problem that you guys wouldn’t be better informed about…could youse let me in on a little secret? what am i missing exactly?

32. ema - February 4, 2011

by the way…will this work for my nokia E63?

lizardo - February 4, 2011

I suggest you try the recently announced Qt SDK 1.1 Technology Preview release:

http://labs.qt.nokia.com/2011/01/20/qt-sdk-1-1-technology-preview-released/

It is easier to install, and supports Symbian on Linux through the “remote compiler” plugin.

Regards,
Anderson Lizardo


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 )

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: