Bug 45874 - introspection does not build with g-i 0.9.5
Summary: introspection does not build with g-i 0.9.5
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 00:22 PDT by Götz Waschk
Modified: 2013-09-11 10:48 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Götz Waschk 2010-09-16 00:22:03 PDT
This is with webkit gtk 1.2.4 on Mandriva Linux with gobject-introspection 0.9.5:

  GEN    WebKit-1.0.gir
Traceback (most recent call last):
  File "/usr/bin/g-ir-scanner", line 45, in <module>
    sys.exit(scanner_main(sys.argv))
  File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 301, in scanner_main
    transformer.register_include(include_obj)
  File "/usr/lib/gobject-introspection/giscanner/transformer.py", line 113, in register_include
    self._parse_include(filename)
  File "/usr/lib/gobject-introspection/giscanner/transformer.py", line 171, in _parse_include
    parser.parse(filename)
  File "/usr/lib/gobject-introspection/giscanner/girparser.py", line 60, in parse
    self.parse_tree(tree)
  File "/usr/lib/gobject-introspection/giscanner/girparser.py", line 70, in parse_tree
    self._parse_api(tree.getroot())
  File "/usr/lib/gobject-introspection/giscanner/girparser.py", line 164, in _parse_api
    method(node)
  File "/usr/lib/gobject-introspection/giscanner/girparser.py", line 178, in _parse_alias
    typeval = self._parse_type(node)
  File "/usr/lib/gobject-introspection/giscanner/girparser.py", line 425, in _parse_type
    assert False, "Failed to parse toplevel type"
AssertionError: Failed to parse toplevel type
make[1]: *** [WebKit-1.0.gir] Fehler 1
Comment 1 Robert Ancell 2010-10-18 17:42:15 PDT
Confirming the same behaviour on Ubuntu 11.04
Comment 2 Robert Ancell 2010-10-20 02:18:11 PDT
The current JSCore is:

<?xml version="1.0"?>
<repository version="1.1"
            xmlns="http://www.gtk.org/introspection/core/1.0"
            xmlns:c="http://www.gtk.org/introspection/c/1.0">
  <namespace name="JSCore" version="1.0" shared-library="webkit-1.0">
    <alias name="GlobalContextRef"
           target="none"
           c:type="JSGlobalContextRef"/>
    <alias name="ObjectRef" target="none" c:type="JSObjectRef"/>
    <function name="EvaluateScript" c:identifier="JSEvaluateScript">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
      </parameters>
    </function>
  </namespace>
</repository>

Debugging shows it is the <alias> tags that is causing the problem.  I changed them to the following:

<alias name="GlobalContextRef" c:type="JSGlobalContextRef">
  <type name="opaque" c:type="void*"/>
</alias>
<alias name="ObjectRef" c:type="JSObjectRef">
  <type name="opaque" c:type="void*">
</alias>

This seems to get past the compilation problem.  However I haven't been able to get the .deb to compile with this fix and I'm not an introspection expert - I don't know if this is correct syntax.
Comment 3 Alberto Garcia 2013-09-11 10:48:35 PDT
This is 3 years old and we now depend on g-i 1.32.0

Please reopen if you think this bug is still relevant. Thanks!