issues compiling gobject-introspection 1.44



Greetings,

I recently tried to compile gobject-introspection 1.44 using glib 2.44.1.

I encountered several issues along the way that I was hoping others might be able to help me understand.

First, during the build process when it attempts to use g-ir-scanner for "gobject-introspection-1.44.0/gir/gio-2.0.c GObject-2.0.gir":

============================================================
Warnings like this:
============================================================
/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/gir/gio-2.0.c:45783: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef GAction *GAction_autoptr;' at 'GAction_autoptr'
...
gobject-introspection-1.44.0/gir/gio-2.0.c:47302: Warning: Gio: symbol='krw_async_t': Unknown namespace for identifier 'krw_async_t'
...

============================================================
Then the first build failure (traceback):
============================================================
Traceback (most recent call last):
  File "./g-ir-scanner", line 55, in <module>
    sys.exit(scanner_main(sys.argv))
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/scannermain.py", line 523, in scanner_main
    transformer.parse(ss.get_symbols())
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/transformer.py", line 109, in parse
    node = self._traverse_one(symbol)
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/transformer.py", line 350, in _traverse_one
    return self._create_typedef(symbol)
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/transformer.py", line 600, in _create_typedef
    "symbol %r of type %s" % (symbol.ident, ctype_name(ctype)))
NotImplementedError: symbol 'krw_async_cb_f' of type function

...which appears to be this bug:

  625379 Scanning fails with NotImplementedError on callback typedef

This is the typedef that caused it to fail:

  /usr/include/sys/rwlock.h:
    typedef void krw_async_cb_f(krwlock_t *, void *);


============================================================
...then the next build failure:
============================================================
...
gobject-introspection-1.44.0/gir/gio-2.0.c:49788: Warning: Gio: symbol='ns_sect': Unknown namespace for identifier 'ns_sect'
Traceback (most recent call last):
  File "./g-ir-scanner", line 55, in <module>
    sys.exit(scanner_main(sys.argv))
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/scannermain.py", line 523, in scanner_main
    transformer.parse(ss.get_symbols())
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/transformer.py", line 109, in parse
    node = self._traverse_one(symbol)
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/transformer.py", line 350, in _traverse_one
    return self._create_typedef(symbol)
File "/builds/srwalker/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0/giscanner/transformer.py", line 602, in _create_typedef
    "symbol %r of type %s" % (symbol.ident, ctype_name(ctype)))
NotImplementedError: symbol 'ns_nname' of type array
...

...which I can't find a related bug for.

This is the typedef that caused it to fail:

  /usr/include/arpa/nameser.h:
    typedef uchar_t ns_nname[NS_MAXNNAME];


============================================================
Attempted workaround
============================================================
I worked around the above (perhaps incorrectly?) by adding the following to _create_typedef in giscanner/transformer.py hoping that it would basically "ignore" the problematic typedefs:

        elif ctype in (CTYPE_ARRAY, CTYPE_FUNCTION):
            return None

============================================================
Final failure
============================================================
g-ir-scanner: compile: /usr/gcc/4.8/bin/gcc -Wno-deprecated-declarations -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/builds/userland/components/gnome/gobject-introspection/gobject-introspection-1.44.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c -o /builds/userland/components/gnome/gobject-introspection/build/i86/tmp-introspectiIGlLp/GIRepository-2.0.o /builds/userland/components/gnome/gobject-introspection/build/i86/tmp-introspectiIGlLp/GIRepository-2.0.c g-ir-scanner: link: /bin/bash ./libtool --mode=link --tag=CC /usr/gcc/4.8/bin/gcc -o /builds/userland/components/gnome/gobject-introspection/build/i86/tmp-introspectiIGlLp/GIRepository-2.0 -export-dynamic /builds/userland/components/gnome/gobject-introspection/build/i86/tmp-introspectiIGlLp/GIRepository-2.0.o -L. libgirepository-1.0.la -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 libtool: link: /usr/gcc/4.8/bin/gcc -o /builds/userland/components/gnome/gobject-introspection/build/i86/tmp-introspectiIGlLp/.libs/GIRepository-2.0 /builds/userland/components/gnome/gobject-introspection/build/i86/tmp-introspectiIGlLp/GIRepository-2.0.o -L. ./.libs/libgirepository-1.0.so -lm -lffi -ldl -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 <unknown>:: Fatal: GIRepository: Skipping foreign identifier 'GClosure' from namespace GObject <unknown>:: Fatal: GIRepository: Skipping foreign identifier 'GClosure' from namespace GObject


I've been unable to progress from this point; this is too specific of a failure to gobject-introspection for me to grok.

Can anyone help?

Thanks,
-Shawn


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