eyelash / xi-gtk

a GTK front-end for the Xi editor
Apache License 2.0
355 stars 23 forks source link

Compilation fails with vala 0.40.0 #51

Closed flipflop97 closed 6 years ago

flipflop97 commented 6 years ago

When compiling the project with Vala 0.40.0 the compilation fails, 0.38.8 works fine.

It gives the following error:

The Meson build system
Version: 0.45.0
Source dir: /tmp/trizen-philip/xi-gtk-git/src/xi-gtk-git
Build dir: /tmp/trizen-philip/xi-gtk-git/src/xi-gtk-git/build
Build type: native build
Project name: xi-gtk
Native C compiler: cc (gcc 7.3.1 "cc (GCC) 7.3.1 20180312")
Appending CFLAGS from environment: '-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt'
Appending LDFLAGS from environment: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Appending CPPFLAGS from environment: '-D_FORTIFY_SOURCE=2'
Native Vala compiler: valac (valac 0.40.0)
Appending LDFLAGS from environment: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Native dependency gtk+-3.0 found: YES 3.22.29
Native dependency json-glib-1.0 found: YES 1.4.2
Native dependency gio-unix-2.0 found: YES 2.56.0
Library m found: YES
Configuring config.h using configuration
Library config found: YES
Native dependency glib-2.0 found: YES 2.56.0
Configuring com.github.eyelash.xi-gtk.service using configuration
Build targets in project: 3
Found ninja-1.8.2 at /usr/bin/ninja
[4/19] Compiling Vala source ../src/Applica...a ../src/Utilities.vala ../src/Window.vala.
FAILED: xi-gtk@exe/src/Application.c xi-gtk@exe/src/Blinker.c xi-gtk@exe/src/CoreConnection.c xi-gtk@exe/src/EditView.c xi-gtk@exe/src/EditViewContainer.c xi-gtk@exe/src/FindBar.c xi-gtk@exe/src/Line.c xi-gtk@exe/src/LineCache.c xi-gtk@exe/src/Notebook.c xi-gtk@exe/src/Style.c xi-gtk@exe/src/StyleMap.c xi-gtk@exe/src/Theme.c xi-gtk@exe/src/Utilities.c xi-gtk@exe/src/Window.c 
valac -C /tmp/trizen-philip/xi-gtk-git/src/xi-gtk-git/config.vapi --pkg gio-unix-2.0 --pkg json-glib-1.0 --pkg gtk+-3.0 --color=always --directory xi-gtk@exe --basedir ../ --gresources=../resources/gresource.xml ../src/Application.vala ../src/Blinker.vala ../src/CoreConnection.vala ../src/EditView.vala ../src/EditViewContainer.vala ../src/FindBar.vala ../src/Line.vala ../src/LineCache.vala ../src/Notebook.vala ../src/Style.vala ../src/StyleMap.vala ../src/Theme.vala ../src/Utilities.vala ../src/Window.vala
../src/EditView.vala:17.1-17.47: error: `Xi.EditView' does not implement interface method `Gtk.Scrollable.get_border'
class EditView: Gtk.DrawingArea, Gtk.Scrollable {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.
flipflop97 commented 6 years ago

It still fails when compiling with 0.40.0, but now with another error:

[9/19] Compiling C object 'xi-gtk@exe/meson-generated_src_EditView.c.o'.
FAILED: xi-gtk@exe/meson-generated_src_EditView.c.o 
cc  -Ixi-gtk@exe -I. -I.. -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/libdrm -I/usr/include/cloudproviders -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/json-glib-1.0 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -w -O3 -march=x86-64 -mtune=generic -O2 -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'xi-gtk@exe/meson-generated_src_EditView.c.o' -MF 'xi-gtk@exe/meson-generated_src_EditView.c.o.d' -o 'xi-gtk@exe/meson-generated_src_EditView.c.o' -c 'xi-gtk@exe/src/EditView.c'
xi-gtk@exe/src/EditView.c: In function ‘xi_edit_view_real_get_border’:
xi-gtk@exe/src/EditView.c:478:2: error: conversion to non-scalar type requested
  (GtkBorder) gtk_border_init (&_vala_border);
  ^
[18/19] Compiling C object 'xi-gtk@exe/meson-generated_src_Window.c.o'.
ninja: build stopped: subcommand failed.
eyelash commented 6 years ago

I will update to debian testing in the next few days and have a closer look.

eyelash commented 6 years ago

See https://bugzilla.gnome.org/show_bug.cgi?id=794733

flipflop97 commented 6 years ago

It works fine with 0.40.2 now, thanks!