After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686536 - Using --symbol-prefix results in KeyError
Using --symbol-prefix results in KeyError
Status: RESOLVED DUPLICATE of bug 684370
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-10-20 18:47 UTC by Stef Walter
Modified: 2015-02-07 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
giscanner: Fix KeyError for prefixes in --identifier-prefix (878 bytes, patch)
2012-10-20 19:16 UTC, Stef Walter
none Details | Review

Description Stef Walter 2012-10-20 18:47:20 UTC
I get the following error when building the GcrBase gir:

/opt/build/bin/g-ir-scanner  --warn-error --warn-all --add-include-path=../gck --include-uninstalled=../gck/Gck-1.gir --namespace=GcrBase --nsversion=3 --libtool="/bin/sh ../libtool" --pkg=p11-kit-1 --include=GLib-2.0 --include=GObject-2.0 --pkg-export=gcr-base-3  --library=libgcr-base-3.la --c-include "gcr-base.h" --identifier-prefix Gcr --namespace=GcrBase -I.. -I.. -DGCR_COMPILATION -DGCR_API_SUBJECT_TO_CHANGE  gcr-base.h gcr-certificate.c gcr-certificate.h gcr-certificate-chain.c gcr-certificate-chain.h gcr-certificate-request.c gcr-certificate-request.h gcr-collection.c gcr-collection.h gcr-comparable.c gcr-comparable.h gcr-filter-collection.c gcr-filter-collection.h gcr-fingerprint.c gcr-fingerprint.h gcr-icons.c gcr-icons.h gcr-importer.c gcr-importer.h gcr-import-interaction.c gcr-import-interaction.h gcr-library.c gcr-library.h gcr-mock-prompter.c gcr-mock-prompter.h gcr-parser.c gcr-parser.h gcr-pkcs11-certificate.c gcr-pkcs11-certificate.h gcr-prompt.c gcr-prompt.h gcr-secret-exchange.c gcr-secret-exchange.h gcr-secure-memory.c gcr-secure-memory.h gcr-simple-certificate.c gcr-simple-certificate.h gcr-simple-collection.c gcr-simple-collection.h gcr-system-prompt.c gcr-system-prompt.h gcr-system-prompter.c gcr-system-prompter.h gcr-types.h gcr-union-collection.c gcr-union-collection.h gcr-unlock-options.h libgcr-base-3.la Gcr-3.gir --output GcrBase-3.gir
g-ir-scanner: compile: gcc -Wall -pthread -I/opt/build/include/glib-2.0 -I/opt/build/lib64/glib-2.0/include -I/opt/build/include/p11-kit-1 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O0 -g -O0 -Wno-strict-aliasing -Wno-sign-compare -Werror -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -I.. -I.. -I/opt/build/include/gio-unix-2.0/ -I/opt/build/include/glib-2.0 -I/opt/build/lib64/glib-2.0/include -I/opt/build/include/p11-kit-1 -c -o /data/projects/gcr/gcr/tmp-introspectB64C4h/GcrBase-3.o /data/projects/gcr/gcr/tmp-introspectB64C4h/GcrBase-3.c
g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC gcc -o /data/projects/gcr/gcr/tmp-introspectB64C4h/GcrBase-3 -export-dynamic -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O0 -g -O0 -Wno-strict-aliasing -Wno-sign-compare -Werror -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -L/opt/build/lib64 /data/projects/gcr/gcr/tmp-introspectB64C4h/GcrBase-3.o -L. libgcr-base-3.la -Wl,--export-dynamic -pthread -L/opt/build/lib64 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lp11-kit
libtool: link: gcc -o /data/projects/gcr/gcr/tmp-introspectB64C4h/.libs/GcrBase-3 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O0 -g -O0 -Wno-strict-aliasing -Wno-sign-compare -Werror -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED /data/projects/gcr/gcr/tmp-introspectB64C4h/GcrBase-3.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic  -L/opt/build/lib64 -L. ./.libs/libgcr-base-3.so /data/projects/gcr/gck/.libs/libgck-1.so -lgcrypt -lgpg-error /opt/build/lib64/libgio-2.0.so -lz -lselinux -lresolv /opt/build/lib64/libgobject-2.0.so /opt/build/lib64/libgthread-2.0.so -lffi /opt/build/lib64/libgmodule-2.0.so -ldl /opt/build/lib64/libglib-2.0.so -lpthread -lrt -lp11-kit -pthread -Wl,-rpath -Wl,/opt/build/lib64
Traceback (most recent call last):
  • File "/opt/build/bin/g-ir-scanner", line 46 in <module>
    sys.exit(scanner_main(sys.argv))
  • File "/opt/build/lib64/gobject-introspection/giscanner/scannermain.py", line 428 in scanner_main
    main.transform()
  • File "/opt/build/lib64/gobject-introspection/giscanner/maintransformer.py", line 93 in transform
    self._pair_function(node)
  • File "/opt/build/lib64/gobject-introspection/giscanner/maintransformer.py", line 968 in _pair_function
    if self._is_constructor(func, subsymbol):
  • File "/opt/build/lib64/gobject-introspection/giscanner/maintransformer.py", line 1146 in _is_constructor
    target = self._transformer.lookup_typenode(func.retval.type)
  • File "/opt/build/lib64/gobject-introspection/giscanner/transformer.py", line 165 in lookup_typenode
    return self.lookup_giname(typeobj.target_giname)
  • File "/opt/build/lib64/gobject-introspection/giscanner/transformer.py", line 157 in lookup_giname
    include = self._includes[ns]
KeyError: 'Gcr'
make[4]: *** [GcrBase-3.gir] Error 1
make[4]: Leaving directory `/data/projects/gcr/gcr'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/data/projects/gcr/gcr'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/data/projects/gcr/gcr'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/projects/gcr'
make: *** [all] Error 2

This is with gobject-introspection built from jhbuild, so presumably current.

The branch of gcr that this code is on is here: http://git.gnome.org/browse/gcr/log/?h=wip/gir-keyerror

You can see how the gir is being built here:

http://git.gnome.org/browse/gcr/tree/gcr/Makefile.am?h=wip/gir-keyerror&id=64442ec0c168125102168bf514c4c881dec8119c#n436
Comment 1 Stef Walter 2012-10-20 19:16:27 UTC
Created attachment 226904 [details] [review]
giscanner: Fix KeyError for prefixes in --identifier-prefix
Comment 2 Colin Walters 2012-10-23 14:29:15 UTC
Fairly sure this is a dup of bug 684370 .
Comment 3 Colin Walters 2012-10-23 14:52:02 UTC
Yeah, confirmed.

*** This bug has been marked as a duplicate of bug 684370 ***
Comment 4 André Klapper 2015-02-07 16:54:27 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]