Difference between revisions of "Gtk OSX Using imendio script"

From GCompris
Jump to: navigation, search
(pysqlite2)
(jpeg)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Universal binaries ==
 +
* add <code>-arch ppc -arch i386</code> to CFLAGS and LDFLAGS.
 +
* '''does not work with standard autoconf/automake way.''' Needs to add <code>--disable-dependency-tracking</code> to configure flags.
 +
* all libs (gtk and others) needs to be universal too.
 +
* needs to redo a clean build.
 +
* add <code>-arch ppc -arch i386</code> to ${PREFIX}/bin/libtool in two places, after -dynamiclib.
 +
 +
=== libpng ===
 +
* error with nmedit for arch ppc.
 +
* suppress png_pass_width from libpng.sym
 +
 +
=== cairo ===
 +
* detection of float words endianess fails.
 +
* add <code>ax_cv_c_float_words_bigendian=no</code> into gtk-osx-build.sh at cairo options.
 +
 +
=== gettext ===
 +
* fails because intl shared lib is linked only with i386.
 +
* hack : edit libtool (3 in gettext) and add -arch ppc -arch i386 at dynamiclib creation
 +
 +
=== fontconfig ===
 +
* same hack as in gettext
 +
 +
=== freetype ===
 +
* copy ${PREFIX}/bin/libtool in buil/unix/libtool
 +
 +
=== jpeg ===
 +
* copy ${PREFIX}/bin/libtool in buil/unix/libtool
 +
* pass <code>CC=gcc -arch i386 -arch ppc</code> in the Makefile
 +
 
== Imendio port of Gtk on quartz ==
 
== Imendio port of Gtk on quartz ==
 
