Compile xfce4-timer-plugin

Dani dani at damufo.com
Sat Apr 29 12:24:01 CEST 2017


Hello

Dani

On 29/04/17 01:39, Matthew Brush wrote:
> On 2017-04-28 03:31 PM, Dani wrote:
>> Hello:
>>
>> I would like to port the xfce4-timer-plugin to gtk3.
>>
>> I have never done this, in fact I have never done things with gtk (so I
>> learn).
>>
>> For this I have changed in the file configure.in.in the gtk version to:
>>
>> XDT_CHECK_PACKAGE ([GTK], [gtk + -3.0], [3.18.9])
>>
>
> That shouldn't work with spaces around the +
It does not have them, I think it was copying
This is my line 43 in configure.in.in
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.18.9])


Another thing

When I execute ./autogen.sh

The file, makefile, on line 266 (Refers to gtk2)

LIBXFCE4PANEL_CFLAGS = -pthread -I/usr/include/xfce4/libxfce4panel-1.0 
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include 
-I/usr/include/gio-unix-2.0/ -I/usr/include/cairo 
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pixman-1 -I/usr/include/libpng12 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/xfce4 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include

Is this correct?

I have to change something more in autogen.sh or configure.in.in or 
another file?

>
>> After I've tried compiling, first exxecute
>> ./autogen
>> This seems to work
>> I then execute
>> Make
>> Which gives the following error:
>>
>> /usr/include/xfce4/libxfce4panel-1.0/libxfce4panel/xfce-panel-macros-46.h:431:48: 
>>
>> warning: passing argument 1 of 'gtk_widget_get_realized' from
>> incompatible pointer type [-Wincompatible-pointer-types]
>> G_return_if_fail (gtk_widget_get_realized (plug)); \
>> ...
>>
>
> What is the ... part?
>
> There's no G_return_if_fail macro AFAIK, and there's not enough 
> information above to tell the problem, compiler should give more 
> context like "note: in expansion of macro here" or such.
>

Sorry, this is de full message:

$ make
make  all-recursive
make[1]: Entering directory 
'/home/usuario/pro_linux_c/xfce4-timer-plugin_meu_gtk3'
Making all in src
make[2]: Entering directory 
'/home/usuario/pro_linux_c/xfce4-timer-plugin_meu_gtk3/src'
gcc -DHAVE_CONFIG_H -I. -I..    -I.. -pthread 
-I/usr/include/xfce4/libxfce4ui-1 -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/xfce4 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/include/xfce4 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread 
-I/usr/include/xfce4/libxfce4panel-1.0 -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/xfce4 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" -g -O2 -MT 
xfce4_timer-xfcetimer.o -MD -MP -MF .deps/xfce4_timer-xfcetimer.Tpo -c 
-o xfce4_timer-xfcetimer.o `test -f 'xfcetimer.c' || echo './'`xfcetimer.c
In file included from 
/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
                  from /usr/include/glib-2.0/glib/gtypes.h:32,
                  from /usr/include/glib-2.0/glib/galloca.h:32,
                  from /usr/include/glib-2.0/glib.h:30,
                  from /usr/include/glib-2.0/gobject/gbinding.h:28,
                  from /usr/include/glib-2.0/glib-object.h:23,
                  from /usr/include/glib-2.0/gio/gioenums.h:28,
                  from /usr/include/glib-2.0/gio/giotypes.h:28,
                  from /usr/include/glib-2.0/gio/gio.h:26,
                  from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                  from /usr/include/gtk-2.0/gdk/gdk.h:32,
                  from /usr/include/gtk-2.0/gtk/gtk.h:32,
                  from xfcetimer.c:38:
xfcetimer.c: In function ‘_xpp_realize’:
/usr/include/xfce4/libxfce4panel-1.0/libxfce4panel/xfce-panel-macros-46.h:431:48: 
warning: passing argument 1 of ‘gtk_widget_get_realized’ from 
incompatible pointer type [-Wincompatible-pointer-types]
      g_return_if_fail (gtk_widget_get_realized (plug)); \
                                                 ^
/usr/include/glib-2.0/glib/gmacros.h:370:8: note: in definition of macro 
‘_G_BOOLEAN_EXPR’
     if (expr)                                    \
         ^
/usr/include/glib-2.0/glib/gmessages.h:368:9: note: in expansion of 
macro ‘G_LIKELY’
       if G_LIKELY(expr) { } else            \
          ^
/usr/include/xfce4/libxfce4panel-1.0/libxfce4panel/xfce-panel-macros-46.h:431:5: 
note: in expansion of macro ‘g_return_if_fail’
      g_return_if_fail (gtk_widget_get_realized (plug)); \
      ^
