*** 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)
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
- 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:
# root directory where all SDK files will be installed
# toolchain directory
# Symbian SDK directory
# Qt SDK directory
# wrapper directory (used by gnupoc)
# where all downloaded files are located
mkdir -p $TOOLCHAIN_DIR
tar -C $TOOLCHAIN_DIR -xvjf \
tar -xvzf $SRC_DIR/gnupoc-package-1.13.tar.gz
patch -p1 -i $SRC_DIR/qt_s60_gnupoc_v10.patch
# adjust EKA2TOOLS variable to point to correct location
sed -i "s,EKA2TOOLS=.*,EKA2TOOLS=$TOOLCHAIN_DIR/bin," \
cat > $GNUPOC_ROOT/gnupoc_env.sh << EOF
export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
(Note: the “cat << EOF … EOF” snippet above will generate a “gnupoc_env.sh” file in $GNUPOC_ROOT.)
chmod +x install_openc_16_s60
chmod +x install_qt_s60
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
(Note: the “cat << EOF … EOF” snippet above will generate a “qt_s60_env.sh” file in $GNUPOC_ROOT.)
unset GNUPOC_ROOT TOOLCHAIN_DIR S60_SDK_DIR \
QT_S60_DIR WRAPPER_DIR SRC_DIR
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):
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:
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:
- 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)
- 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 😀