Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failed on GNOME 3.28.3 (RHEL7.6) #113

Open
manosnoam opened this issue Feb 12, 2019 · 5 comments
Open

Compilation failed on GNOME 3.28.3 (RHEL7.6) #113

manosnoam opened this issue Feb 12, 2019 · 5 comments

Comments

@manosnoam
Copy link

[nmanos@nmanos ClipIt]$ sudo make
make all-recursive
make[1]: Entering directory /home/nmanos/automation/ClipIt' Making all in data make[2]: Entering directory /home/nmanos/automation/ClipIt/data'
make[2]: Nothing to be done for all'. make[2]: Leaving directory /home/nmanos/automation/ClipIt/data'
Making all in doc
make[2]: Entering directory /home/nmanos/automation/ClipIt/doc' make[2]: Nothing to be done for all'.
make[2]: Leaving directory /home/nmanos/automation/ClipIt/doc' Making all in src make[2]: Entering directory /home/nmanos/automation/ClipIt/src'
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/pixman-1 -I/usr/include/libdrm -Wall -g -DCLIPITLOCALEDIR=""/usr/local/share/locale"" -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c: In function ‘item_check’:
main.c:211:7: error: unknown type name ‘GdkSeat’
GdkSeat *seat = gdk_display_get_default_seat(display);
^
main.c:211:7: warning: implicit declaration of function ‘gdk_display_get_default_seat’ [-Wimplicit-function-declaration]
main.c:211:23: warning: initialization makes pointer from integer without a cast [enabled by default]
GdkSeat *seat = gdk_display_get_default_seat(display);
^
main.c:213:7: warning: implicit declaration of function ‘gdk_window_get_device_position’ [-Wimplicit-function-declaration]
gdk_window_get_device_position(window, gdk_seat_get_pointer(seat), NULL,
^
main.c:213:7: warning: implicit declaration of function ‘gdk_seat_get_pointer’ [-Wimplicit-function-declaration]
main.c: In function ‘show_about_dialog’:
main.c:388:25: warning: implicit declaration of function ‘gtk_widget_render_icon_pixbuf’ [-Wimplicit-function-declaration]
gtk_widget_render_icon_pixbuf(about_dialog, GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU));
^
main.c:388:25: warning: passing argument 2 of ‘gtk_window_set_icon’ makes pointer from integer without a cast [enabled by default]
In file included from /usr/include/gtk-2.0/gtk/gtkdialog.h:35:0,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from main.c:31:
/usr/include/gtk-2.0/gtk/gtkwindow.h:285:12: note: expected ‘struct GdkPixbuf *’ but argument is of type ‘int’
void gtk_window_set_icon (GtkWindow *window,
^
main.c: In function ‘show_actions_menu’:
main.c:510:12: warning: variable ‘fread_return’ set but not used [-Wunused-but-set-variable]
size_t fread_return;
^
main.c: In function ‘underline_match’:
main.c:619:3: warning: passing argument 1 of ‘gtk_label_set_attributes’ from incompatible pointer type [enabled by default]
gtk_label_set_attributes (gtk_label, attr_list);
^
In file included from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:38:0,
from /usr/include/gtk-2.0/gtk/gtk.h:35,
from main.c:31:
/usr/include/gtk-2.0/gtk/gtklabel.h:115:23: note: expected ‘struct GtkLabel *’ but argument is of type ‘struct GtkWidget *’
void gtk_label_set_attributes (GtkLabel label,
^
main.c: In function ‘selected_by_input’:
main.c:642:3: warning: passing argument 1 of ‘gtk_container_get_children’ from incompatible pointer type [enabled by default]
GList
element = gtk_container_get_children(menu);
^
In file included from /usr/include/gtk-2.0/gtk/gtkbin.h:35:0,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from main.c:31:
/usr/include/gtk-2.0/gtk/gtkcontainer.h:133:10: note: expected ‘struct GtkContainer *’ but argument is of type ‘struct GtkMenuShell
GList
gtk_container_get_children (GtkContainer *container);
^
main.c:661:7: warning: passing argument 1 of ‘gtk_widget_set_sensitive’ from incompatible pointer type [enabled by default]
gtk_widget_set_sensitive(menu_item, true);
^
In file included from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35:0,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from main.c:31:
/usr/include/gtk-2.0/gtk/gtkwidget.h:964:23: note: expected ‘struct GtkWidget *’ but argument is of type ‘struct GtkMenuItem *’
void gtk_widget_set_sensitive (GtkWidget *widget,
^
main.c:663:7: warning: passing argument 1 of ‘gtk_widget_set_sensitive’ from incompatible pointer type [enabled by default]
gtk_widget_set_sensitive(menu_item, false);
^
In file included from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35:0,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from main.c:31:
/usr/include/gtk-2.0/gtk/gtkwidget.h:964:23: note: expected ‘struct GtkWidget *’ but argument is of type ‘struct GtkMenuItem *’
void gtk_widget_set_sensitive (GtkWidget *widget,
^
main.c:671:2: warning: passing argument 2 of ‘gtk_menu_shell_select_item’ from incompatible pointer type [enabled by default]
gtk_menu_shell_select_item(menu, first_match);
^
In file included from /usr/include/gtk-2.0/gtk/gtkmenu.h:36:0,
from /usr/include/gtk-2.0/gtk/gtklabel.h:36,
from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:38,
from /usr/include/gtk-2.0/gtk/gtk.h:35,
from main.c:31:
/usr/include/gtk-2.0/gtk/gtkmenushell.h:109:7: note: expected ‘struct GtkWidget *’ but argument is of type ‘struct GtkMenuItem *’
void gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
^
main.c: In function ‘selected_by_digit’:
main.c:723:2: warning: passing argument 1 of ‘gtk_widget_destroy’ discards ‘const’ qualifier from pointer target type [enabled by default]
gtk_widget_destroy(history_menu);
^
In file included from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35:0,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from main.c:31:
/usr/include/gtk-2.0/gtk/gtkwidget.h:837:9: note: expected ‘struct GtkWidget *’ but argument is of type ‘const struct GtkWidget *’
void gtk_widget_destroy (GtkWidget *widget);
^
main.c: In function ‘main’:
main.c:1140:2: warning: implicit declaration of function ‘init_history_timeout_timer’ [-Wimplicit-function-declaration]
init_history_timeout_timer();
^
make[2]: *** [main.o] Error 1
make[2]: Leaving directory /home/nmanos/automation/ClipIt/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /home/nmanos/automation/ClipIt'
make: *** [all] Error 2
[nmanos@nmanos ClipIt]$

@glitsj16
Copy link

@manosnoam I encountered the same issue on Arch Linux. The GTK2 codebase seems to have been abandoned. Or at least isn't building properly any longer (which is why the AUR still carries 1.4.3 by the way). Using the --with-gtk3 configure flag made this go away and resulted in a succesful build for me, although the older GTK2 version works a lot better IMHO. Maybe worth a shot until this gets answered/fixed properly by a developer here.

Regards

@mananaBanana
Copy link
Contributor

Hey, I am running into the same error on Ubuntu 16.04. I have also tried to compile with --with-gtk3 and that fails as well. I seem to have fairly recent versions of both.

||/ Name                           Version              Architecture         Description
+++-==============================-====================-====================-==================================================================
ii  libgtk-3-0:amd64               3.18.9-1ubuntu3.3    amd64                GTK+ graphical user interface library
ii  libgtk2.0-0:amd64              2.24.30-1ubuntu1.16. amd64                GTK+ graphical user interface library

Any other alternatives?

@manosnoam
Copy link
Author

Hi,
Just checked it now, compiling with gtk3 seems to work:

$ sudo yum install gtk3-devel.x86_64
$ ./configure --with-gtk3
$ make
$ sudo make install

[nmanos@nmanos ClipIt]$ make
make  all-recursive
make[1]: Entering directory `/home/nmanos/automation/ClipIt'
Making all in data
make[2]: Entering directory `/home/nmanos/automation/ClipIt/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nmanos/automation/ClipIt/data'
Making all in doc
make[2]: Entering directory `/home/nmanos/automation/ClipIt/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nmanos/automation/ClipIt/doc'
Making all in src
make[2]: Entering directory `/home/nmanos/automation/ClipIt/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nmanos/automation/ClipIt/src'
Making all in po
make[2]: Entering directory `/home/nmanos/automation/ClipIt/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nmanos/automation/ClipIt/po'
make[2]: Entering directory `/home/nmanos/automation/ClipIt'
make[2]: Leaving directory `/home/nmanos/automation/ClipIt'
make[1]: Leaving directory `/home/nmanos/automation/ClipIt'
[nmanos@nmanos ClipIt]$ sudo make install
Making install in data
make[1]: Entering directory `/home/nmanos/automation/ClipIt/data'
make[2]: Entering directory `/home/nmanos/automation/ClipIt/data'
make[2]: Nothing to be done for `install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/etc/xdg/autostart'
 /usr/bin/install -c -m 644 clipit-startup.desktop '/usr/local/etc/xdg/autostart'
 /usr/bin/mkdir -p '/usr/local/share/applications'
 /usr/bin/install -c -m 644 clipit.desktop '/usr/local/share/applications'
 /usr/bin/mkdir -p '/usr/local/share/icons/hicolor/scalable/apps'
 /usr/bin/install -c -m 644 clipit-trayicon.svg clipit-trayicon-offline.svg '/usr/local/share/icons/hicolor/scalable/apps'
make[2]: Leaving directory `/home/nmanos/automation/ClipIt/data'
make[1]: Leaving directory `/home/nmanos/automation/ClipIt/data'
Making install in doc
make[1]: Entering directory `/home/nmanos/automation/ClipIt/doc'
make[2]: Entering directory `/home/nmanos/automation/ClipIt/doc'
make[2]: Nothing to be done for `install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 clipit.1 '/usr/local/share/man/man1'
make[2]: Leaving directory `/home/nmanos/automation/ClipIt/doc'
make[1]: Leaving directory `/home/nmanos/automation/ClipIt/doc'
Making install in src
make[1]: Entering directory `/home/nmanos/automation/ClipIt/src'
make[2]: Entering directory `/home/nmanos/automation/ClipIt/src'
 /usr/bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c clipit '/usr/local/bin'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/nmanos/automation/ClipIt/src'
make[1]: Leaving directory `/home/nmanos/automation/ClipIt/src'
Making install in po
make[1]: Entering directory `/home/nmanos/automation/ClipIt/po'
linguas="ca cs da de es es_ES et fr hr hu it ja nb pl pl pt_BR ro ru sv tr zh_CN "; \
for lang in $linguas; do \
  dir=/usr/local/share/locale/$lang/LC_MESSAGES; \
  /bin/sh /home/nmanos/automation/ClipIt/install-sh -d $dir; \
  if test -r $lang.gmo; then \
    /usr/bin/install -c -m 644 $lang.gmo $dir/clipit.mo; \
    echo "installing $lang.gmo as $dir/clipit.mo"; \
  else \
    /usr/bin/install -c -m 644 ./$lang.gmo $dir/clipit.mo; \
    echo "installing ./$lang.gmo as" \
	 "$dir/clipit.mo"; \
  fi; \
  if test -r $lang.gmo.m; then \
    /usr/bin/install -c -m 644 $lang.gmo.m $dir/clipit.mo.m; \
    echo "installing $lang.gmo.m as $dir/clipit.mo.m"; \
  else \
    if test -r ./$lang.gmo.m ; then \
      /usr/bin/install -c -m 644 ./$lang.gmo.m \
	$dir/clipit.mo.m; \
      echo "installing ./$lang.gmo.m as" \
	   "$dir/clipit.mo.m"; \
    else \
      true; \
    fi; \
  fi; \
done
installing ca.gmo as /usr/local/share/locale/ca/LC_MESSAGES/clipit.mo
installing cs.gmo as /usr/local/share/locale/cs/LC_MESSAGES/clipit.mo
installing da.gmo as /usr/local/share/locale/da/LC_MESSAGES/clipit.mo
installing de.gmo as /usr/local/share/locale/de/LC_MESSAGES/clipit.mo
installing es.gmo as /usr/local/share/locale/es/LC_MESSAGES/clipit.mo
installing es_ES.gmo as /usr/local/share/locale/es_ES/LC_MESSAGES/clipit.mo
installing et.gmo as /usr/local/share/locale/et/LC_MESSAGES/clipit.mo
installing fr.gmo as /usr/local/share/locale/fr/LC_MESSAGES/clipit.mo
installing hr.gmo as /usr/local/share/locale/hr/LC_MESSAGES/clipit.mo
installing hu.gmo as /usr/local/share/locale/hu/LC_MESSAGES/clipit.mo
installing it.gmo as /usr/local/share/locale/it/LC_MESSAGES/clipit.mo
installing ja.gmo as /usr/local/share/locale/ja/LC_MESSAGES/clipit.mo
installing nb.gmo as /usr/local/share/locale/nb/LC_MESSAGES/clipit.mo
installing pl.gmo as /usr/local/share/locale/pl/LC_MESSAGES/clipit.mo
installing pl.gmo as /usr/local/share/locale/pl/LC_MESSAGES/clipit.mo
installing pt_BR.gmo as /usr/local/share/locale/pt_BR/LC_MESSAGES/clipit.mo
installing ro.gmo as /usr/local/share/locale/ro/LC_MESSAGES/clipit.mo
installing ru.gmo as /usr/local/share/locale/ru/LC_MESSAGES/clipit.mo
installing sv.gmo as /usr/local/share/locale/sv/LC_MESSAGES/clipit.mo
installing tr.gmo as /usr/local/share/locale/tr/LC_MESSAGES/clipit.mo
installing zh_CN.gmo as /usr/local/share/locale/zh_CN/LC_MESSAGES/clipit.mo
make[1]: Leaving directory `/home/nmanos/automation/ClipIt/po'
make[1]: Entering directory `/home/nmanos/automation/ClipIt'
make[2]: Entering directory `/home/nmanos/automation/ClipIt'
make[2]: Nothing to be done for `install-exec-am'.
make  install-data-hook
make[3]: Entering directory `/home/nmanos/automation/ClipIt'
Updating Gtk icon cache.
gtk-update-icon-cache: Cache file created successfully.
make[3]: Leaving directory `/home/nmanos/automation/ClipIt'
make[2]: Leaving directory `/home/nmanos/automation/ClipIt'
make[1]: Leaving directory `/home/nmanos/automation/ClipIt'

@mananaBanana
Copy link
Contributor

./configure --with-gtk3 is failing with:

...
checking for GTK... no
configure: error: Package requirements (gtk+-3.0) were not met:

No package 'gtk+-3.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

The GTK version is libgtk-3-0:amd64 3.18.9-1ubuntu3.3 on my terminal

@manosnoam
Copy link
Author

You need to install gtk3-devel.x86_64. On CentOS / RHEL:
sudo yum install gtk3-devel.x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants