*** These instructions have been superseded by the GnuPoc and Qt for Symbian unofficial installers, described in this post***
Update (2009-09-24): Add workaround for GCCE issue.
Update (2009-10-05): Update gnupoc patch to apply against 20091005 snapshot. Remove workarounds from “Known Issues” sections that are already integrated into new patch.
Update (2009-10-07): Add instruction for installing gnupoc build dependencies.
Update (2009-10-23): New patch version (v9), that now applies cleanly to latest snapshots.
Update (2009-11-17): New patch version (v10), now applies against the 4.6.0 RC1 release.
In a previous post, I provided instructions on running Qt for Symbian (the “Tower” release) on Linux. However, for those who want to play with the bleeding edge Qt for Symbian development, you might want to try out the latest 4.6 development code from Qt GIT. I put some instructions for compiling Qt for Symbian from GIT on Linux as well, but unfortunately it requires the RVCT compiler to build.
Fortunately, today espenr announced daily snapshots, that will allow those who don’t have access to RVCT to try out the latest 4.6 development as well :D. So how to get this thing running on Linux? The snapshots so far consist only of the Windows installer and a .zip containing the source code.
By “merging” information from my two previous posts, I will describe below how to install the Qt for Symbian daily snapshots on Linux. Even if you have a previous installation of the Symbian SDK, you will need to follow the full instructions again (sorry), as these instructions contain a bunch of bug fixes to the Symbian SDK. Hopefully this requirement will go away at some point, when all Symbian SDK portability issues are addressed.
These instructions also work for the just released 4.6.0 RC1.
These instructions were tested only in the following environment:
- Host: x86 32-bits (running Ubuntu 8.10)
- Device and SDK: S60 5.0 (N97 and 5800)
Preparation
Download all required files:
- S60_5th_Edition_SDK_v1_0_en.zip (623MB): S60 Platform SDK for Symbian OS, for C++
- s60_open_c_cpp_plug_in_v1_6_en.zip (35MB): Open C/C++ Plugin
- qt-symbian-opensource-4.6.0-snapshot-YYYYMMDD.exe or qt-symbian-opensource-4.6.0-rc1.exe: Qt for Symbian latest daily snapshot (you need only the .exe for running the SDK). Last tested version: 4.6.0 RC1
- gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2 (11MB): CodeSourcery’s ARM toolchain for Symbian
- gnupoc-package-1.13.tar.gz (6.2MB): scripts and patches to run Symbian SDK on Linux
- qt_s60_gnupoc_v10.patch: patch for gnupoc, adding support for Qt for Symbian installation and various bug fixes
(many thanks to Francisco Keppler for hosting this last file on his web site!)
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, set some environment variables to be used on the following steps (feel free to modify them to install the SDK on some other location). NOTE: these variables are not necessary after installation.
- Install ARM toolchain:
- Unpack gnupoc sources and apply the patch that adds Qt for Symbian support:
- Install Symbian SDK:
- Install gnupoc wrappers and native tools:
- Create a “gnupoc_env.sh” script to be used for gnupoc environment setup, by running this command:
- Initialize the Symbian SDK environment (you will need to do this every time you close the current shell session):
- Install OpenC:
- Install Qt for Symbian (it will take some time because some tools need to be compiled for Linux):
- Create a “qt_s60_env.sh” script to be used to setup Qt for Symbian environment, by running this command:
- Initialize the Qt for Symbian environment (you will need to do this every time you close the current shell session):
- Install the following SIS files on your device:
- $EPOCROOT/nokia_plugin/openc/s60opencsis/pips_s60_1_6_ss.sis
- $EPOCROOT/nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_ss.sis
- $EPOCROOT/nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_1_6_ss.sis
- $QT_S60_DIR/qt_selfsigned.sis
- Unset all temporary variables we used earlier:
# root directory where all SDK files will be installed
GNUPOC_ROOT=$HOME/gnupoc
# toolchain directory
TOOLCHAIN_DIR=$GNUPOC_ROOT/csl_gcc
# Symbian SDK directory
S60_SDK_DIR=$GNUPOC_ROOT/symbian-sdks/5.0
# Qt SDK directory
QT_S60_DIR=$GNUPOC_ROOT/qt_s60
# wrapper directory (used by gnupoc)
WRAPPER_DIR=$GNUPOC_ROOT/bin
# where all downloaded files are located
SRC_DIR=$HOME/downloads
mkdir -p $TOOLCHAIN_DIR
tar -C $TOOLCHAIN_DIR -xvjf \
$SRC_DIR/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2
tar -xvzf $SRC_DIR/gnupoc-package-1.13.tar.gz
cd gnupoc-package-1.13
patch -p1 -i $SRC_DIR/qt_s60_gnupoc_v10.patch
cd sdks
./install_gnupoc_s60_50 \
$SRC_DIR/S60_5th_Edition_SDK_v1_0_en.zip \
$S60_SDK_DIR
./install_wrapper $WRAPPER_DIR
cd ../tools
./install_eka2_tools $TOOLCHAIN_DIR
# adjust EKA2TOOLS variable to point to correct location
sed -i "s,EKA2TOOLS=.*,EKA2TOOLS=$TOOLCHAIN_DIR/bin," \
$WRAPPER_DIR/gnupoc-common.sh
cat > $GNUPOC_ROOT/gnupoc_env.sh << EOF
export PATH=$WRAPPER_DIR:\$PATH
export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
EOF
(Note: the “cat << EOF … EOF” snippet above will generate a “gnupoc_env.sh” file in $GNUPOC_ROOT.)
. $GNUPOC_ROOT/gnupoc_env.sh
cd ../sdks
chmod +x install_openc_16_s60
./install_openc_16_s60 \
$SRC_DIR/s60_open_c_cpp_plug_in_v1_6_en.zip \
$S60_SDK_DIR
chmod +x install_qt_s60
./install_qt_s60 \
$SRC_DIR/qt-symbian-opensource-<version>.exe \
$S60_SDK_DIR \
$QT_S60_DIR
If installation went well, you should see the following:
...
Qt is now configured for building. To start the build run:make debug-winscw|debug-armv5|release-armv5.
To reconfigure, run 'make confclean' and configure.
Of course, you do not want to build Qt, so just ignore it and proceed with the next step.
cat > $GNUPOC_ROOT/qt_s60_env.sh << EOF
export PATH=$QT_S60_DIR/bin:\$PATH
export QMAKESPEC=symbian-abld
EOF
(Note: the “cat << EOF … EOF” snippet above will generate a “qt_s60_env.sh” file in $GNUPOC_ROOT.)
. $GNUPOC_ROOT/qt_s60_env.sh
unset GNUPOC_ROOT TOOLCHAIN_DIR S60_SDK_DIR \
QT_S60_DIR WRAPPER_DIR SRC_DIR
Usage
You need to setup the environment, so tools like qmake, bldmake, abld, makesis etc. are found (not necessary if you just did the installation, unless you closed the shell session):
. /path/to/gnupoc_env.sh
. /path/to/qt_s60_env.sh
Note the “.” (dot) before the gnupoc_env.sh. It says that the contents of the gnupoc_env.sh file will be run in the current shell session, as if you typed them by hand.
To actually build some Qt code, use these commands:
cd path/to/source
qmake # assuming the code already has a .pro file
make debug-gcce # or make debug-armv5 (if using RVCT)
make sis # to generate .sis file
And to clean the source:
make distclean
Notes:
- Be sure to use qmake from Qt for Symbian. Otherwise the generated Makefiles will be for your host system
- The trailing slash on the EPOCROOT variable is important (this is assumed in many places on Symbian SDK scripts)
Known Issues
- The snapshots contain only the the “debug” libraries. Therefore, only the debug targets will work, i.e. use only “make debug-gcce” (if using GCCE compiler) or “make debug-armv5” (if using RVCT)
See also the more general known issues related to Qt for Symbian.
Ideas for improvements and TODO items
- Add Symbian support to Qt configure script, eliminating the need to compile configure.bin
- Create a nice GUI installer for Linux
- Allow to easily upgrade Qt for Symbian SDK installation, without requiring to reinstall the entire Symbian SDK
- Itegration with Qt Creator, KDevelop or some other IDE
Feel free to contribute with your ideas or even better, help implementing them 😀
Pingback: Anselmo Lacerda Silveira de Melo (anselmolsm) 's status on Thursday, 24-Sep-09 14:45:02 UTC - Identi.ca
You forgot to tag this article, it didn’t show up in the s60 rss feed.
Anyway, thanks for the article. Just a little question, do you or anyone else know why the 2005 version of GCCE must be used? Did anyone try it with 2009q1?
I just added the missing tags…
It seems 2005 is used because it is the one “certified” by Nokia for Symbian development. I don’t know of anyone who tried the 2009 version.
If you try it, tells us whether it works or not 🙂
Thanks for these instructions.
Very useful stuff.
These instructions were tested with the S60 3rd ed. SDK and we managed to build and run applications for N85 as well. =)
Pingback: Installing Qt for Symbian SDK 4.6.1 on Linux « Anderson Lizardo's Blog
Very useful!
Thanks Lizardo! 🙂
Hi friends,
Really amazing blog post.I saw and read your blog,This site is useful to symbian phone.I know that it will help me in my own symbian phone.I think it may be relevant.
Thank You
http://clementmasonsblog.blogspot.com/2010/11/symbian-software-support-and.html
Pingback: Compiling Qt Mobility Apps for Symbian on Linux | Kodira