gw0kin / gnome2-globalmenu

Automatically exported from code.google.com/p/gnome2-globalmenu
GNU General Public License v2.0
0 stars 0 forks source link

Can not compile git version with vala-0.7.3, 0.7.7, 0.8.0 and 0.8.1 #598

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Latest git version of GlobalMenu.
Tried with vala-versions 0.7.3 and 0.7.7. Compilation fails and i get this:

-------------------
settings.vala:126.43-126.56: error: The name `get_class' does not exist in
the context of `Gnomenu.Settings'
        weak ObjectClass klass = (ObjectClass) (this.get_class());
                                                ^^^^^^^^^^^^^^
settings.vala:126.20-126.59: error: expression type not allowed as initializer
        weak ObjectClass klass = (ObjectClass) (this.get_class());
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
settings.vala:127.26-127.30: error: The name `klass' does not exist in the
context of `Gnomenu.Settings.load_property'
        weak ParamSpec pspec = klass.find_property(key);
                               ^^^^^
settings.vala:127.18-127.49: error: expression type not allowed as initializer
        weak ParamSpec pspec = klass.find_property(key);
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
settings.vala:128.23-128.27: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.load_property'
        Value value = Value(pspec.value_type);
                            ^^^^^
settings.vala:129.6-129.10: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.load_property'
        if(pspec.value_type == typeof(bool)) {
           ^^^^^
settings.vala:132.6-132.10: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.load_property'
        if(pspec.value_type == typeof(string)) {
           ^^^^^
settings.vala:135.6-135.10: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.load_property'
        if(pspec.value_type == typeof(int)) {
           ^^^^^
settings.vala:139.5-139.9: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.load_property'
                pspec.value_type.name());
                ^^^^^
settings.vala:155.3-155.62: warning: unhandled error `GLib.KeyFileError'
        keyfile.load_from_data(data, data.length, KeyFileFlags.NONE);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
settings.vala:106.43-106.56: error: The name `get_class' does not exist in
the context of `Gnomenu.Settings'
        weak ObjectClass klass = (ObjectClass) (this.get_class());
                                                ^^^^^^^^^^^^^^
settings.vala:106.20-106.59: error: expression type not allowed as initializer
        weak ObjectClass klass = (ObjectClass) (this.get_class());
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
settings.vala:107.26-107.30: error: The name `klass' does not exist in the
context of `Gnomenu.Settings.save_property'
        weak ParamSpec pspec = klass.find_property(key);
                               ^^^^^
settings.vala:107.18-107.49: error: expression type not allowed as initializer
        weak ParamSpec pspec = klass.find_property(key);
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
settings.vala:108.23-108.27: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.save_property'
        Value value = Value(pspec.value_type);
                            ^^^^^
settings.vala:110.6-110.10: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.save_property'
        if(pspec.value_type == typeof(bool)) {
           ^^^^^
settings.vala:113.6-113.10: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.save_property'
        if(pspec.value_type == typeof(string)) {
           ^^^^^
settings.vala:116.6-116.10: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.save_property'
        if(pspec.value_type == typeof(int)) {
           ^^^^^
settings.vala:120.5-120.9: error: The name `pspec' does not exist in the
context of `Gnomenu.Settings.save_property'
                pspec.value_type.name());
                ^^^^^
Compilation failed: 18 error(s), 1 warning(s)
-----------------

With Vala-0.8.* i see this instead:

-----------------
make[2]: Entering directory `/home/snigga/gnome-globalmenu/libsettings'
/usr/bin/valac --vapidir=../vapi --vapidir .. --vapidir ../vapi --pkg
configmake --pkg config \
        -C \
        -H globalmenu-settings.h \
        --library=globalmenu-settings \
        --vapi=globalmenu-settings.vapi \
        settings.vala global-settings.vala local-settings.vala  \
        --pkg gtk+-2.0 \
        --pkg gdk-x11-2.0
settings.vala:155.3-155.62: warning: unhandled error `GLib.KeyFileError'
        keyfile.load_from_data(data, data.length, KeyFileFlags.NONE);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
settings.vala:42.28-42.34: error: Argument 1: Cannot convert from
`Gdk.XEvent*' to `X.Event*'
        return real_event_filter(&xevent, event);
                                 ^^^^^^^
Compilation failed: 1 error(s), 1 warning(s)
------------------------

Any thoughts?...

Original issue reported on code.google.com by dr.ino...@gmail.com on 1 May 2010 at 8:08

GoogleCodeExporter commented 9 years ago
Zenwalk-current, kernel 2.6.33.3.

Original comment by dr.ino...@gmail.com on 1 May 2010 at 8:25

GoogleCodeExporter commented 9 years ago
I'm working on this.

Original comment by rainwood...@gmail.com on 10 May 2010 at 1:20

GoogleCodeExporter commented 9 years ago
Issue 582 has been merged into this issue.

Original comment by rainwood...@gmail.com on 10 May 2010 at 2:15

GoogleCodeExporter commented 9 years ago
Fixed in commit 4f2a (github)

Original comment by rainwood...@gmail.com on 10 May 2010 at 2:19

GoogleCodeExporter commented 9 years ago
Still seeing this in latest git (following instructions on BuildFromSource wiki 
page) as of today, 17-August-2011.

Original comment by peterkidwell@gmail.com on 17 Aug 2011 at 7:18

GoogleCodeExporter commented 9 years ago
Please refer to InstallGnome3. The requirement on Vala has bumped to 0.12.

BuildFromSource is deprecated.

Thanks.

Original comment by rainwood...@gmail.com on 18 Aug 2011 at 2:52

GoogleCodeExporter commented 9 years ago
I am at Vala 0.13, getting same errors.

Is Gnome3 required?  I am using Gnome 2.28.2 on Centos 6.0

Original comment by peterkidwell@gmail.com on 18 Aug 2011 at 1:31

GoogleCodeExporter commented 9 years ago
I see. I forgot to merge the gnome3 branch to the master. The gnome3 branch 
needs GnomeShell and GTK 3 to compile. but the master doesn't.

Looking into the line of code giving us trouble, the pointer conversion is 
quite problematic in vala.

Would you put a (X.Event*) before the pointer &event, see if it helps? My 
memory says it worked with some previous versions of vala, then stopped working 
at a point when I had to remove the type-cast. Probably with new valas the cast 
is required again.

Original comment by rainwood...@gmail.com on 18 Aug 2011 at 9:32