* [http://developer.imendio.com/projects/gtk-macosx Main page]
 
* [http://developer.imendio.com/projects/gtk-macosx Main page]
Line 13: Line 42:
 
export PYTHONPATH=$PREFIX/lib/python2.3/site-packages:$PREFIX/lib/python2.3/site-packages/gtk-2.0
 
export PYTHONPATH=$PREFIX/lib/python2.3/site-packages:$PREFIX/lib/python2.3/site-packages/gtk-2.0
 
</code>
 
</code>
 +
 +
''' all the --prefix below are related to this one '''
  
 
== Building Gtk ==
 
== Building Gtk ==
Line 41: Line 72:
 
If all the dependants libs (see below) are installed detected that should give you a working GCompris.
 
If all the dependants libs (see below) are installed detected that should give you a working GCompris.
  
== Others LIBS ==
+
== Others dependancies ==
 
We should make our own version of he script adding libart_lgpl, libgnomecanvas and pysqlite2.
 
We should make our own version of he script adding libart_lgpl, libgnomecanvas and pysqlite2.
  
Line 111: Line 142:
 
=== pysqlite2 ===
 
=== pysqlite2 ===
 
* Get the official source from: http://www.initd.org/tracker/pysqlite/wiki/pysqlite
 
* Get the official source from: http://www.initd.org/tracker/pysqlite/wiki/pysqlite
*Run <code>python setup.py install --prefix=/Users/yves/opt/gtk/</code>
+
* Run <code>python setup.py build </code>
 +
* Run <code>python setup.py install --prefix=/Users/yves/opt/gtk/</code>
 +
 
 +
=== gnuchess ===
 +
* get th official from http://ftp.gnu.org/pub/gnu/chess/
 +
* '''5.07 fails''' <code>./configure --without-readlines --prefix=/Users/yves/opt/gtk/</code> fails with input.c:95:
 +
<pre>
 +
error: static declaration of 'input_thread' follows non-static declaration
 +
common.h:719: error: previous declaration of 'input_thread' was here
 +
</pre>
 +
Solution is here: http://blog.gmane.org/gmane.comp.gnu.chess.bugs/month=20060401. Change line 95 in src/input.c
 +
<pre>
 +
-static pthread_t input_thread;
 +
+pthread_t input_thread;
 +
</pre>
 +
* then <code>make</code> and make install as usual.
 +
 
 +
=== gnucap ===
 +
* get it from http://www.geda.seul.org/dist/
 +
* <code>./configure --prefix=/Users/yves/opt/gtk/</code>
 +
* then <code>make</code> and make install as usual.

Latest revision as of 21:23, 13 March 2007

Universal binaries

  • add -arch ppc -arch i386 to CFLAGS and LDFLAGS.
  • does not work with standard autoconf/automake way. Needs to add --disable-dependency-tracking to configure flags.
  • all libs (gtk and others) needs to be universal too.
  • needs to redo a clean build.
  • add -arch ppc -arch i386 to ${PREFIX}/bin/libtool in two places, after -dynamiclib.

libpng

  • error with nmedit for arch ppc.
  • suppress png_pass_width from libpng.sym

cairo

  • detection of float words endianess fails.
  • add ax_cv_c_float_words_bigendian=no into gtk-osx-build.sh at cairo options.

gettext

  • fails because intl shared lib is linked only with i386.
  • hack : edit libtool (3 in gettext) and add -arch ppc -arch i386 at dynamiclib creation

fontconfig

  • same hack as in gettext

freetype

  • copy ${PREFIX}/bin/libtool in buil/unix/libtool

jpeg

  • copy ${PREFIX}/bin/libtool in buil/unix/libtool
  • pass CC=gcc -arch i386 -arch ppc in the Makefile

Imendio port of Gtk on quartz

warning: the name of the script is now gtk-osx-build and not gtk-osx-build.sh

Preparation

I have edited the script to set the prefix:

export PREFIX=${PREFIX-~/opt/gtk}

export PYTHONPATH=$PREFIX/lib/python2.3/site-packages:$PREFIX/lib/python2.3/site-packages/gtk-2.0

all the --prefix below are related to this one

Building Gtk

Nothing to comment.

./gtk-osx-build.sh bootstrapping

./gtk-osx-build.sh build

Building python modules

./gtk-osx-build.sh build python

  • error at first run (files exist at install). Clean at second run. strange.
  • pygobject and pygtk needs manuel suppress of docs subdir in Makefile.am. Known problem.

Building GCompris

Need to be inside the gtk-osx environnement . Run ./gtk-osx-build.sh shell.

The right compilation command looks like that:

GMSGFMT=/Users/yves/opt/gtk/bin/msgfmt PKG_CONFIG_PATH=/usr/lib/pkgconfig/ ./autogen.sh --disable-gtk-doc --enable-shared --prefix=/Users/yves/opt/gtk/

  • GMSGFMT is becuse there is a detection error. I don't know why.
  • PKG_CONFIG_PATH is to use OSX versions of libxml2 and sqlite3.

If all the dependants libs (see below) are installed detected that should give you a working GCompris.

Others dependancies

We should make our own version of he script adding libart_lgpl, libgnomecanvas and pysqlite2.

SDL and SDL_mixer

I have used officials OSX frameworks. The SDL_mixer one seems broken, it does not use #include <SDL/SDL.h> way to wall SDL header. I have modified it manually.

libart_lgpl

This lib is needed for libgnomecanvas.

  • get from svn:

svn co http://svn.gnome.org/svn/libart_lgpl/trunk libart_lgpl

  • configure:

./autogen.sh --disable-gtk-doc --enable-shared --prefix=/Users/yves/opt/gtk/

  • then make and make install as usual.

libglade

This lib is needed for libgnomecanvas.

  • get from svn:

svn co http://svn.gnome.org/svn/libglade/trunk libglade

  • configure (needs OSX libxml2):

PKG_CONFIG_PATH=/usr/lib/pkgconfig/ ./autogen.sh --disable-gtk-doc --enable-shared --prefix=/Users/yves/opt/gtk/

  • then make and make install as usual.

libgnomecanvas

  • get from svn:

svn co http://svn.gnome.org/svn/libgnomecanvas/trunk libgnomecanvas

  • configure (needs libxml2 because of libglade ?):

PKG_CONFIG_PATH=/usr/lib/pkgconfig/ ./autogen.sh --disable-gtk-doc --enable-shared --prefix=/Users/yves/opt/gtk/

  • then make and make install as usual.

sqlite3

is included, but without pkgconfig file, into MacOSX.

I have just added a file /usr/lib/pkgconfig/sqlite3.pc like that:

# Package Information for pkg-config

prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib
includedir=/usr/include

Name: SQLite
Description: SQL database engine
Version: 3.1.3
Libs: -L${libdir} -lsqlite3
Cflags: -I${includedir}

pysqlite2

gnuchess

error: static declaration of 'input_thread' follows non-static declaration
common.h:719: error: previous declaration of 'input_thread' was here

Solution is here: http://blog.gmane.org/gmane.comp.gnu.chess.bugs/month=20060401. Change line 95 in src/input.c

-static pthread_t input_thread;
+pthread_t input_thread;
  • then make and make install as usual.

gnucap