Re: [cairo] Issues with Pango on OSX




On Jul 8, 2010, at 8:38 AM, Travis Griggs wrote:

I have managed to get an independent build (i.e. not tied to using a MacPorts one) of both Cairo and Pango on OSX. I used the instructions located at:

http://cairographics.org/end_to_end_build_for_mac_os_x/

for Cairo, and basically the same approach for Pango. The library seems to kind of work. I can do things like allocate new Layouts, set parameters on them. But any time I try to query anything or get it to show_layout(), I get a SIGBUS error. I *think* (and I haven't tested this yet), that part of the problem may be the application of the final step in that page, to the Pango libraries. That's the part where we make the various library dependency paths all relative to the @executable_path, and then I move them out of their "installed" location.

The reason I think that, is that when I first starting making calls into it from my program, I start seeing lots of errors on stderr of the nature:

(process:82410): GLib-GObject-CRITICAL **: gtype.c:2711: You forgot to call g_type_init() (process:82410): GLib-GObject-WARNING **: invalid cast from `PangoModule' to `<invalid>' (process:82410): GLib-GObject-CRITICAL **: gtype.c:2766: You forgot to call g_type_init() (process:82410): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:82410): Pango-WARNING **: Failed to load Pango module '/ Users/travis/CairoPixmanBuild/lib/pango/1.6.0/modules/pango-basic- atsui.so' for id 'BasicScriptEngineATSUI' (process:82410): GLib-GObject-WARNING **: cannot register existing type `PangoEngine' (process:82410): GLib-GObject-CRITICAL **: g_type_register_static: assertion `parent_type > 0' failed (process:82410): GLib-GObject-CRITICAL **: gtype.c:2711: You forgot to call g_type_init() (process:82410): GLib-GObject-WARNING **: invalid cast from `PangoModule' to `<invalid>' (process:82410): GLib-GObject-CRITICAL **: gtype.c:2766: You forgot to call g_type_init() (process:82410): GLib-GObject-WARNING **: plugin '(unknown)' failed to register type '(null)'

None of that looks very good at all. In particular 5th one down, the one where it can't load the atsui module. The file is indeed at that location. Any idea what gives here? I do not build cairo with xlib or ft/fc, and when Pango runs it's configure, it says the only backend it is building is pangocairo.

Thanks for any help you can give on why I'm seeing these errors.

I have verified that using the libraries that I compiled into my $ {prefix}/lib without any install_name_tool changes, work. So something about adjusting to the use of @executable_path and moving the libraries, and dl_open()'ing those, causes the errors above. But I really really really want to be able to make the libraries relative to the executable. We don't control where people install our program, they can put it anywhere, but we can make sure that we place the libraries an a fixed placed relative to that. This works fine for Cairo, but seems to be causing problems for Pango. I'm no expert in how Pango works, or the arts of OSX library resolution, so any help or hints, much appreciated.

TIA

--
Travis Griggs
tgriggs cincom com
"The dissenter is every human being at those moments of his life when he resigns momentarily from the herd and thinks for himself." - Archibald MacLeish, poet and librarian





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]