User talk:Anajand

From Openmoko

Jump to: navigation, search

Here are the steps that I went through to successfully build with MokoMakefile on Fedora Core 5 (FC5):

1- First I had to install software packages that either were not installed by default during the FC5 install - although present in the list of available and installable software through "Applications > Add/Remove Software" - or because they were needed somewhere during the build process and I had to search for them on the internet.

NOTE: below maybe I have missed something in the list, in this case during the build process you will get an error message and then you will need to add the missing packages to your installation

1.1- Make sure the following packages are installed, using "Application > Add/Remove Software":

- diffstat

- texi2html

- cvs

- subversion

- git

- texinfo

- python

- ccache

- patch

- m4

- sed

- bison

- make

- docbook

- openjade

- glibc-devel

- PyQt

- xmlto

- python-sqlite2

- help2man

1.2- Install monotone for FC5 from:

   http://www.monotone.ca/downloads/0.31/monotone-0.31-0.mtn.1.fc5.i386.rpm

1.3- Install psyco for FC5 for instance from:

   ftp://mirror.switch.ch/mirror/fedora/linux/extras/5/i386/python-psyco-1.5.1-3.fc5.i386.rpm

2- FC5 comes with gcc 4.x. You need to build and install gcc 3.x so that one of the packages required by the project could successfully build: qemu does not compile with 4.x, there will be compile errors, some of them are simple to fix by adding some missing #define's, but the others are more deep inside the core of the code and would require perhaps the creator of qemu to fix them.

2.1- Get gcc 3.3.6 from:

   ftp://gd.tuwien.ac.at/gnu/gcc/releases/gcc-3.3.6/gcc-core-3.3.6.tar.bz2

2.2- Build gcc 3.3.6. I think you will need to be root to install it:

- Create a folder (for instance MYGCC) and untar gcc-core-3.3.6.tar.bz2 inside MYGCC

- Do cd MYGCC and configure with:

   ./configure --prefix=/opt/gcc33 --program-suffix=-3.3
   WARNING: Do NOT configure with the default prefix!
   It is recommended to compile it with this prefix, otherwise you can damage your system!

- Now compile it with:

   make bootstrap

- Install it with:

   make install

this will put gcc 3.3.6 in the /opt/gcc3 folder

It looks like MokoMakefile knows where to find that compiler so after the above I did not need to do anything else in terms of installation of gcc 3.3.6.

3- Go through the indicated process to launch MokoMakefile at http://wiki.openmoko.org/wiki/MokoMakefile:

- get the Makefile with:

   wget http://www.rwhitby.net/files/openmoko/Makefile

if that doesn't work, try:

   wget http://svn.nslu2-linux.org/svnroot/mokomakefile/trunk/Makefile

Then:

   make setup

Followed by:

   make openmoko-devel-image

4- At some point you will get compile errors because there are missing symbols: in FC5 the file "/usr/include/asm/errno.h" needs to be modified in order to allow successful compile of:

   ./build/tmp/work/i686-linux/qemu-native-0.9.0+cvs20070613-r5/qemu/linux-user/syscall.c 

To fix the compile error you should add the next lines to your /usr/include/asm/errno.h (the "/* NEEDED */" lines are absolutely needed to fix the compile errors, the other /* JUST ADDED */ lines are just to align errno.h with other distributions of that file):

   #define ECANCELED       125     /* Operation Canceled */ /* JUST ADDED */
   #define ENOKEY          126     /* Required key not available */  /* NEEDED */
   #define EKEYEXPIRED     127     /* Key has expired */ /* NEEDED */
   #define EKEYREVOKED     128     /* Key has been revoked */ /* NEEDED */
   #define EKEYREJECTED    129     /* Key was rejected by service */  /* NEEDED */

   #define EOWNERDEAD      130     /* Owner died */ /* JUST ADDED */
   #define ENOTRECOVERABLE 131     /* State not recoverable */ /* JUST ADDED */

5- Then ... after a few hours of build ... I got another error:

   ...
   NOTE: package glibc-2.5-r7: task do_package: failed

Solution:

   add:
       ENABLE_BINARY_LOCALE_GENERATION = "0"
   to the file ~/moko/build/conf/local.conf

and then the build could continue with a new:

   make openmoko-devel-image

6- Then at some the build stopped again (around Task ~2677) with some ERROR messages like:

   ~/moko/openembedded/packages/gettext/gettext_0.14.1.bb fail... 

Not knowing what they were about I launched again a "make openmoko-devel-image" and the build could continue and END!...

   ...
   NOTE: build 200710142252: completed
   [ -d stamps ] || mkdir stamps
   touch stamps/openmoko-devel-image
   $
Personal tools