Questions about building Pango statically & dynamically


I've been searching around Google and have found nothing to answer my questions, so I'm asking here.

I'm trying to build an LGPL'd framework for Mac OS X, and I want to statically link Pango and the ATSUI module into the framework so I don't have to distribute them separately. I'm using Pango 1.21.4 and Glib 2.17.6, and I'm compiling Pango against the Cairo back-end (not X). And I'm running into a few problems:

1. If I build Pango without shared libraries, then the build succeeds, but the pango.modules file is almost empty. OK, so I understand I can statically link the ATSUI module into the framework with the Pango static library and work around this, but how do I do that?

2. Searching around for answers to question #1, I came across the pango_module_register() function, which apparently manually registers modules if statically linked. But when I define PANGO_ENABLE_BACKEND and include pango-modules.h, I get the following build errors:

/usr/local/include/pango-1.0/pango/pango-modules.h:38: error: expected ')' before '*' token /usr/local/include/pango-1.0/pango/pango-modules.h:40: error: expected ';' before 'void' /usr/local/include/pango-1.0/pango/pango-modules.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

I must be leaving out something, but what? I'm using GCC 4.2 and I'm building with the GNU99 dialect. I tried switching dialects to C99, and building with GCC 4.0, and there was no improvement in either case.

3. And finally, I can't get Pango to build at all as a dynamic library. When I try, the console gets flooded with messages like these:

(process:11109): GLib-GObject-CRITICAL **: gtype.c:2458: initialization assertion failed, use g_type_init() prior to this function

(pango-querymodules:11109): GLib-GObject-WARNING **: cannot retrieve class for invalid (unclassed) type `<invalid>'

(pango-querymodules:11109): GLib-GObject-CRITICAL **: g_enum_get_value: assertion `G_IS_ENUM_CLASS (enum_class)' failed

(pango-querymodules:11109): Pango-WARNING **: Engine reported invalid script value -1

What's going on here? If it helps, my Glib installation is static-only.

Thanks for any advice...

Nick Zitzmann
S/MIME signature available upon request

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