You are not logged in.

#1 2011-10-16 16:04:50

Camus
Member
Registered: 2011-07-03
Posts: 71

Trying to build a vala package - absurd syntax error

I'm trying to build submarine from AUR, but I get this syntax error.

$ make
make  all-recursive
make[1]: Entering directory `/home/jure/submarine/blazt-submarine-6abde9e'
Making all in lib
make[2]: Entering directory `/home/jure/submarine/blazt-submarine-6abde9e/lib'
  VALAC  libsubmarine_la_vala.stamp
XMLRPC.vala:2.10-2.15: error: syntax error, expected `class'
	private static class XMLRPC {
	        ^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
make[2]: *** [libsubmarine_la_vala.stamp] Error 1
make[2]: Leaving directory `/home/jure/submarine/blazt-submarine-6abde9e/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jure/submarine/blazt-submarine-6abde9e'
make: *** [all] Error 2

Here's the file with supposed syntax error:

namespace Submarine {
        private static class XMLRPC {
                public static bool call(Soup.Session session, Soup.Message message, out HashTable<string,Value?>? vhash, out uint status_code = null) {
                        vhash = null;
                        status_code = session.send_message(message);

                        if(status_code == 200) {
                                try {
                                        Value v = Value (typeof (HashTable<string,Value?>));
                                        if(Soup.XMLRPC.parse_method_response ((string) message.response_body.flatten().data, -1, v))
                                        {
                                                vhash =  (HashTable<string,Value?>)v;
                                                return true;
                                        }
                                } catch (Error e) {}
                        }

                        return false;
                }
        }

}

I've tried changing the class to public and/or removing static keyword or removing all keywords before "class". Removing static keyword works, but this obviously introduces other errors since the class is used as static throughout the code.

I could make the package in Gnome (vala is related to Gnome project or so it seems), but I can't after migrating to a WM. I have all dependencies installed (glib2, libgee, libsoup, libarchive, base-devel, vala). Submarine is a command-line tool for getting subtitles. It's not something that would depend on a DE.

So I think it must be something about my environment. What info should I post to make it easier for anyone who wants to help?

Offline

Board footer

Powered by FluxBB