Maemo SDK+: Frequently Asked Questions

What is maemo SDK+?

Maemo SDK+ is based on Scratchbox2 and provides an alternative way to build applications for the maemo platform.

We have eliminated Scratchbox 1 completely. The current version, however, is still alpha quality lacking essential features like runtime debugging support.

I have installed maemo Diablo / maemo Chinook / some other maemo SDK in my computer. Do I need to upgrade?

No, you do not need to "upgrade". However, if you want to test drive maemo SDK+ on your computer, you can do that. Installing maemo SDK+ does not conflict with your other maemo SDK installations.

What is the GCC toolchain provided in maemo SDK+

We currently provide GCC 4.2.1 and GCC 3.4.4 cross-compilers.

Can the GCC 4.2.1 version cause problems when compiling maemo source packages originally compiled with GCC 3.4 version?

Yes, it can. GCC 4 and in particular G++ is much more strict and regards many issues which were previously warnings as errors.

What is a rootstrap?

A rootstrap is a compressed tar file containing libraries, header files, executables, and other files that are needed for building software for a specific target device. The rootstrap has to match with the operating system image on the target hardware. For example, to build software for Nokia N810 running OS2008, you need diablo41_armel rootstrap.

What do you mean by host, target, and build environments?

These terms come from cross-compilation terminology. Host environment is the environment you run on your workstation (laptop or PC). Currently maemo SDK+ officially supports only Ubuntu Hardy 8.04 / i386 host environment. The maemo SDK+ is installed into a host environment.

Build tools distribution is a specific set of build tools that is used during a software build process. You can either use the host tools during a cross-compilation, or, use a specific build tools distribution. Maemo SDK+ provides a tool, maemo-tools, which can download and install a build tools distribution by a single command. Currently we prefer using Debian Etch as the build tools distribution.

By target environment we mean a rootstrap, in other words, a set of target libraries, header files, and other files needed for building software for a specific target device.

Why does the build dependency checking take so much time?

When the build dependencies of a rootstrap are checked for the first time, it needs to build a database. This is because Scratchbox 2 has its own build dependency checker that examines installed packages from multiple places. Note that this happens once only per installed rootstrap. Subsequent dependency checks are much faster.

How do I run dpkg -i on maemo SDK+ to install a package into the target rootstrap?

  $ sb2 -eR dpkg -i [name of the package]

What modes does sb2 have? Why are they needed?

sb2 has two modes, build mode to build software for a specific target and runtime mode to run target software on the host. Sometimes you may also want to have superuser access rights in runtime mode (in order to install packages, for example). To build software, just add sb2 before the command:

  $ sb2 make
  $ sb2 dpkg-buildpackage -rfakeroot
  $ sb2 make install DESTDIR=/target_root

In order to debug target software on the host, you can enter runtime mode as follows:

  $ sb2 -e

This is an alternative way:

  $ maemo-sdk enter runtime

In runtime mode, you can launch applications like maemopad as follows:

  [SB2 emulate diablo41_armel] $ maemopad

To access runtime mode with superuser access rights, type the following:

  $ sb2 -eR

or alternatively:

  $ maemo-sdk enter sudo-runtime

The reason to have two different modes is simple. When we build software we need to access i386 build tools that come from a specific environment which is well-tested to be compatible with the target software. On the other hand, when we debug we want an environment which is as close to the actual target device environment as possible. With two different modes this is possible.

How do I run make install on maemo SDK+ to install into the target rootstrap?

maemo SDK+ is a cross-compilation environment. To install software to the target rootstrap, your Makefile has to know where to put the files. Usually the plain make install command places files under /usr/... or /usr/local/.... In a cross-compilation environment, this is not correct because you need to install the files in the target rootstrap directory, not in the build environment.

The standard way is to have a variable called DESTDIR in Makefile to specify the installation target location, as follows:

  $ sb2 make install DESTDIR=/target_root

your makefile installs the default target rootstrap to Scratchbox 2. These are located in the ~/.maemo-sdk/rootstraps directory.

When I run 'maemo-sdk start gui', Xephyr crashes. How can I get it to work?

This happens because your X server does not support the color bit depth specified for the rootstrap. Diablo rootstraps, for instance, require 16 bit color depth. You can experiment with some other color depths by forcing maemo SDK+ to use your fixed settings by giving the following command:

 $ maemo-sdk set gui-bit-depth 24

Now when you rerun 'maemo-sdk start gui', it uses 24 bit color depth instead, which may be better supported by your X server.

I am building software for Diablo. I get the following error message when running ./configure:

  checking dynamic linker characteristics... GNU/Linux
  checking how to hardcode library paths into programs... immediate
  appending configuration tag "F77" to libtool
  checking for intltool >= 0.23... 0.35.0 found
  checking for perl... /usr/bin/perl
  checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool
  make: *** [config.status] Error 1

This is because the Perl package in the rootstrap is configured incorrectly. Use the following setting:

  $ export SBOX_REDIRECT_FORCE=/usr/bin/perl

Then run the ./configure script again.

What limitations does maemo SDK+ have currently?