jump to navigation

My blog in 2010 January 2, 2011

Posted by lizardo in General.
add a comment

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

A helper monkey made this abstract painting, inspired by your stats.

About 3 million people visit the Taj Mahal every year. This blog was viewed about 30,000 times in 2010. If it were the Taj Mahal, it would take about 4 days for that many people to see it.

In 2010, there were 8 new posts, growing the total archive of this blog to 27 posts.

The busiest day of the year was August 27th with 328 views. The most popular post that day was Running PySide applications on Qt Simulator.

Where did they come from?

The top referring sites in 2010 were developer.symbian.org, maemo.org, labs.trolltech.com, labs.qt.nokia.com, and thezeroth.net.

Some visitors came searching, mostly for undefined reference to `vtable for, undefined reference to vtable, qt symbian linux, undefined reference to vtable for, and undefined reference to `vtable.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

Running PySide applications on Qt Simulator August 2010
2 comments

2

Installing Qt for Symbian SDK 4.6.2 on Linux February 2010
44 comments and 1 Like on WordPress.com,

3

“undefined reference to `vtable for …’ errors” in Qt derived classes April 2009
8 comments

4

Installing Qt for Symbian SDK 4.6.1 on Linux January 2010
43 comments

5

Running Qt for S60 SDK on Linux July 2009
12 comments

PySide 1.0.0~beta1 binaries released for Ubuntu December 7, 2010

Posted by lizardo in Debian/Ubuntu, Linux.
Tags: , , ,
add a comment

Didier ‘OdyX’ Raboud once again borrowed his great Debian packaging/integration skills to the PySide project, and created packages for the latest Ubuntu releases (including the development one, codenamed “natty”). They are available on the official repository. See the download instructions page for more details. See also the original announcement.

Qt 4.7.0 for Symbian on Linux (now with Qt Creator support!) October 11, 2010

Posted by lizardo in Linux.
Tags: , , ,
34 comments

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!

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

Install everything using a single command:

./qt_for_symbian_4.7.0_linux_installer_v4.sh \
    <download-dir> \
    <install-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!

Running PySide applications on Qt Simulator August 26, 2010

Posted by lizardo in General.
Tags: , , ,
5 comments

Some may have noticed that the Nokia Qt SDK contains a simulator for Qt applications on Nokia devices. It consists of the simulator application, plus Qt libraries built for its platform (Q_WS_SIMULATOR), which basically “wraps” the target application on the simulator window (and allows to simulate various events of the target device).

It has been asked on the Maemo.org Talk whether it would be possible to run PySide applications on the simulator. Technically, it would be as simple as building PySide against the simulator libraries… and indeed it was! Well, at least after a couple of patches, I managed to make it work, as can be seen on the screenshot below (for the curious the application running on it is the “hyperui” demo from pyside-examples repository):

Qt Simulator running PySide

For anyone willing to try, you just need to download the latest PySide code, apply the patches not yet upstream (to the pyside.git tree), and build everything as per official instructions, with these notes:

  • When building PySide, add the directory which contains the Qt tools for the Simulator platform (usually “<SDK_installation_dir>/Simulator/Qt/gcc/bin”) to your PATH (taking care to add it before other directories which contain Qt tools).
  • When building PySide, add -DQ_WS_SIMULATOR=yes to the cmake command. This is necessary because currently CMake does not detect the Simulator platform, thus requiring us to force it.
  • When running applications, remember to set LD_LIBRARY_PATH to point to the Simulator libraries, otherwise the application might try to be run with your system Qt libraries, which will probably fail.

To make testing easier, I built PySide binaries (from git snapshots) for the Simulator libraries shipped in Nokia Qt SDK 1.0. You can download them here. They were built on Ubuntu 10.04 (32-bit), but will probably work on other (32-bit) distributions. Also note it was build for Python 2.6. To use these binaries, unpack the tarball and modify the “qt_sdk_dir” in run_with_simulator.sh to point to your Nokia Qt SDK installation directory. Next, run:

./run_with_simulator.sh /path/to/app.py

And your application should run under the simulator (the simulator opens automatically if not already running).

TODO

  • Apply required PySide patches upstream (they are currently under review).
  • Attempt to build PySide Mobility as well.

Python bindings for Qt Mobility APIs now available August 19, 2010

Posted by lizardo in General.
Tags: , , ,
add a comment

Are you a Python developer, feeling envious of your C++-coding buddies cranking out N900 Qt applications with all those nice Qt Mobility APIs? No reason for envy any longer: The PyMaemo/PySide team is proud to present PySide Mobility: Python bindings for the Qt Mobility APIs! Combining the power of Python and the Nokia-sponsored PySide Qt bindings with the capabilities of Qt Mobility, you’ll be spewing out impressive apps for N900 like never before!

Original announcement

PySide for Maemo 5 rebuilt for Qt 4.6.2 final release February 19, 2010

Posted by lizardo in General.
Tags: , , ,
2 comments

Qt 4.6.2 for Maemo 5 was released this week. Due to some changes prior to the final Qt release, PySide users might have seen this error when trying to use QtQui:

Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /usr/lib/pymodules/python2.5/PySide/QtGui.so: undefined symbol: _ZNK24QAbstractKineticScroller10metaObjectEv

To fix this, we rebuilt the PySide 0.2.3 packages against the Qt 4.6.2 release, and now it should be working again. So make sure you are using the latest PySide packages on Maemo 5 (0.2.3-1maemo3) and enjoy!

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

Posted by lizardo in Linux.
Tags: , , ,
48 comments

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

Python tutorial: Accessing APIs without Python bindings February 2, 2010

Posted by lizardo in General.
Tags: ,
add a comment

The PyMaemo team has prepared a short tutorial with an actual example on how to access APIs for which there are no Python bindings yet. libosso-abook was used as an example, but in practice, you can access any C libraries using the same approach. This technique can be used while we do not finish implementing the full Maemo API.

Enjoy. :)

Installing Qt for Symbian SDK 4.6.1 on Linux January 21, 2010

Posted by lizardo in Linux.
Tags: , , ,
45 comments

***For Qt 4.6.2 and S60 3.1 SDK support, be sure to read the updated post***

Update (2010-01-27): New version of Qt installer (v2).

Qt 4.6.1 was released last Tuesday, so I took some time to update my Linux support patches for Qt (which are now merged in qt-s60 tree and hopefully will be in main Qt tree at some point) and GnuPoc (which, thanks to Martin, are now integrated into the latest release).

I had a couple of previous posts detailing instructions on how to install the SDK on Linux, but after some time, it became too boring to run those commands manually, and some people asked for a script. So, from now on, I will provide two installers to make the process much more automated and simple: one installer for GnuPoc + Open C/C++ plugin, and another for the Qt for Symbian SDK.

Note that currently the GnuPoc installer handles only the S60 5.0 SDK. If someone is interested on a 3.1 SDK installer let me know so I can add support for it too.

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 5.0 SDK + the Open C/C++ plugin:

./gnupoc_1.15_S60_5.0_installer_v1.sh \
    <download-dir> \
    <gnupoc-dir>

Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <gnupoc-dir> with the destination directory for GnuPoc and the SDK files (e.g. “~/gnupoc”). 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.1_linux_installer_v2.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.1″). 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
 
(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. Open collidingmice.pro and replace these two lines:
  4.     TARGET.UID3 = 0xA000A643
        include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)

    with:
        TARGET.UID3 = 0xE000A643
    In other words: replace the UID3 “0xA000A643″ with “0xE000A643″ and remove (or comment out) the “include(…)” line. This will allow to sign the built SIS file using a self-signed certificate, otherwise you would need a R&D certificate.

  5. Now build the example and generate the SIS file
  6. qmake
    make debug-gcce
    make sis

A few notes:

  • 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 4.6.1 release only ships debug versions of the libraries
  • Make sure you do similar changes as described above if you want to try compiling other Qt examples. Otherwise, you will receive errors like “Unable to install” while trying to install the SIS file on the phone.

Installing Qt for Symbian on Linux September 24, 2009

Posted by lizardo in General.
Tags: , , ,
9 comments

*** 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:

(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

  1. 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.
  2. # 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

  3. Install ARM toolchain:
  4. mkdir -p $TOOLCHAIN_DIR
    tar -C $TOOLCHAIN_DIR -xvjf \
      $SRC_DIR/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2

  5. Unpack gnupoc sources and apply the patch that adds Qt for Symbian support:
  6. 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

  7. Install Symbian SDK:
  8. cd sdks
    ./install_gnupoc_s60_50 \
      $SRC_DIR/S60_5th_Edition_SDK_v1_0_en.zip \
      $S60_SDK_DIR

  9. Install gnupoc wrappers and native tools:
  10. ./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

  11. Create a “gnupoc_env.sh” script to be used for gnupoc environment setup, by running this command:
  12. 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.)

  13. Initialize the Symbian SDK environment (you will need to do this every time you close the current shell session):
  14. . $GNUPOC_ROOT/gnupoc_env.sh

  15. Install OpenC:
  16. 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

  17. Install Qt for Symbian (it will take some time because some tools need to be compiled for Linux):
  18. 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.

  19. Create a “qt_s60_env.sh” script to be used to setup Qt for Symbian environment, by running this command:
  20. 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.)

  21. Initialize the Qt for Symbian environment (you will need to do this every time you close the current shell session):
  22. . $GNUPOC_ROOT/qt_s60_env.sh

  23. 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
  24. Unset all temporary variables we used earlier:
  25. 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 :D

Follow

Get every new post delivered to your Inbox.