jiho
2007-08-31 15:10:48 UTC
hello all,
Motivated by all the good things I saw about gtk on os x these days
and repulsed by all the statistics I should be doing for my real life
work, I gave a try at compiling inkscape with GTK native using
MacPorts (so not using the all in one build script that Michael cook
up a little while ago).
MacPorts is the OS X equivalent of apt-get, portage, yum or whatever.
We use it to provide Inkscape dependencies currently and it is very
convenient to compile Inkscape that way. It is both easy (all second
level dependencies are managed by macports) and economic (the
libraries I compile for inkscape can be used in other projects). I
wanted to keep this ease of use and to leverage the work of others,
so I wanted to keep using MacPorts.
The steps:
1- MacPorts includes native versions of gtk and cairo, which can be
installed with:
port install cairo +quartz gtk2 +quartz
(gentoo and bsd users will recognize the "variants" switches added to
both packages). there is a small bug in gtk which is known and solved
by the patches in this ticket, at MacPorts:
http://trac.macports.org/projects/macports/ticket/12566
hopefully they will commit this soon... but the bug report is quite
old already.
2- Other libraries compiled against gtk or cairo need to be
recompiled to use these new variants. namely:
port -f uninstall cairomm gtkmm pango
port install cairomm gtkmm pango
this could possibly be solved by a clever use of upgrade when
compiling gtk2 and cairo but I did not bother (I should have though...)
3- then compile inkscape from fresh
make distsclean
cd packaging/macosx/
change the compilation options to remove "--enable-osx-app" for now
and then update, configure, build and install:
./osx-build-sh u a c b i
compilation goes smoothly for latest svn... great great great!!! Now,
on for the hard part:
4- run inkscape
cd ../../Build/bin/
./inkscape
and here:
(inkscape:20759): Pango-WARNING **: Error loading GDEF table 85
(inkscape:20759): Pango-WARNING **: Error loading GPOS table 85
(inkscape:20759): Pango-WARNING **: Error loading GSUB table 85
(inkscape:20759): Pango-WARNING **: Error loading GDEF table 85
(inkscape:20759): Pango-WARNING **: Error loading GPOS table 85
(inkscape:20759): Pango-WARNING **: Error loading GSUB table 85
(inkscape:20759): Pango-WARNING **: Error loading GDEF table 85
(inkscape:20759): Pango-WARNING **: Error loading GPOS table 85
(inkscape:20759): Pango-WARNING **: Error loading GSUB table 85
(inkscape:20759): Gdk-WARNING **: Unsupported cursor type 14, using
default
2007-08-31 16:18:34.382 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14fef7a0 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
2007-08-31 16:18:34.382 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14fee200 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
2007-08-31 16:18:34.386 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14ffa730 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
2007-08-31 16:18:34.390 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14fb9830 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
(inkscape:20759): Gdk-WARNING **: Unsupported cursor type 14, using
default
CGBitmapContextGetBitsPerPixel: invalid context
cairo.c:91: failed assertion `status > CAIRO_STATUS_SUCCESS && status
<= CAIRO_STATUS_LAST_STATUS'
Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we
can fix it.
(inkscape:20759): GLib-WARNING **: g_main_loop_run(): called
recursively from within a source's check() or prepare() member,
iteration not possible.
Aaaargh.
Anyway, the good points are that it is now quite easy to get GTK
native in our regular building system and that Inkscape builds and
links fine against it!
Now, about the crash, it may well be that my system is still kind of
dirty (I have some native things but the rest of the libraries are
the old ones) but I think it is more likely a bug in cairo +quartz.
I'll be happy to try to track it down and see if it is fixable in
Inkscape or if this needs to be solved ahead.
Motivated by all the good things I saw about gtk on os x these days
and repulsed by all the statistics I should be doing for my real life
work, I gave a try at compiling inkscape with GTK native using
MacPorts (so not using the all in one build script that Michael cook
up a little while ago).
MacPorts is the OS X equivalent of apt-get, portage, yum or whatever.
We use it to provide Inkscape dependencies currently and it is very
convenient to compile Inkscape that way. It is both easy (all second
level dependencies are managed by macports) and economic (the
libraries I compile for inkscape can be used in other projects). I
wanted to keep this ease of use and to leverage the work of others,
so I wanted to keep using MacPorts.
The steps:
1- MacPorts includes native versions of gtk and cairo, which can be
installed with:
port install cairo +quartz gtk2 +quartz
(gentoo and bsd users will recognize the "variants" switches added to
both packages). there is a small bug in gtk which is known and solved
by the patches in this ticket, at MacPorts:
http://trac.macports.org/projects/macports/ticket/12566
hopefully they will commit this soon... but the bug report is quite
old already.
2- Other libraries compiled against gtk or cairo need to be
recompiled to use these new variants. namely:
port -f uninstall cairomm gtkmm pango
port install cairomm gtkmm pango
this could possibly be solved by a clever use of upgrade when
compiling gtk2 and cairo but I did not bother (I should have though...)
3- then compile inkscape from fresh
make distsclean
cd packaging/macosx/
change the compilation options to remove "--enable-osx-app" for now
and then update, configure, build and install:
./osx-build-sh u a c b i
compilation goes smoothly for latest svn... great great great!!! Now,
on for the hard part:
4- run inkscape
cd ../../Build/bin/
./inkscape
and here:
(inkscape:20759): Pango-WARNING **: Error loading GDEF table 85
(inkscape:20759): Pango-WARNING **: Error loading GPOS table 85
(inkscape:20759): Pango-WARNING **: Error loading GSUB table 85
(inkscape:20759): Pango-WARNING **: Error loading GDEF table 85
(inkscape:20759): Pango-WARNING **: Error loading GPOS table 85
(inkscape:20759): Pango-WARNING **: Error loading GSUB table 85
(inkscape:20759): Pango-WARNING **: Error loading GDEF table 85
(inkscape:20759): Pango-WARNING **: Error loading GPOS table 85
(inkscape:20759): Pango-WARNING **: Error loading GSUB table 85
(inkscape:20759): Gdk-WARNING **: Unsupported cursor type 14, using
default
2007-08-31 16:18:34.382 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14fef7a0 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
2007-08-31 16:18:34.382 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14fee200 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
2007-08-31 16:18:34.386 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14ffa730 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
2007-08-31 16:18:34.390 inkscape[20759] *** _NSAutoreleaseNoPool():
Object 0x14fb9830 of class GdkQuartzWindow autoreleased with no pool
in place - just leaking
(inkscape:20759): Gdk-WARNING **: Unsupported cursor type 14, using
default
CGBitmapContextGetBitsPerPixel: invalid context
cairo.c:91: failed assertion `status > CAIRO_STATUS_SUCCESS && status
<= CAIRO_STATUS_LAST_STATUS'
Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we
can fix it.
(inkscape:20759): GLib-WARNING **: g_main_loop_run(): called
recursively from within a source's check() or prepare() member,
iteration not possible.
Aaaargh.
Anyway, the good points are that it is now quite easy to get GTK
native in our regular building system and that Inkscape builds and
links fine against it!
Now, about the crash, it may well be that my system is still kind of
dirty (I have some native things but the rest of the libraries are
the old ones) but I think it is more likely a bug in cairo +quartz.
I'll be happy to try to track it down and see if it is fixable in
Inkscape or if this needs to be solved ahead.