nbyouri / termite

A repo to port termite on Mac OS X, FreeBSD, NetBSD, ...
11 stars 0 forks source link

termite.cc error 'Use of undeclared identifier' #1

Open Jaso-N7 opened 9 years ago

Jaso-N7 commented 9 years ago

First of all, THANK YOU very much for taking the effort to produce a port for this terminal emulator. The work you put in and the instructions are very appreciated. I just found out about this terminal and wanted to replace urxvt with it.

However in trying to build it on my setup, I encountered an error at the last moment. I hope you can clear this up for me or point me in the right direction.

Fresh install: FreeBSD 10.2-RELEASE #0 r286666

What I did: Following all the instructions and making the preliminary adjustments to the files, I cloned the repo as instructed, then I copied Makefile.freebsd into the termite directory, renaming it to Makefile of course, and making a backup of the original Makefile. Then,

command: gmake clang++ -std=c++11 -stdlib=libc++ -O3 -Wall -Wextra -pedantic -Winit-self -Wshadow -Wformat=2 -Wmissing-declarations -Wstrict-overflow=5 -Wcast-align -Wcast-qual -Wconversion -Wunused-macros -Wwrite-strings -DNDEBUG -D_POSIX_C_SOURCE=200112L -DTERMITE_VERSION=\"v10-15-gfa9a4b0\" -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/harfbuzz -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/vte-2.90 -DVTE_SEAL_ENABLE -pthread -D_THREAD_SAFE -Wimplicit-fallthrough termite.cc -L/usr/local/lib -lvte2_90 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -lpthread -lX11 -lXext -o termite In file included from termite.cc:40: In file included from /usr/local/include/gtk-3.0/gdk/gdkx.h:30: In file included from /usr/local/include/X11/Xlib.h:47: /usr/local/include/X11/Xfuncproto.h:157:24: warning: named variadic macros are a GNU extension [-Wvariadic-macros]

