I finally build it on OSX 10.6.6 successfully :-) >From the patches below I only used :
common/lines.c gtk/Makefile.am Then a ./configure --with-audio=gstreamer --without-python --with-coroutine=gthread did the trick, I think --with-coroutine=gthread avoid the _XOPEN_SOURCE patches. Best Kai On 4/27/11 10:47 AM, "Christophe Fergeau" <cferg...@redhat.com> wrote: >On Tue, Apr 26, 2011 at 08:39:13PM +0200, Attila Sukosd wrote: >> Also I've attached the patch which fixes a few things here and there... >>With >> this it builds fine. > >Ah, so you've already built spice-gtk on macosx? How well did it work? > >I had some questions about your patch, it would be really helpful if you >remembered why you had to change these things :) > >Thanks for the patch, > >Christophe > >diff --git a/common/lines.c b/common/lines.c >index 1a14c18..59d0689 100644 >--- a/common/lines.c >+++ b/common/lines.c >@@ -2985,7 +2985,7 @@ miWideDashSegment (GCPtr pGC, > double L, l; > double k; > PolyVertexRec vertices[4]; >- PolyVertexRec saveRight = { 0 }, saveBottom; >+ PolyVertexRec saveRight = { 0 }, saveBottom = { 0 }; > PolySlopeRec slopes[4]; > PolyEdgeRec left[2], right[2]; > LineFaceRec lcapFace, rcapFace; > >I assume this bit is to avoid a "saveBottom can be used without being >initialized" gcc warning? > > > >diff --git a/gtk/Makefile.am b/gtk/Makefile.am >index 7ce8a65..e5f3c1c 100644 >--- a/gtk/Makefile.am >+++ b/gtk/Makefile.am >@@ -27,6 +27,7 @@ if HAVE_LD_VERSION_SCRIPT > VERSION_LDFLAGS = -Wl,--version-script=${srcdir}/map-file > else > VERSION_LDFLAGS = -export-symbols ${srcdir}/sym-file >+#VERSION_LDFLAGS = > endif > > KEYMAP_GEN = $(srcdir)/keymap-gen.pl > > >macosx ld indeed doesn't have any of --version-script nor -export-symbols, >but it does have --exported_symbols_list which seems to be equivalent to >what we are trying to do here. This means m4/ld-version.m4 could be >improved to deal with this. > > >@@ -420,7 +421,6 @@ INTROSPECTION_GIRS = > INTROSPECTION_SCANNER_ARGS = --add-include-path=$(builddir) >$(PREFIX_ARGS) > INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) > >-if HAVE_INTROSPECTION > glib_introspection_files = $(libspice_client_glibinclude_HEADERS) > gtk_introspection_files = $(libspice_client_gtkinclude_HEADERS) > >@@ -453,7 +453,6 @@ typelibsdir = $(libdir)/girepository-1.0 > typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) > > CLEANFILES += $(gir_DATA) $(typelibs_DATA) >-endif > >I'm not sure why you needed this change. >My first guess was that this change is needed to prevent autoconf from >complaining that HAVE_INTROSPECTION is not present in an AM_CONDITIONAL >when gobject-introspection (and introspection.m4) are not installed. >However, this would mean that unconditionally building the introspection >stuff would fail, and moreover, when I tested just this change without >introspection, configure didn't succeed. Can you tell more about why this >change was needed? > > >diff --git a/gtk/continuation.c b/gtk/continuation.c >index 4f5b027..3aefa54 100644 >--- a/gtk/continuation.c >+++ b/gtk/continuation.c >@@ -21,7 +21,10 @@ > #include <config.h> > > #include "continuation.h" >- >+#ifdef __MACH__ >+#define _XOPEN_SOURCE >+#include <ucontext.h> >+#endif > >continuation.h already has the #include <ucontext.h>, including it again >shouldn't do much. Does something like >--- a/gtk/continuation.c >+++ b/gtk/continuation.c >@@ -21,7 +21,10 @@ > #include <config.h> > >+#define _XOPEN_SOURCE > #include "continuation.h" > >help with the issue you were having? > > >diff --git a/gtk/continuation.h b/gtk/continuation.h >index 585788e..6822757 100644 >--- a/gtk/continuation.h >+++ b/gtk/continuation.h >@@ -21,7 +21,8 @@ > #ifndef _CONTINUATION_H_ > #define _CONTINUATION_H_ > >-#include <ucontext.h> >+#include <string.h> >+#include <sys/ucontext.h> > >Ah, this explains the #include <ucontext.h> you added in the previous >hunk. >I suspect dropping both hunks and only adding the #define _XOPEN_SOURCE >here would fix your issues. Though nothing in ucontext.h nor in >sys/ucontext.h on a macosx box depends on _XOPEN_SOURCE, so I'm not sure >what issues you were seeing here? > > >diff --git a/gtk/coroutine_ucontext.c b/gtk/coroutine_ucontext.c >index 91059ad..ee48249 100644 >--- a/gtk/coroutine_ucontext.c >+++ b/gtk/coroutine_ucontext.c >@@ -25,6 +25,9 @@ > #include <stdio.h> > #include <stdlib.h> > #include "coroutine.h" >+#ifndef MAP_ANONYMOUS >+# define MAP_ANONYMOUS MAP_ANON >+#endif > >Yep, macosx has MAP_ANON but no MAP_ANONYMOUS > > >diff --git a/gtk/spice-client-gtk.override b/gtk/spice-client-gtk.override >index 7b3543a..e634f78 100644 >--- a/gtk/spice-client-gtk.override >+++ b/gtk/spice-client-gtk.override >@@ -1,6 +1,7 @@ > %% > headers > #include <Python.h> >+#define NO_IMPORT_PYGOBJECT > >This one seems to be here for the same kind of issues as what led to >https://gitorious.org/rb-lastfm/rb-lastfm/commit/ab102ef5a954eb87354c3467d >1a35c8fa596242b >but I must say I don't understand very well the issue/what's going on. Do >you happen to have the compile error handy (just for my knowledge). I'm >happy to take this one as is whatsoever. > >Thanks again for the patch, > >Christophe _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel