Sugar on Ubuntu: Difference between revisions

From OLPC
Jump to navigation Jump to search
(layout)
Line 1: Line 1:
The easiest way to install [[Sugar]] on Ubuntu is to use [[Sugar with sugar-jhbuild|Sugar-jhbuild]]. The instructions on this page are for [[Ubuntu]] 6.10 "Edgy Eft" on x86 (building seems to be currently broken on x86_64).
==Installation==


== apt-get the prerequisites ==
The easiest way to install [[Sugar]] on Ubuntu is to use Sugar-jhbuild. The instructions on this page are for Ubuntu 6.10 "Edgy Eft" on x86 (building seems to be currently broken on x86_64).

=== apt-get the prerequisites ===


You need a number of packages from the Ubuntu repositories. Some of these packages are not available for the stock Ubuntu install, and you may need to enable the ''universe'' and ''multiverse'' repositories.
You need a number of packages from the Ubuntu repositories. Some of these packages are not available for the stock Ubuntu install, and you may need to enable the ''universe'' and ''multiverse'' repositories.
Line 19: Line 17:


Even with the universe and multiverse enabled you can have some problems installing these packages.
Even with the universe and multiverse enabled you can have some problems installing these packages.
You can fix them using the sources.list generator that you can find on [[http://www.ubuntu-nl.org/source-o-matic/ www.ubuntu-nl.org]].
You can fix them using the sources.list generator that you can find on [http://www.ubuntu-nl.org/source-o-matic/ www.ubuntu-nl.org].


There may be more packages required; if you find any more, please append them to this list.
There may be more packages required; if you find any more, please append them to this list.
Line 36: Line 34:
<pre>sudo /etc/init.d/avahi-daemon start</pre>
<pre>sudo /etc/init.d/avahi-daemon start</pre>


=== Using Sugar-jhbuild ===
== Using Sugar-jhbuild ==


Use of Sugar-jhbuild is detailed on [[Sugar#Build_from_sources|building Sugar from sources]]. To summarize those instructions:
Use of Sugar-jhbuild is detailed on [[Sugar#Build_from_sources|building Sugar from sources]]. To summarize those instructions:
Line 49: Line 47:
git pull
git pull


=== Troubleshooting ===
== Troubleshooting ==


==== automake version mismatch ====
=== automake version mismatch ===


During the building task you may get the following error:
During the building task you may get the following error:
Line 71: Line 69:


Here you should press the button 3 and the try again to build sugar.
Here you should press the button 3 and the try again to build sugar.

==== Mozilla Build Error ====
=== Mozilla Build Error ===


You may get stuck at a Mozilla build error - I did on Edgy AMD64. Two ways to resolve the problem, either:
You may get stuck at a Mozilla build error - I did on Edgy AMD64. Two ways to resolve the problem, either:
Line 77: Line 76:
which may not work, or copy the Mozilla or Firefox .pc files in /usr/lib/pkgconfig to xulrunner-*.pc files (You may only need to create xulrunner-gtkmozembed.pc and not the rest...). Either way, then, build with ./sugar-jhbuild build -s mozilla to skip building Mozilla from source. I have not yet completed a full Sugar build, though, so these instructions may just be masking a problem. --RP
which may not work, or copy the Mozilla or Firefox .pc files in /usr/lib/pkgconfig to xulrunner-*.pc files (You may only need to create xulrunner-gtkmozembed.pc and not the rest...). Either way, then, build with ./sugar-jhbuild build -s mozilla to skip building Mozilla from source. I have not yet completed a full Sugar build, though, so these instructions may just be masking a problem. --RP


==== Building libabiword ====
=== Building libabiword ===


If you get an error like
If you get an error like
Line 97: Line 96:
just choose the "configure" option. This error shows up (probably) because AbiWord has a regular Makefile setup for building on Windows in addition to AutoConf stuff for nearly every other platform, so it is just "faking out" jhbuild in all likelyhood.
just choose the "configure" option. This error shows up (probably) because AbiWord has a regular Makefile setup for building on Windows in addition to AutoConf stuff for nearly every other platform, so it is just "faking out" jhbuild in all likelyhood.


==== git, the SCM ====
=== git, the SCM ===


On Ubuntu 6.06 Dapper Drake, git has been deprecated. You have to run the following command to get git to work properly.
On Ubuntu 6.06 Dapper Drake, git has been deprecated. You have to run the following command to get git to work properly.
Line 104: Line 103:
Select option #2: git-scm
Select option #2: git-scm


==== network manager error ====
=== network manager error ===


If, after running <tt> ./sugar-jhbuild run</tt> you get the following error:
If, after running <tt> ./sugar-jhbuild run</tt> you get the following error:
Line 112: Line 111:
you have two solutions
you have two solutions


===== Method 1 : Install NetworkManager=====
==== Method 1 : Install NetworkManager====


You want to ensure that the NetworkManager is
You want to ensure that the NetworkManager is
Line 124: Line 123:
sudo /etc/init.d/dbus restart
sudo /etc/init.d/dbus restart


===== Method 2 : Only provide .conf file =====
==== Method 2 : Only provide .conf file ====


Copy the [http://cvs.gnome.org/viewcvs/*checkout*/NetworkManager/gnome/applet/nm-applet.conf?rev=1.2 configuration file] to <tt>/etc/dbus-1/system.d</tt> .
Copy the [http://cvs.gnome.org/viewcvs/*checkout*/NetworkManager/gnome/applet/nm-applet.conf?rev=1.2 configuration file] to <tt>/etc/dbus-1/system.d</tt> .
Restart the dbus as above.
Restart the dbus as above.


=== Testing sugar ===
== Testing sugar ==


When using [[Sugar_with_sugar-jhbuild|sugar-jhbuild]], you can use:
When using [[Sugar_with_sugar-jhbuild|sugar-jhbuild]], you can use:

Revision as of 16:49, 4 February 2007

The easiest way to install Sugar on Ubuntu is to use Sugar-jhbuild. The instructions on this page are for Ubuntu 6.10 "Edgy Eft" on x86 (building seems to be currently broken on x86_64).

apt-get the prerequisites

You need a number of packages from the Ubuntu repositories. Some of these packages are not available for the stock Ubuntu install, and you may need to enable the universe and multiverse repositories.

 sudo apt-get install build-essential cvs docbook-utils subversion libgtk2.0-dev libidl-dev \
   gnome-common gtk-doc-tools libxt-dev automake1.7 automake1.8 automake1.9 python-gtk2-dev \
   python-avahi git-core cogito python-dev avahi-utils \
   libgconf2-dev xserver-xephyr libgnome2-dev mozilla-dev libmatchbox-dev python-cairo-dev \
   libtiff4-dev python-gnome2-dev libxdamage-dev libxdamage1 libxcomposite-dev \
   libgnomeui-dev libtool libfribidi-dev libgsf-1-dev libbz2-dev libwmf-dev \
   libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgnomeprintui2.2-dev \
   libenchant-dev

Even with the universe and multiverse enabled you can have some problems installing these packages. You can fix them using the sources.list generator that you can find on www.ubuntu-nl.org.

There may be more packages required; if you find any more, please append them to this list.

Note:I needed to install libgnomeui-dev version 2.16.1, libgnomeuimm-2.6-1c2a, and 
libgnomeuimm-2.6-dev. I no longer get the error "package libgnomeui-2.0 cannot be found" 
however I still encounter other errors [chundevi]


Then you must ensure that the Avahi daemon is enabled and running. Execute:

sudo vim /etc/default/avahi-daemon

and ensure the directive "AVAHI_DAEMON_START" is set to 1. Then execute:

sudo /etc/init.d/avahi-daemon start

Using Sugar-jhbuild

Use of Sugar-jhbuild is detailed on building Sugar from sources. To summarize those instructions:

git-clone git://dev.laptop.org/sugar-jhbuild
cd sugar-jhbuild
./sugar-jhbuild

If you had already checked out sugar-jhbuild previously, make sure your copy is up-to-date before building:

cd sugar-jhbuild
git pull

Troubleshooting

automake version mismatch

During the building task you may get the following error:

error during stage configure of matchbox-window-manager:....[9/12]

This error happens because Ubuntu uses the automake 1.4 version in contrast with matchbox-window-manager which uses the automake 1.9 version. In order to bypass this error you can execute the following command:

sudo update-alternatives --config automake

You will get the following list with the asterisk being at the 1 selection

There are 3 alternatives which provide `automake'.
  Selection    Alternative
 +    1        /usr/bin/automake-1.4
      2        /usr/bin/automake-1.7
 *    3        /usr/bin/automake-1.9
Press enter to keep the default[*], or type selection number:

Here you should press the button 3 and the try again to build sugar.

Mozilla Build Error

You may get stuck at a Mozilla build error - I did on Edgy AMD64. Two ways to resolve the problem, either:

 sudo aptitude install libxul-dev

which may not work, or copy the Mozilla or Firefox .pc files in /usr/lib/pkgconfig to xulrunner-*.pc files (You may only need to create xulrunner-gtkmozembed.pc and not the rest...). Either way, then, build with ./sugar-jhbuild build -s mozilla to skip building Mozilla from source. I have not yet completed a full Sugar build, though, so these instructions may just be masking a problem. --RP

Building libabiword

If you get an error like

 *** Building libabiword *** [24/35]

<...>

    I can't seem to figure out which platform you are using.

    You should probably try using the autoconfiscated build system (rather
    than this, the deprecated and unsupported diving make system) by running
    configure (creating it with autogen.sh if need be) and using GNU Make.
    Using configure is a requirement for all known platforms that aren't some form
    of Windows, QNX Neutrino, or MacOS X.

just choose the "configure" option. This error shows up (probably) because AbiWord has a regular Makefile setup for building on Windows in addition to AutoConf stuff for nearly every other platform, so it is just "faking out" jhbuild in all likelyhood.

git, the SCM

On Ubuntu 6.06 Dapper Drake, git has been deprecated. You have to run the following command to get git to work properly.

sudo update-alternatives --config git
Select option #2: git-scm

network manager error

If, after running ./sugar-jhbuild run you get the following error:

DBusException: Connection ":1.12" is not allowed to own
the service "org.freedesktop.NetworkManagerInfo" due to
security policies in the configuration file

you have two solutions

Method 1 : Install NetworkManager

You want to ensure that the NetworkManager is

  • installed
sudo apt-get install network-manager
  • reachable by console applications, in file /etc/dbus-1/system.d/NetworkManager.conf add
<allow own="org.freedesktop.NetworkManagerInfo"/>

after

<policy at_console="true">
  • started, by restarting the whole dbus
sudo /etc/init.d/dbus restart

Method 2 : Only provide .conf file

Copy the configuration file to /etc/dbus-1/system.d . Restart the dbus as above.

Testing sugar

When using sugar-jhbuild, you can use:

./sugar-jhbuild run

If you want to run Sugar from the source tree enter in a jhbuild shell:

./sugar-jhbuild shell 

Then from the directory sugar-jhbuild/source/sugar), use:

shell/sugar