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 668701 - libgda-5.0.3: vapigen fails with "The type name `Xml.NodePtr' could not be found" errors
libgda-5.0.3: vapigen fails with "The type name `Xml.NodePtr' could not be fo...
Status: RESOLVED OBSOLETE
Product: libgda
Classification: Other
Component: general
5.0.x
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-26 00:52 UTC by Alexandre Rostovtsev
Modified: 2018-09-21 13:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
complete build log from 5.0.3 showing the build failure (432.76 KB, text/plain)
2012-01-26 00:52 UTC, Alexandre Rostovtsev
Details

Description Alexandre Rostovtsev 2012-01-26 00:52:33 UTC
Created attachment 206144 [details]
complete build log from 5.0.3 showing the build failure

Even after adding the missing libgda/libgda-5.0-custom.vala file git (see bug #668697), building from the libgda-5.0.3 tarball release still fails when generating libgda-5.0.vapi:

/usr/bin/vapigen-0.14 --metadatadir=../libgda --library libgda-5.0 --pkg libxml-2.0 Gda-5.0.gir libgda-5.0-custom.vala

** (vapigen-0.14:579): CRITICAL **: vala_code_node_get_attribute_string: assertion `self != NULL' failed

** (vapigen-0.14:579): CRITICAL **: vala_code_node_get_attribute_string: assertion `self != NULL' failed
[...]
** (vapigen-0.14:579): CRITICAL **: vala_code_node_get_attribute_string: assertion `self != NULL' failed

** (vapigen-0.14:579): CRITICAL **: vala_gir_parser_is_container: assertion `sym != NULL' failed

** (vapigen-0.14:579): CRITICAL **: vala_gir_parser_is_container: assertion `sym != NULL' failed

** (vapigen-0.14:579): CRITICAL **: vala_gir_parser_add_symbol_to_container: assertion `sym != NULL' failed
Gda-5.0.gir:7187.65-7187.65: error: The type name `Xml.NodePtr' could not be found
            <type name="libxml2.NodePtr" c:type="xmlNodePtr"/>
                                                                ^
Gda-5.0.gir:13227.65-13227.65: error: The type name `Xml.NodePtr' could not be found
            <type name="libxml2.NodePtr" c:type="xmlNodePtr"/>
                                                                ^
Gda-5.0.gir:16901.65-16901.65: error: The type name `Xml.NodePtr' could not be found
            <type name="libxml2.NodePtr" c:type="xmlNodePtr"/>
                                                                ^
Gda-5.0.gir:5111.65-5111.65: error: The type name `Xml.NodePtr' could not be found
            <type name="libxml2.NodePtr" c:type="xmlNodePtr"/>
                                                                ^
Gda-5.0.gir:24593.63-24593.63: error: The type name `Xml.NodePtr' could not be found
          <type name="libxml2.NodePtr" c:type="xmlNodePtr"/>
                                                              ^
Gda-5.0.gir:24654.63-24654.63: error: The type name `Xml.NodePtr' could not be found
          <type name="libxml2.NodePtr" c:type="xmlNodePtr"/>
                                                              ^
Gda-5.0.gir:25004.63-25004.63: error: The type name `Xml.NodePtr' could not be found
          <type name="libxml2.NodePtr" c:type="xmlNodePtr"/>
                                                              ^
Generation failed: 7 error(s), 0 warning(s)
make[2]: *** [libgda-5.0.vapi] Error 1


This is on a Gentoo system with glib-2.30.2, vala-0.14.1 and gobject-introspection-1.30.0. The /usr/share/vala-0.14/vapi/libxml-2.0.vapi, /usr/share/gir-1.0/libxml2-2.0.gir, and /usr/lib64/girepository-1.0/libxml2-2.0.typelib files are all installed.

Since on the same system, libgda-5.0.2 tarball release (with its libgda-5.0.vapi) builds successfully, I am guessing that this is a bug in libgda and not in vapigen.

The complete build log from libgda-5.0.3 is attached.
Comment 1 Daniel Espinosa 2012-01-30 20:58:56 UTC
I'll review your problem and solved ASAP.

There are some issues on GIR and VAPI generation, due to API break in latest GObject Introspection (GI), I've tried to fix it in 5.0.3 to avoid future GI versions to break API (see Bug 667837), by adding a declaration for DataProxy.new method in Vala that is sustituted by a constructor in resent GI version 1.31.x, but seems that added some other stuff.

To fix this an other issues happen in resent Valac and GLib unstable, I'll:

a) Force 5.0.x to use 1.30 or less version to avoid use custom code to generate VAPI or include custom code depending of GI version.

b) Generate GIR just on demand not automatically and add GIR file to repository that only will be used to generate typelib binary representation and to check future API breaks or binding fixes, including Vala.
Comment 2 Daniel Espinosa 2012-01-31 16:43:58 UTC
I can't reproduce your bug with libgda-5.0-custom.vala and Gda-5.0.metadata files in place. 5.0.3 compiles without problem in my box using GI 1.30 and Vala 0.14.

The only way I can reproduce it was:

a) Deleting Gda-5.0.metadata and commenting out all code in libgda-5.0-custom.vala

For some reason, libxml-2.0.vapi have a different namespace than libxml2-2.0.gir files, then without substituting libxml2 namespace with Xml used in Vala, the error messages rise when trying to build libgda-5.0.vapi; substitution is made in Gda-5.0.metadata

Could you check your configuration and all files are in place? If you are able to get a repository copy of LIBGDA_5.0 branch and test may that could be better.

File locations:
libgda/Gda-5.0.metadata
libgda/libgda-5.0-custom.vala
Comment 3 Alexandre Rostovtsev 2012-01-31 17:27:41 UTC
(In reply to comment #2)
> File locations:
> libgda/Gda-5.0.metadata
> libgda/libgda-5.0-custom.vala

Both files are missing from http://ftp.gnome.org/pub/GNOME/sources/libgda/5.0/libgda-5.0.3.tar.xz

You should release a better tarball :)
Comment 4 Murray Cumming 2012-02-02 11:27:59 UTC
Daniel is this fixed now?
Comment 5 GNOME Infrastructure Team 2018-09-21 13:43:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgda/issues/57.