Re: [gtk-osx-users] Gdk-pixbuf and Pango update query fails



On Feb 12, 2013, at 8:43 AM, Timo <timomlists gmail com> wrote:

> I'm not really sure if I should ask this here. If not, please advice and sorry for the noise.
> 
> Building GTK+ failed because Gdk-pixbuf failed to update the loader cache. When trying to update it manually, I found out that it's looking for loadernames that don't exist. The same when trying to update the Pango cache.
> 
> $ ./pango-querymodules --update-cache
> Cannot load module /Users/timo/gtk/inst/lib/pango/1.8.0/modules/lang.so: dlopen(/Users/timo/gtk/inst/lib/pango/1.8.0/modules/lang.so, 1): image not found
> /Users/timo/gtk/inst/lib/pango/1.8.0/modules/lang.so does not export Pango module API
> Cannot load module /Users/timo/gtk/inst/lib/pango/1.8.0/modules/oretext.so: dlopen(/Users/timo/gtk/inst/lib/pango/1.8.0/modules/oretext.so, 1): image not found
> /Users/timo/gtk/inst/lib/pango/1.8.0/modules/oretext.so does not export Pango module API
> Cannot load module /Users/timo/gtk/inst/lib/pango/1.8.0/modules/ang.so: dlopen(/Users/timo/gtk/inst/lib/pango/1.8.0/modules/ang.so, 1): image not found
> /Users/timo/gtk/inst/lib/pango/1.8.0/modules/ang.so does not export Pango module API
> 
> It seems that g_dir_read_name() doesn't return the full filenames. I hacked something up with the pixbuf loader, because all filenames start the same, like this:
> 
>     queryloaders.c:348
>                         const char *dent;
>                         char dent2[] = "libpixbufload\0";
>                         char *dent_new;
> 
>                         while ((dent = g_dir_read_name (dir))) {
>                                 gint len = strlen (dent);
>                                 dent_new = g_strconcat(dent2, dent, NULL);
>                                 if (len > SOEXT_LEN &&
>                                     strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
>                                         query_module (contents, path, dent_new);
>                                 }
> 
> And it works. The loaders are written correctly. But the Pango filenames are different, so this hack won't work.
> 
> Does anybody know why g_dir_read_name() doesn't return the full filename? And even better, how to fix this?
> 

It does return the full filename unless something's messed up. The following test program:
#include <glib.h>

int
main (int argc, char** argv)
{
  GDir *dir = g_dir_open ("/Users/john/gtk-build/inst/lib/pango/1.8.0/modules", 0, NULL);
  gchar *dirname;
  while (dirname = g_dir_read_name (dir))
    g_printf ("%s\n", dirname);
}

produces

pango-arabic-lang.la
pango-arabic-lang.so
pango-basic-coretext.la
pango-basic-coretext.so
pango-basic-fc.la
pango-basic-fc.so
pango-indic-lang.la
pango-indic-lang.so

which are the full filenames. 

So rather than hacking on widely-used and working code, spend your time understanding what you might have messed up when creating your build environment.

Regards,
John Ralls





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