In this post I will describe the process of building Sugar using JHBuild. You can use Debain, Fedora or Ubuntu for this process. Fedora is suggested to avoid conflicts of you want to share your code with community.
- Make sure you don't follow the following process as root to avoid any unpredictable results that can affect your system.
- Make sure you have these installed in your system before starting the build process:
- python: The sugar-jhbuild command is a Python script, so you need the Python interpreter.
- git: To get the source code of sugar-jhbuild itself and many other Sugar packages you need the
git
command-line tool from the distributed version control system of the same name. In many distributions the minimal package you need to install is "git-core". - subversion: A few packages (as of January 2010, only squeak and part of etoys) do not use git, and you need the
svn
command-line tool from the Subversion version control system to get their source code.
There are basically two ways to do: one is to git clone the sugar base and build it( This will bring out latest code base from git) and other approach is to download the jhbuild zipped file, extract it and start building it.
First approach: git clone the sugar base and build it( This will bring out latest code base from git repository
The first approach gives issues most of the times. Let's dive in details and see what error it gives and what is the root cause for it ?
Check out sugar-JHBuild
Create a directory within your home directory:
So I will be checking out sugar-jhbuild within:/home/kartik/Sugar_Repository
Execute this command to checkout:
git clone git://git.sugarlabs.org/sugar-jhbuild/mainline.git sugar-jhbuild
You will such output if checkout is successful:
Update Sugar base system and dependencies
Change directory :
cd sugar-jhbuild
Now update the sugar base system by executing this command:
./sugar-jhbuild update
In case you get such error : "ERROR: Could not run lsb_release. Is it installed ?"
It means your systems does not have redhat-lsb package( for Fedora 14)( for Fedora 17 the missing package is redhat-lsb-core)
You can install this package executing yum command:
yum install redhat-lsb
This will install missing package:
Now rerun the update command:
This time it won't give any error and you see it will check 27 packages and update each of them is required.
After this check for any dependencies the sugar base system has by executing this command:
./sugar-jhbuild depscheck
It will list down list of packages the sugar base system is dependent on:
You can install these dependency packages by executing yum command( you need to use su command for this to go into root mode and then execute yum):
Once install is complete you can recheck if there is any dependency package left that is not yet installed. This time you get this message if all dependent packages are installed:
"All dependencies are installed"
Build Sugar
Now we can start building this by executing this command:
./sugar-jhbuild build
You will see the progress as :
this goes smooth till package 7. It throws error when building phase 8: telepathy-python:
Now even if we try to install librsvg package using yum, it will ask for gobject-introspection with version>=1.3.0:
checking for gobject-introspection... configure: error: You need to
have gobject-introspection >= 1.30.0 installed to build
sugar-toolkit-gtk3
you can try to resolve this by yum :
[root@fedora sugar-jhbuild]# yum install gobject-introspection-devel
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Install Process
Package gobject-introspection-devel-0.
[root@fedora sugar-jhbuild]# yum install gobject-introspection-devel
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Install Process
Package gobject-introspection-devel-0.
Nothing to do
But fedora 14 can have gobject-introspection with version 0.
9.3. which can't be updated.
So this is roadblock in this approach while building sugar using latest JHbuild
Second approach : Download the jhbuild zipped file, extract it and start building it.
Lets dig into another approach where you download the JHBuild version specific to Fedora 14 and then build sugar.
Download the JHBuild zipped file from http://people.sugarlabs.org/
anish/sugar-jhbuild-dx3-0.92.4dx3-20110725.tar.gz
Then extract the zipped file by executing this command:
tar -xvf sugar-jhbuild-dx3-0.92.4dx3-20110725.tar.gz
Get into JHBuild directory:
cd sugar-jhbuild-dx3/
Install all packages specified by result of this command( This list down packages on which sugar base is dependent):
./sugar-jhbuild depscheck
Install the packages:
sudo rm -r install/
Build the sugar base:
./sugar-jhbuild build -n -a --clean
Once the build process is complete, you can start the sugar emulator with latest sugar base which you just build:
./sugar-jhbuild run sugar-emulator
and there you go ...your sugar desktop environment is up and running!
Courtesy: Anish Mangal for the second approach :)
Happy Hacking !
No comments:
Post a Comment