This environment build on 64-bit ubuntu 12.04 system

Install JDK

$ sudo gedit /etc/apt/sources.list

Add:

deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse

Inputin terminal:

$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

Installing required packages (Ubuntu 12.04)

Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master.

$ sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386  \
  g++-multilib mingw32 tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386