define _X_NONNULL(args...) attribute((nonnull(args)))

 ^ termite.cc:398:5: error: use of undeclared identifier 'vte_terminal_unselect_all'; did you mean 'vte_terminal_select_all'? vte_terminal_unselect_all(vte);  ^~~~~~~~~  vte_terminal_select_all /usr/local/include/vte-2.90/vte/vte.h:297:6: note: 'vte_terminal_select_all' declared here void vte_terminal_select_all(VteTerminal _terminal);  ^ termite.cc:446:5: error: use of undeclared identifier 'vte_terminal_unselect_all'; did you mean 'vte_terminal_select_all'? vte_terminal_unselect_all(vte);  ^~~~~~~~~  vte_terminal_select_all /usr/local/include/vte-2.90/vte/vte.h:297:6: note: 'vte_terminal_select_all' declared here void vte_terminal_select_all(VteTerminal terminal);  ^ termite.cc:508:38: error: use of undeclared identifier 'vte_terminal_get_selection'; did you mean 'vte_terminal_get_has_selection'? auto selection = make_unique(vte_terminal_get_selection(vte), g_free);  ^~~~~~  vte_terminal_get_has_selection /usr/local/include/vte-2.90/vte/vte.h:402:10: note: 'vte_terminal_get_has_selection' declared here gboolean vte_terminal_get_has_selection(VteTerminal terminal);  ^ termite.cc:508:26: error: no matching function for call to 'make_unique' auto selection = make_unique(vte_terminal_get_selection(vte), g_free);  ^~~ ./util/memory.hh:7:29: note: candidate template ignored: could not match 'T ' against 'gboolean' (aka 'int') std::unique_ptr<T, Deleter> make_unique(T p, Deleter d) {  ^ termite.cc:694:21: error: use of undeclared identifier 'vte_terminal_get_font_scale' gdouble scale = vte_terminal_get_font_scale(vte);  ^ termite.cc:698:13: error: use of undeclared identifier 'vte_terminal_set_font_scale'; did you mean 'vte_terminal_set_font'? vte_terminal_set_font_scale(vte, it);  ^~~~~~~  vte_terminal_set_font /usr/local/include/vte-2.90/vte/vte.h:394:6: note: 'vte_terminal_set_font' declared here void vte_terminal_set_font(VteTerminal terminal,  ^ termite.cc:698:46: error: cannot initialize a parameter of type 'const PangoFontDescription ' (aka 'const _PangoFontDescription ') with an lvalue of type 'const double' vte_terminal_set_font_scale(vte, it);  ^~~ /usr/local/include/vte-2.90/vte/vte.h:395:35: note: passing argument to parameter 'font_desc' here const PangoFontDescription font_desc);  ^ termite.cc:705:21: error: use of undeclared identifier 'vte_terminal_get_font_scale' gdouble scale = vte_terminal_get_font_scale(vte);  ^ termite.cc:709:13: error: use of undeclared identifier 'vte_terminal_set_font_scale'; did you mean 'vte_terminal_set_font'? vte_terminal_set_font_scale(vte, it);  ^~~~~~~  vte_terminal_set_font /usr/local/include/vte-2.90/vte/vte.h:394:6: note: 'vte_terminal_set_font' declared here void vte_terminal_set_font(VteTerminal terminal,  ^ termite.cc:709:46: error: cannot initialize a parameter of type 'const PangoFontDescription ' (aka 'const _PangoFontDescription ') with an lvalue of type 'const double' vte_terminal_set_font_scale(vte, it);  ^~~ /usr/local/include/vte-2.90/vte/vte.h:395:35: note: passing argument to parameter 'font_desc' here const PangoFontDescription font_desc);  ^ termite.cc:1115:5: error: no matching function for call to 'vte_terminal_search_set_gregex' vte_terminal_search_set_gregex(vte, regex, (GRegexMatchFlags)0);  ^~~~~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:472:11: note: candidate function not viable: requires 2 arguments, but 3 were provided void vte_terminal_search_set_gregex (VteTerminal terminal,  ^ termite.cc:1118:9: error: use of undeclared identifier 'vte_terminal_unselect_all'; did you mean 'vte_terminal_select_all'? vte_terminal_unselect_all(vte);  ^~~~~~~~~  vte_terminal_select_all /usr/local/include/vte-2.90/vte/vte.h:297:6: note: 'vte_terminal_select_all' declared here void vte_terminal_select_all(VteTerminal terminal);  ^ termite.cc:1240:5: error: no matching function for call to 'vte_terminal_set_colors' vte_terminal_set_colors(vte, nullptr, nullptr, palette.data(), palette.size());  ^~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:336:6: note: candidate function not viable: no known conversion from 'value_type ' (aka '_GdkRGBA ') to 'const GdkColor ' (aka 'const _GdkColor ') for 4th argument void vte_terminal_set_colors(VteTerminal terminal,  ^ termite.cc:1242:9: error: no matching function for call to 'vte_terminal_set_color_foreground' vte_terminal_set_color_foreground(vte, &_color);  ^~~~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:328:6: note: candidate function not viable: no known conversion from 'GdkRGBA ' to 'const GdkColor ' (aka 'const _GdkColor ') for 2nd argument void vte_terminal_set_color_foreground(VteTerminal terminal,  ^ termite.cc:1243:9: error: no matching function for call to 'vte_terminal_set_color_bold' vte_terminal_set_color_bold(vte, &_color);  ^~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:326:6: note: candidate function not viable: no known conversion from 'GdkRGBA ' to 'const GdkColor ' (aka 'const _GdkColor ') for 2nd argument void vte_terminal_set_color_bold(VteTerminal terminal,  ^ termite.cc:1246:9: error: no matching function for call to 'vte_terminal_set_color_bold' vte_terminal_set_color_bold(vte, &_color);  ^~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:326:6: note: candidate function not viable: no known conversion from 'GdkRGBA ' to 'const GdkColor ' (aka 'const _GdkColor ') for 2nd argument void vte_terminal_set_color_bold(VteTerminal terminal,  ^ termite.cc:1249:9: error: no matching function for call to 'vte_terminal_set_color_background' vte_terminal_set_color_background(vte, &_color);  ^~~~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:330:6: note: candidate function not viable: no known conversion from 'GdkRGBA ' to 'const GdkColor ' (aka 'const _GdkColor ') for 2nd argument void vte_terminal_set_color_background(VteTerminal terminal,  ^ termite.cc:1253:9: error: no matching function for call to 'vte_terminal_set_color_cursor' vte_terminal_set_color_cursor(vte, &_color);  ^~~~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:332:6: note: candidate function not viable: no known conversion from 'GdkRGBA ' to 'const GdkColor ' (aka 'const _GdkColor ') for 2nd argument void vte_terminal_set_color_cursor(VteTerminal terminal,  ^ termite.cc:1256:9: error: no matching function for call to 'vte_terminal_set_color_highlight' vte_terminal_set_color_highlight(vte, &_color);  ^~~~~~~~ /usr/local/include/vte-2.90/vte/vte.h:334:6: note: candidate function not viable: no known conversion from 'GdkRGBA ' to 'const GdkColor ' (aka 'const _GdkColor ') for 2nd argument void vte_terminal_set_color_highlight(VteTerminal *terminal,  ^ termite.cc:1508:10: warning: 'gtk_alignment_new' is deprecated [-Wdeprecated-declarations] gtk_alignment_new(0, 0, 1, 1),  ^ /usr/local/include/gtk-3.0/gtk/deprecated/gtkalignment.h:79:12: note: 'gtk_alignmentnew' declared here GtkWidget gtk_alignment_new (gfloat xalign,  ^ termite.cc:1535:31: warning: 'gtk_alignment_get_type' is deprecated [-Wdeprecated-declarations] gtk_alignment_set_padding(GTK_ALIGNMENT(info.panel.panel), 5, 5, 5, 5);  ^ /usr/local/include/gtk-3.0/gtk/deprecated/gtkalignment.h:39:81: note: expanded from macro 'GTK_ALIGNMENT'

define GTK_ALIGNMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ALIGNMENT, GtkAlignment))

 ^ /usr/local/include/gtk-3.0/gtk/deprecated/gtkalignment.h:38:46: note: expanded from macro 'GTK_TYPE_ALIGNMENT'

define GTK_TYPE_ALIGNMENT (gtk_alignment_get_type ())

 ^ /usr/local/include/glib-2.0/gobject/gtype.h:479:92: note: expanded from macro 'G_TYPE_CHECK_INSTANCE_CAST'

define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))

 ^ /usr/local/include/glib-2.0/gobject/gtype.h:2186:61: note: expanded from macro '_G_TYPECIC' ((ct) g_type_check_instancecast ((GTypeInstance) ip, gt))  ^ /usr/local/include/gtk-3.0/gtk/deprecated/gtkalignment.h:77:12: note: 'gtk_alignment_get_type' declared here GType gtk_alignment_get_type (void) G_GNUC_CONST;  ^ termite.cc:1535:5: warning: 'gtk_alignment_set_padding' is deprecated [-Wdeprecated-declarations] gtk_alignment_set_padding(GTK_ALIGNMENT(info.panel.panel), 5, 5, 5, 5);  ^ /usr/local/include/gtk-3.0/gtk/deprecated/gtkalignment.h:91:12: note: 'gtk_alignment_set_padding' declared here void gtk_alignment_set_padding (GtkAlignment alignment,  ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 4 warnings and 20 errors generated. Makefile:38: recipe for target 'termite' failed gmake: ** [termite] Error 1

If you need any further information, please let me know.

Demonstrandum commented 7 years ago

I have the exact same problem, the exact same error messages and number of errors! Are there any solutions to this. I followed the instructions perfectly just as @Jaso-N7

nbyouri commented 7 years ago

I will boot up a FreeBSD release shortly to fix this :)

LeftBankTwo commented 7 years ago

So how long is 'shortly'?

nbyouri commented 7 years ago

I just pushed updated instructions on how to install termite on FreeBSD. I just tested this :) Could you confirm it works?