Discussion:
[Inkscape-devel] Inkscape native on OS X... almost
jiho
2007-08-31 15:10:48 UTC
Permalink
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.
jiho
2007-08-31 16:47:52 UTC
Permalink
hello again,

just replying to myself to add some information. The error below does
not seem to be related to Inkscape in any way. I've just reinstalled
mac ports from scratch, with native gtk, cairo and cairomm, and the
gtk demo gives the same error. The backtrace is similar and also
points to Pango. This would be logical since Pango does not seem to
have a native port currently: it still installs x11 headers and Xft.
So I can't expect it to work...
Now, on to see why the hell MacPorts would provide gtk and cairo
ports without the ability to use them since Pango is not native...
Post by jiho
(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
Object 0x14fef7a0 of class GdkQuartzWindow autoreleased with no
pool in place - just leaking
Object 0x14fee200 of class GdkQuartzWindow autoreleased with no
pool in place - just leaking
Object 0x14ffa730 of class GdkQuartzWindow autoreleased with no
pool in place - just leaking
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'
JiHO
---
http://jo.irisson.free.fr/
Bryce Harrington
2007-08-31 17:25:50 UTC
Permalink
Hi Jiho,

Could you add this info to the Inkscape OSX wiki page, so if others wish
to get involved with making an OSX port they have the latest info?
(I've had people contact me offlist about this, and I typically just
point them at the wiki.)

Thanks,
Bryce
Post by jiho
hello again,
just replying to myself to add some information. The error below does
not seem to be related to Inkscape in any way. I've just reinstalled
mac ports from scratch, with native gtk, cairo and cairomm, and the
gtk demo gives the same error. The backtrace is similar and also
points to Pango. This would be logical since Pango does not seem to
have a native port currently: it still installs x11 headers and Xft.
So I can't expect it to work...
Now, on to see why the hell MacPorts would provide gtk and cairo
ports without the ability to use them since Pango is not native...
Post by jiho
(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
Object 0x14fef7a0 of class GdkQuartzWindow autoreleased with no
pool in place - just leaking
Object 0x14fee200 of class GdkQuartzWindow autoreleased with no
pool in place - just leaking
Object 0x14ffa730 of class GdkQuartzWindow autoreleased with no
pool in place - just leaking
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'
JiHO
---
http://jo.irisson.free.fr/
jiho
2007-08-31 17:47:32 UTC
Permalink
Post by Bryce Harrington
Could you add this info to the Inkscape OSX wiki page, so if others wish
to get involved with making an OSX port they have the latest info?
(I've had people contact me offlist about this, and I typically just
point them at the wiki.)
Yes no problem, this is planned. But right now I am all excited since
I got the gtk-demo to run after tweaking pango. Woohoo! So now I just
need to compile all other inkscape dependencies, recompile
inkscape... and we'll see. I'll report my success or failure shortly.

JiHO
---
http://jo.irisson.free.fr/
Tobias Jakobs
2007-08-31 18:37:55 UTC
Permalink
Post by jiho
Post by Bryce Harrington
Could you add this info to the Inkscape OSX wiki page, so if others wish
to get involved with making an OSX port they have the latest info?
(I've had people contact me offlist about this, and I typically just
point them at the wiki.)
Yes no problem, this is planned. But right now I am all excited since
I got the gtk-demo to run after tweaking pango. Woohoo! So now I just
need to compile all other inkscape dependencies, recompile
inkscape... and we'll see. I'll report my success or failure shortly.
I looks like gtk now supports Mac OS X Menubars:
http://gimpfoo.de/2007/08/30/using-the-mac-os-x-menubar/

And a bigger screenshot:
http://tirania.org/blog/archive/2007/Aug-30-2.html

Regards,
Tobias
jiho
2007-09-11 08:20:11 UTC
Permalink
Hello all
Post by jiho
Post by Bryce Harrington
Could you add this info to the Inkscape OSX wiki page, so if
others wish
to get involved with making an OSX port they have the latest info?
(I've had people contact me offlist about this, and I typically just
point them at the wiki.)
Yes no problem, this is planned. But right now I am all excited
since I got the gtk-demo to run after tweaking pango. Woohoo! So
now I just need to compile all other inkscape dependencies,
recompile inkscape... and we'll see. I'll report my success or
failure shortly.
It seems that "shortly" took me a little while in fact... So, I got
Inkscape to compile and run almost fine using the native GTK version
in MacPorts quite easily. I did a screencast (this is what took most
of the time ;) ) and you can find it here:
http://jo.irisson.free.fr/?p=34
The remaining problems:
- a very annoying screen flicker (it is conspicuous in the video) but
I think it is fixed in the latest version of GTK (remember this is
using MacPorts version so these are already quite "old")
- crashes when opening various dialogs (I will not report it for now,
since it is with an old version)
So I'll try to integrate development versions into MacPorts (MacPorts
can fetch svn code easily, and treat this as a regular port) and
we'll see. But that won't be before a while.

Cheers,

JiHO
---
http://jo.irisson.free.fr/
Ted Gould
2007-09-12 02:44:14 UTC
Permalink
Post by jiho
It seems that "shortly" took me a little while in fact... So, I got
Inkscape to compile and run almost fine using the native GTK version
in MacPorts quite easily.
This is very cool. I noticed that the flicker had a bug in bugzilla
with some recommendations on what to try. I can't seem to find it now
though.

Do you think there's a reasonable chance that we could get a OSX native
build for 0.46? Is it possible to get the GTK+ OSX folks aligned with
this goal?