/usr/include/xfce4/libxfce4panel-1.0/libxfce4panel/xfce-panel-macros-46.h:221:5: 
note: in expansion of macro ‘XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL’
      XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL (construct_func, NULL, NULL)
      ^
xfcetimer.c:61:1: note: in expansion of macro 
‘XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL’
  XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(create_plugin_control);
  ^
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 xfcetimer.c:38:
/usr/include/gtk-2.0/gtk/gtkwidget.h:981:23: note: expected ‘GtkWidget * 
{aka struct _GtkWidget *}’ but argument is of type ‘GtkPlug * {aka 
struct _GtkPlug *}’
  gboolean              gtk_widget_get_realized (GtkWidget    *widget);
                        ^
xfcetimer.c: In function ‘update_function’:
xfcetimer.c:194:37: warning: format not a string literal and no format 
arguments [-Wformat-security]
                                      GTK_BUTTONS_NONE, dialog_message);
                                      ^
xfcetimer.c: In function ‘load_settings’:
xfcetimer.c:1187:11: warning: implicit declaration of function 
‘g_sprintf’ [-Wimplicit-function-declaration]
            g_sprintf(groupname,"G0");
            ^
xfcetimer.c: In function ‘plugin_create_options’:
xfcetimer.c:1615:13: warning: implicit declaration of function 
‘gtk_button_box_new’ [-Wimplicit-function-declaration]
    buttonbox=gtk_button_box_new(GTK_ORIENTATION_VERTICAL);
              ^
xfcetimer.c:1615:12: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
    buttonbox=gtk_button_box_new(GTK_ORIENTATION_VERTICAL);
             ^
mv -f .deps/xfce4_timer-xfcetimer.Tpo .deps/xfce4_timer-xfcetimer.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc -I.. -pthread 
-I/usr/include/xfce4/libxfce4ui-1 -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/xfce4 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/include/xfce4 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread 
-I/usr/include/xfce4/libxfce4panel-1.0 -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/xfce4 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" -g -O2 -lxfce4panel-1.0 
-lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo 
-lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 
-lfontconfig -lfreetype -Wl,--export-dynamic -lgmodule-2.0 -pthread 
-lxfce4util -lglib-2.0 -lxfce4util -lglib-2.0 -lxfce4ui-1 -lgtk-x11-2.0 
-lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 
-lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig 
-lfreetype -lxfce4util -lglib-2.0  -o xfce4-timer xfce4_timer-xfcetimer.o
libtool: link: gcc -I.. -pthread -I/usr/include/xfce4/libxfce4ui-1 
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include 
-I/usr/include/gio-unix-2.0/ -I/usr/include/cairo 
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pixman-1 -I/usr/include/libpng12 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/xfce4 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/include/xfce4 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread 
-I/usr/include/xfce4/libxfce4panel-1.0 -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/xfce4 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" -g -O2 
-Wl,--export-dynamic -pthread -o xfce4-timer xfce4_timer-xfcetimer.o  
-lxfce4panel-1.0 -lgmodule-2.0 -lxfce4ui-1 -lgtk-x11-2.0 -lgdk-x11-2.0 
-lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 
-lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig 
/usr/lib/x86_64-linux-gnu/libfreetype.so -lxfce4util -lglib-2.0 -pthread
xfce4_timer-xfcetimer.o: In function `plugin_create_options':
/home/usuario/pro_linux_c/xfce4-timer-plugin_meu_gtk3/src/xfcetimer.c:1615: 
undefined reference to `gtk_button_box_new'
collect2: error: ld returned 1 exit status
Makefile:514: recipe for target 'xfce4-timer' failed
make[2]: *** [xfce4-timer] Error 1
make[2]: Leaving directory 
'/home/usuario/pro_linux_c/xfce4-timer-plugin_meu_gtk3/src'
Makefile:471: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
'/home/usuario/pro_linux_c/xfce4-timer-plugin_meu_gtk3'
Makefile:403: recipe for target 'all' failed
make: *** [all] Error 2


>> This is where I get the doubt:
>> Can I compile the xfce4-timer-plugin with gtk3 in my ubuntu 16.04?
>> Is there any documentation on how to do this?
>>
>
> If it's not ported yet, it probably won't compile, but if your goal is 
> porting it to GTK+3, then the first step is getting it to build by 
> resolving all the errors you find, which it sounds like you're 
> starting in the right direction.
>
Very thanks!


> Regards,
> Matthew Brush
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20170429/38db2ad8/attachment.html>


More information about the Xfce4-dev mailing list