User:Tstaerk

Contents

Incubator

Here I prepare articles for this wiki to come.

maemo 5

Installing maemo 5 (freemantle, see codenames) for N900 (maemo 5 does not run on the N810) in a SUSE Linux 11.2 x32 virtual machine resulted in

Processing was halted because there were too many errors.

So trying SUSE 11.1 (where maemo 4 worked):

root@i386 # useradd -m scratchboxuser
root@i386 # passwd scratchboxuser
root@i386 # wget http://repository.maemo.org/stable/fremantle/maemo-scratchbox-install_5.0.sh
root@i386 # chmod 777 maemo-scratchbox-install_5.0.sh
root@i386 # ./maemo-scratchbox-install_5.0.sh -s /scratchbox
root@i386 # /scratchbox/sbin/sbox_adduser scratchboxuser
root@i386 # su - scratchboxuser
scratchboxuser@i386 $ wget http://repository.maemo.org/stable/fremantle/maemo-sdk-install_5.0.sh
scratchboxuser@i386 $ sh maemo-sdk-install_5.0.sh

Xephyr

SUSE 11.2: xorg-x11-server-extra

main.cpp

#include <QApplication>
#include <QPushButton>
int main(int argc, char ** argv)
{
  QApplication qa(argc,argv);
  QPushButton* qp=new QPushButton("hello world");
  qp->show();
  return qa.exec();
}

Build and run it:

export DISPLAY=:4
qmake -project && qmake && make && ./qttest

Compiling on the N810

wget http://repository.maemo.org/pool/maemo4.1.2/free/g/glibc/libc6-dev_2.5.0-1osso10_armel.deb
  • get linux kernel headers
wget http://repository.maemo.org/pool/maemo4.1.2/free/l/linux-kernel-headers/linux-kernel-headers_2.6.16.osso11-1_armel.deb
  • get libgcc
wget http://repository.maemo.org/pool/maemo4.1.2/free/g/gcc-3.4/libgcc1_3.4.4cs2005q3.2-5.osso8_armel.deb
  • install everything
dpkg -i gcc-3.4_3.4.4cs2005q3.2-5.osso8_armel.deb libc6-dev_2.5.0-1osso10_armel.deb linux-kernel-headers/linux-kernel-headers_2.6.16.osso11-1_armel.deb
  • do the usual test
Nokia-N810-43-7:~# cat main.c
#include <stdio.h>

int main()
{ printf("hello world"); }

Nokia-N810-43-7:~# gcc-3.4 -o greeter main.c
Nokia-N810-43-7:~# ./greeter
hello worldNokia-N810-43-7:~#

C++

  • Try to compile a C++ program
Nokia-N810-43-7:/media/mmc1# cat main.cpp
#include <iostream>
int main()
{
  std::cout << "hello C++" << std::endl;
}
Nokia-N810-43-7:/media/mmc1# gcc-3.4 main.cpp
<unknown> tried to exec cc1plus but failed (No such file or directory)
  • download g++
wget http://repository.maemo.org/pool/maemo4.1.2/free/g/gcc-3.4/g++-3.4_3.4.4cs2005q3.2-5.osso8_armel.deb
  • download lib standard C++
wget http://repository.maemo.org/pool/maemo4.1.2/free/g/gcc-3.4/libstdc++6-dev_3.4.4cs2005q3.2-5.osso8_armel.deb
  • install g++
dpkg -i libstdc++6-dev_3.4.4cs2005q3.2-5.osso8_armel.deb g++-3.4_3.4.4cs2005q3.2-5.osso8_armel.deb
  • try to compile main.cpp again
gcc-3.4 main.cpp
/var/tmp/ccQkm9NS.o: In function `std::__verify_grouping...
  • ok, but do it right
gcc-3.4 -lstdc++ main.cpp
./a.out
hello C++

Compiling software with automake

Does not work.

Compiling Qt software

Nokia-N810-43-7:~# cat /etc/apt/sources.list
deb http://repository.maemo.org/extras/ diablo free
deb-src http://repository.maemo.org/extras/ diablo free
Nokia-N810-43-7:~# apt-get install libqtcore4 
apt-get install libqt4-dev
# cat qttest2.cpp 
#include <QApplication>
#include <QPushButton>
int main(int argc, char ** argv)
{
  QApplication qa(argc,argv);
  QPushButton* qp=new QPushButton("hello world");
  qp->show();
  return qa.exec();
}

# g\+\+-3.4 -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. qttest2.cpp  -lQtCore -lQtGui
# ./a.out

Contributions

Here are the contributions I am proud of