--Ted
jiho
2007-09-12 06:45:32 UTC
Permalink
Post by Ted Gould
Post by jiho
It seems that "shortly" took me a little while in fact... So, I got
Inkscape to compile and run almost fine using the native GTK version
in MacPorts quite easily.
This is very cool. I noticed that the flicker had a bug in bugzilla
with some recommendations on what to try. I can't seem to find it now
though.
I think it has been fixed and so probably closed.
Post by Ted Gould
Do you think there's a reasonable chance that we could get a OSX native
build for 0.46? Is it possible to get the GTK+ OSX folks aligned with
this goal?
It would be a very interesting goal and reaching it will probably
depend on when 0.46 is cut obviously ;) However, if the native
application is to be considered as a stable release, as the rest of
0.46 packages, it must be tested beforehand so there must be some
native dev builds happening soon.

Other than the flicker, the menus are not very responsive (but maybe
the two are related since when the drawing area flickers, it reduces
the interactivity of everything) and there are still a lot of
crashes, most of them when opening dialogs. It seems that only
dockable dialogs make Inkscape crash (Text and font, XML editor,
object properties all open fine and they are not docked while Fill
and stroke, Document properties, Align and distribute, all crash
Inkscape).
However, I would need to try the latest version of GTK before
reporting anything and I would really like to do it in the comfort of
MacPorts rather than re-building a complete dependency tree for
Inkscape by hand (not that it would be that inconvenient for me but
rather because it would be the method we'll finally adopt and it
would be nice to get it working from the start).
Another very nice thing to have would be integration with Mac OS X
menu bar. Indeed this single change would make a very large
difference in how much "mac-like" Inkscape feels. It seems to be very
easy:
http://developer.imendio.com/projects/gtk-macosx/menubar
But this is in C and would need to be done in C++ to be usable by
Inkscape. I have no idea of how complicated it would be to translate
this C code in C++ (it is a single, not too long file). Any volunteers?
Eventually, the last bit would be to recreate our application bundle
(the "package" in which we put all Inkscape stuff) without using X11
but I don't think this would be too difficult and I'll be glad to do
it once the rest is done.

Any help would be warmly appreciated for all this of course ;)

Cheers,

JiHO
---
http://jo.irisson.free.fr/
Derek Hinchliffe
2007-09-12 08:15:33 UTC
Permalink
Post by jiho
Post by Ted Gould
Post by jiho
It seems that "shortly" took me a little while in fact... So, I got
Inkscape to compile and run almost fine using the native GTK version
in MacPorts quite easily.
This is very cool. I noticed that the flicker had a bug in bugzilla
with some recommendations on what to try. I can't seem to find it now
though.
I think it has been fixed and so probably closed.
This bug covers it and is still open:
http://bugzilla.gnome.org/show_bug.cgi?id=467269

It is still UNCONFIRMED but the comments are encouraging as it is
actively being looked at by several testers and a developer, and
comments in the last couple of days suggest a fix has been found and
is being tested, that makes Inkscape a lot more usable.

This bug was always one that stopped me (and I'd say many others) from
doing any further real testing of Inkscape, and my quick efforts at
tracking it down always went nowhere. I think once it is fixed there
are likely to be a lot more problems uncovered now that it is actually
semi-usable, but it is definitely a big step forwards.

My gut feeling is that the best we could hope for a .46 release is
having an 'experimental' quartz release alongside the stable X11
release, mainly to spark people's interest.

Cheers
Derek
jiho
2007-09-12 08:25:26 UTC
Permalink
Post by Derek Hinchliffe
Post by jiho
Post by Ted Gould
Post by jiho
It seems that "shortly" took me a little while in fact... So, I got
Inkscape to compile and run almost fine using the native GTK version
in MacPorts quite easily.
This is very cool. I noticed that the flicker had a bug in bugzilla
with some recommendations on what to try. I can't seem to find it now
though.
I think it has been fixed and so probably closed.
http://bugzilla.gnome.org/show_bug.cgi?id=467269
It is still UNCONFIRMED but the comments are encouraging as it is
actively being looked at by several testers and a developer, and
comments in the last couple of days suggest a fix has been found and
is being tested, that makes Inkscape a lot more usable.
This bug was always one that stopped me (and I'd say many others) from
doing any further real testing of Inkscape, and my quick efforts at
tracking it down always went nowhere. I think once it is fixed there
are likely to be a lot more problems uncovered now that it is actually
semi-usable, but it is definitely a big step forwards.
great!
Post by Derek Hinchliffe
My gut feeling is that the best we could hope for a .46 release is
having an 'experimental' quartz release alongside the stable X11
release, mainly to spark people's interest.
I agree with that, this is probably the most reasonable choice.

On a more personal note: did you have the opportunity to compare the
version compiled against MacPorts and your personal tests (I believe
you used Michael's build script which pulls more recent versions of
GTK and Cairo)? How far behind do you think MacPorts lags?

Cheers,

JiHO
---
http://jo.irisson.free.fr/
MenTaLguY
2007-09-12 18:20:36 UTC
Permalink
Post by jiho
http://developer.imendio.com/projects/gtk-macosx/menubar
But this is in C and would need to be done in C++ to be usable by
Inkscape. I have no idea of how complicated it would be to translate
this C code in C++ (it is a single, not too long file).
It may not require translation -- most (though not all) valid C
programs are trivially valid C++.

-mental

Continue reading on narkive:
Loading...