3 more specific title
| link

Can't compile appcenter from launchpad Compiling AppCenter on Ubuntu 16.04 fails at "AlertView"

2 edited tags
| link
1
source | link

Can't compile appcenter from launchpad

I'm trying to compile the appcenter package from launchpad, I've downloaded it by the bzr command, then I installed the required dependencies and ran the cmake command but when I try to compile it doesn't complete the compilation and the output is :-

/home/username/appcenter/src/Core/Client.vala:45.9-45.48: warning: unhandled error `GLib.Error'
        appstream_database.get_all_components ().foreach ((comp) => {
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/username/appcenter/src/Core/Client.vala:271.21-271.73: warning: unhandled error `GLib.Error'
        var comps = appstream_database.find_components (null, categories);
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/username/appcenter/src/Core/Client.vala:292.21-292.68: warning: unhandled error `GLib.Error'
        var comps = appstream_database.find_components (query, null);
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/username/appcenter/src/Core/Client.vala:60.9-60.34: warning: unhandled error `GLib.Error'
        appstream_database.open ();
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/username/appcenter/src/Views/AppListView.vala:53.30-53.54: error: The name `AlertView' does not exist in the context of `Granite.Widgets'
        var alert_view = new Granite.Widgets.AlertView (_("No Results"), _("No apps could be found."), "dialog-information");
                             ^^^^^^^^^^^^^^^^^^^^^^^^^
/home/username/appcenter/src/Views/AppListView.vala:53.13-53.124: error: var declaration not allowed with non-typed initializer
        var alert_view = new Granite.Widgets.AlertView (_("No Results"), _("No apps could be found."), "dialog-information");
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/username/appcenter/src/Views/AppListView.vala:54.9-54.18: error: The name `alert_view' does not exist in the context of `AppCenter.Views.AppListView'
        alert_view.show_all ();
        ^^^^^^^^^^
/home/username/appcenter/src/Views/AppListView.vala:58.35-58.44: error: The name `alert_view' does not exist in the context of `AppCenter.Views.AppListView'
        list_box.set_placeholder (alert_view);
                                  ^^^^^^^^^^
src/CMakeFiles/appcenter.dir/build.make:127: recipe for target 'src/appcenter_valac.stamp' failed
make[2]: *** [src/appcenter_valac.stamp] Error 1
CMakeFiles/Makefile2:172: recipe for target 'src/CMakeFiles/appcenter.dir/all' failed
make[1]: *** [src/CMakeFiles/appcenter.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

I am running ubuntu 16.04.

Thanks in advance.