Difference between revisions of "Projects/Mobile/kdepim"

Line 71: Line 71:
== install cmake ==
== install cmake ==
  wget http://www.cmake.org/files/v2.6/cmake-2.6.2.tar.gz
  wget http://www.cmake.org/files/v2.6/cmake-2.6.2.tar.gz
tar xvzf cmake-2.6.2.tar.gz
=== more information ===
=== more information ===

Revision as of 13:48, 10 January 2009

This article describes how to compile KDEPIM for maemo. It takes the Nokia N810 as example device. It uses the cross-compiling environment scratchbox on an Intel-based computer.

On the Nokia itself

install subversion

  • to install openssh on a nokia 810
  • activate the maemo repository in the package manager
    • settings->application manager
    • tools -> application catalog
    • memo extras -> edit -> un-tag "disabled"
    • close
    • browse installable applications
    • all
    • openssh
    • install
ssh [email protected]
apt-get install subversion

In scratchbox

You cannot install scratchbox on an X64 computer, so, install an i386 into a VMWare virtual machine. This example uses SUSE 11, but it might work on other distributions as well. The following describes how to install scratchbox into that SUSE 11 32bit installation.

Hello world

First, we want to compile a "hello world" program for the Nokia. Here is how.

  • Set up scratchbox
[email protected] # useradd -m scratchboxuser
[email protected] # wget http://repository.maemo.org/stable/diablo/maemo-scratchbox-install_4.1.2.sh
[email protected] # chmod 777 maemo-scratchbox-install_4.1.2.sh
[email protected] # ./maemo-scratchbox-install_4.1.2.sh -s /scratchbox
[email protected] # /scratchbox/sbin/sbox_adduser myuser
[email protected] # su - scratchboxuser
  • set up the SDK
[email protected] $ wget http://repository.maemo.org/stable/diablo/maemo-sdk-install_4.1.2.sh

Start the install script and accept all choices:

[email protected] $ sh maemo-sdk-install_4.1.2.sh
  • start scratchbox
[email protected] $ /scratchbox/login
[sbox-DIABLO_ARMEL: ~] > sb-conf select DIABLO_ARMEL
[sbox-DIABLO_ARMEL: ~] > cat > main.c << EOF
#include <stdio.h>

int main()
  printf("hello world");
[sbox-DIABLO_ARMEL: ~] > gcc main.c
[sbox-DIABLO_ARMEL: ~] > file a.out
a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped
  • copy the file to your Nokia N810 using scp

=> the file is executable on the Nokia


To re-login after a reboot of your virtual machine run

/scratchbox/sbin/sbox_ctl start

set up repositories

  • Here you should better make a snapshot of your virtual machine.
  • Then create the installation repositories and install cmake:
cat >>/etc/apt/sources.list<<EOF
# repository with experimental kde packages and dependencies
deb binary/
deb http://repository.maemo.org/ diablo free non-free
deb-src http://repository.maemo.org/ diablo free
deb http://repository.maemo.org/extras-devel/ diablo free
deb-src http://repository.maemo.org/extras-devel/ diablo free
apt-get update

install cmake

wget http://www.cmake.org/files/v2.6/cmake-2.6.2.tar.gz
tar xvzf cmake-2.6.2.tar.gz

more information

  • You can also choose to add the repositories mentioned in http://www.forwardbias.in/data/articles/qt_on_maemo.txt, but as of 2008-09-07, qmake installed from there crashes with signal 11.
  • You can also choose to build qt on your own, but for me it does not find openssl during its installation process.

Install kde applications

apt-get install shared-mime-info
apt-get install xsltproc
apt-get install kdepimlibs5-dev
svn co https://svn.kde.org/home/kde/trunk/kdesupport
cd kdesupport
cmake . && make && make install
svn co https://svn.kde.org/home/kde/branches/KDE/4.1/kdepim
cd kdepim
cmake . && make && make install

Here you can get to run singular applications, e.g. ktimetracker.

re-install kdelibs


curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.7.tar.gz>pcre-7.7.tar.gz
tar xvzf pcre-7.7.tar.gz
cd pcre-7.7
./configure && make && make install


svn co https://svn.kde.org/home/kde/branches/KDE/4.1/kdelibs
mkdir kdelibs-build
cd kdelibs-build
cmake ../kdelibs
make install

install kdepim

svn co https://svn.kde.org/home/kde/branches/KDE/4.1/kdepim
cd kdepim 
cmake .
make && make install


manually dpkg



kernel too old




FATAL: kernel too old

This happened for me with SLES 10. Better use SUSE 10.3 or SUSE 11.

unable to install maemo-sdk-dev

On SLES 10, I got

Processing was halted because there were too many errors.
E: Sub-process /scratchbox/devkits/debian-etch/bin/dpkg returned an error code (1)
E: Unable to install maemo-sdk-dev on DIABLO_ARMEL target.
E: Please check the sources.list for errors.
E: Scratchbox login returned error 100.

In this case, change your distribution and start again.

ld terminated with signal 9

Should you get

collect2: ld terminated with signal 9 [Killed]

Increase the amount of memory for the virtual machine, 512MB is not always enough.

See also

This page was last edited on 10 January 2009, at 13:48. Content is available under Creative Commons License SA 4.0 unless otherwise noted.