Talk:Sugar on MacOS X

From OLPC
Revision as of 08:40, 24 January 2008 by Nobody (talk | contribs) (→‎sugar-jhbuild: (i need to preview before submitting, sorry))
Jump to navigation Jump to search

Could the person who flagged this as inaccurate (or anyone else who knows details) please add some information here as to *what* might be inaccurate?

jtauber: I wasn't the one who flagged it but one thing I'd note is that this only describes how to get pygtk working. Sugar has lots of other dependencies which aren't even mentioned on this page. I've successfully built pygtk but that's just the first step of getting Sugar up and running. I still have a long way to go.

errors about "import (module)"

you need to add "import pygtk; pygtk.require('2.0')" before "import gtk", "import gobject" or any module depending on pygtk at all if you want it to work, at least in my experience

also, you might want to make sure all the modules you're building have no undefined symbols (usually adding -no-undefined -Wl,-bundle_loader,/usr/bin/python takes care of any loose ends)

and you need to add #define NO_IMPORT_PYGOBJECT in sugar/lib/sugar/_sugarext.override to prevent having PyGObject multiply defined when linking _sugarext.so

Nobody 02:59, 24 January 2008 (EST)

sugar-jhbuild

sugar-jhbuild is nice, but it assumes some things, you might want to download it and then replace certain things in sanitycheck.py to get to working on your system, although you're likely to not get it working 100%, it will give you a more accurate list of what you've got missing currently

diff --git a/sanitycheck.py b/sanitycheck.py
index bc5e15f..812a952 100644
--- a/sanitycheck.py
+++ b/sanitycheck.py
@@ -90,7 +90,7 @@ class DependencyChecker:
             self._append_missing_command(command, desc)
 
     def check_python_import(self, name):
-        p = subprocess.Popen(['python', '-c', 'import ' + name], stderr=subprocess.PIPE)
+        p = subprocess.Popen(['python', '-c', 'import pygtk; pygtk.require(\'2.0\'); import ' + name], stderr=subprocess.PIPE)
         if 'ImportError' in p.communicate()[1]:
             self._missing.append(name + ' (python module)')
 
@@ -107,7 +107,7 @@ class DependencyChecker:
             self._missing.append('automake %s' % version)
 
     def check_libtool(self, version):
-        if not _check_command(['libtoolize', '--version'],
+        if not _check_command(['glibtoolize', '--version'],
                               r'libtoolize \([^)]*\) ([\d.]+)', version):
             self._missing.append('libtool %s' % version)
 
@@ -210,8 +210,8 @@ class cmd_sanitycheck(Command):
         checker.check_package('gstreamer-plugins-base-0.10')
         checker.check_package('poppler')
         checker.check_package('poppler-glib')
-        checker.check_library('libXRes.so')
-        checker.check_library('libXmu.so.6')
 
         # GNOME 2.18
 

adding import for pygtk as a catchall for leaf dependancies

renaming libtoolize command to find gnu's libtoolize that lives on macosx

removing libXRes.so and libXmu.so.6 because they do not exist and will never exist on macosx and apparently the method to check for libraries requires loading them and dylibs don't meet that criteria as libraries

Nobody 03:40, 24 January 2008 (EST)