This wiki is now deprecated. Please visit the new wiki at http://wiki.maemo.org

ThingsToDoAfterInstallingChinook

  1. Install maemo-explicit
  2. Application Manager
    1. fakeroot
    2. Network access
  3. Pidgin-specific
    1. The Source
    2. Python

To actually set up the Chinook 4.0 SDK go to the SDK page.

Throughout this page I assume the CHINOOK_X86 scratchbox target.

I ran the maemo-sdk-install_4.0.sh script, and I chose to install everything, including development and debug packages. I also chose to use the Nokia closed binaries it offered. I don't think these are strictly necessary, but I don't think it hurts to install them either.

Install maemo-explicit

At the end of the maemo-sdk-install_4.0.sh it tells you about doing it. So,

apt-get install maemo-explicit

Application Manager

fakeroot

Application manager expects fakeroot to be located at /usr/bin/fakeroot

ln -s `which fakeroot` /usr/bin/fakeroot

This should make it work.

Network access

Application manager also expects that icd will be present so, if you try to perform an operation requiring network access, it will do nothing. However, you can tell it to assume the presence of a network connection by placing it in red pill mode, and choosing "Assume net connection" from "Tools→Settings".

Pidgin-specific

I have created an install file you can use (in a limited fashion) with application manager. Download it and place it inside your scratchbox home directory under ~/MyDocs/.documents. You can then open it from application manager via the "Application→Install from file..." menu item. It will add all the repositories and update the apt cache, but, unfortunately, you have to click cancel on actually installing Pidgin, because attempting the install will fail (due to dpkg: requested operation requires superuser privilege, if you care to check your console). Thus, you have to do the installation from the command line:

fakeroot apt-get install pidgin

The Source

The mtn branch org.maemo.garage.pidgin.pidgin from idefix.go-nix.ca has Pidgin On Maemo sources, complete with a Debian package building structure (debian/ off the root of the source tree).

To build Pidgin, issue, from the root of the source tree,

MAKEFLAGS='-j3' DEB_BUILD_OPTIONS='noopt,nostrip' dpkg-buildpackage -rfakeroot -I_MTN -d

Here's what the parameters mean:

  • MAKEFLAGS: extra flags to pass to make. Use -jn with n > 2 on multi-core systems or with distcc.
  • DEB_BUILD_OPTIONS: Various comma-separated options that govern how the package gets built:
    • noopt: Compile with -O0 -g
    • nostrip: Don't strip binaries
    • maemo-launcher: Make pidgin a shared object to be loaded with maemo-invoker, rather than a binary executable
    • thumb: compile with -mthumb
  • -d should not be necessary. It tells dpkg-buildpackage not to check if build dependencies are met. Unfortunately, the packages required to build Pidgin with all necessary features are not available (avahi, and gnutls on x86). Thus, I will use it until these become available.
  • -I_MTN means ignore files and directories of the form _MTN. This will (hopefully) prevent the _MTN/ subdirectory from ending up in source packages.

I usually build with noopt,nostrip when hacking, and with maemo-launcher,thumb when making a release.

Python

Building pidgin with D-Bus support requires Python 2.4. The Chinook rootstrap has this, however, invoking /usr/bin/python results in scratchbox overriding this execution and executing /scratchbox/tools/bin/python instead. This version of python is only 2.3. To "convince" scratchbox to use the 2.4 version of Python, do this:

mkdir -p /usr/lcl/bin
ln -s /usr/bin/python2.4 /usr/lcl/bin/python

Now, you must prepend /usr/lcl/bin to your PATH in ~/.bashrc. To make the new PATH take effect, either log out of scratchbox and back in, or run

. ~/.bashrc

At this point, you will notice that python complains about the sem_post syscall not being implemented. This may be a problem, but it does not affect the Pidgin build. However, scratchbox runs sb-conf to generate the prompt. sb-conf, in turn, requires python. Thus, you get repeated complaints which can get annoying. So, edit ~/.bashrc and modify the prompt to redirect its complaints to /dev/null:

export PS1="sbox-\$(/scratchbox/tools/bin/sb-conf current 2> /dev/null): \w > "

Again, you can either

. ~/.bashrc

or log out/in of scratchbox.

What links here?

sponsored by Nokia Corporation