Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-05-27 21:56:00

AndyJ
Member
Registered: 2023-05-27
Posts: 7

[SOLVED] Need help getting started with panel plugin development

I'm looking for some Xfce development help but couldn't find a development-specific forum. I'm hoping someone here can help or direct me to a suitable forum.

I'm trying to build the Xfce sample plugin under Debian 11, but getting errors. I'm new to Xfce and Gtk programming, though I have experience programming in other environments. Here's what I've done so far:
Installed:

  • build-essential

  • xfce4-dev-tools

  • libglib2.0-dev

Downloaded the plugin source:

git clone https://gitlab.xfce.org/panel-plugins/xfce4-sample-plugin

When I then ran

./autogen.sh

I got the following:

Preparing package directory /home/andrew/programming/xfce/xfce4-sample-plugin...
Creating /home/andrew/programming/xfce/xfce4-sample-plugin/aclocal.m4...
Running glib-gettextize --force --copy...
Copying file po/Makefile.in.in

Please add the files
  codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
  progtest.m4
from the /usr/share/aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.gnu.org/pub/gnu/config/.

Patching file 'po/Makefile.in.in'
Running libtoolize --force --copy...
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
Running aclocal -I /usr/share/aclocal -I /home/andrew/programming/xfce/xfce4-sample-plugin/m4...
Running autoheader...
Running automake --force-missing --add-missing --copy --gnu...
configure.ac:33: installing './compile'
configure.ac:33: installing './config.guess'
configure.ac:55: error: required file './config.rpath' not found
configure.ac:33: installing './config.sub'
configure.ac:24: installing './install-sh'
configure.ac:24: installing './missing'
panel-plugin/Makefile.am: installing './depcomp'

This is where I get stuck. I see an error in the above list, and also an instruction to add some files from the /usr/share/aclocal directory my your autoconf macro directory, but (a) some of the listed files are not in my /usr/share/aclocal directory and (b) I don't know which directory "your autoconf macro directory" refers to. Furthermore, if I just plough on regardless and run 'make' I get

make: *** No targets specified and no makefile found.  Stop.

Can anyone advise?

Last edited by AndyJ (2023-05-28 19:51:14)

Offline

#2 2023-05-28 00:51:26

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,063

Re: [SOLVED] Need help getting started with panel plugin development

Hello and welcome.

It doesn't build for me either on bullseye, but it does build on Arch. I think the reason is related to the version of autoconf (2.69 vs 2.71). There is probably some discrepancy between the git version of the plugin and the autoconf version. You may wish to follow up with creating a bug report for this.

As a workaround, you can download this version and install it via:

./configure --prefix=/usr

You'll need to install libxfce4panel-2-dev and libxfce4ui-2-dev for it to compile.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-05-28 07:36:38

Tamaranch
Member
Registered: 2020-12-31
Posts: 279

Re: [SOLVED] Need help getting started with panel plugin development

xfce4-dev-tools 4.17.0 is required, fixed: https://gitlab.xfce.org/panel-plugins/x … 62e42b3098

Offline

#4 2023-05-28 10:07:46

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,063

Re: [SOLVED] Need help getting started with panel plugin development

Thanks. Works now.

To @AndyJ, you need to also make sure that you install xsltproc and gtk-doc-tools to build xfce4-dev-tools, and autopoint to build the sample-plugin. Note: uninstall the packaged xfce4-dev-tools before building and installing the newer xfce4-dev-tools.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2023-05-28 14:58:46

AndyJ
Member
Registered: 2023-05-27
Posts: 7

Re: [SOLVED] Need help getting started with panel plugin development

Thank you all for your help.  I've got further but am still stuck, I'm afraid. I started again (I'm using a VM so I can roll back easier an don't mess up my main install).

I installed libglib2.0-dev, xsltproc, and gtk-doc-tools. autopoint was already installed

I downloaded: xfce4-dev-tools-4.17.2.tar.bz2

I unpacked it, changed to the directory and did:

./configure
make

as my normal user, then as root did:

make install

All seemed to run correctly.

I then had another go at building the sample plugin. This time ./autogen.sh gets a lot further but fails with:

checking where the gettext function comes from... libc
./configure: line 15153: syntax error near unexpected token `XDT_CHECK_PACKAGE'
./configure: line 15153: `XDT_CHECK_PACKAGE(GLIB, glib-2.0, 2.66.0)'

I'm guessing XDT refers to Xfce4 Developer Tools - have I still not installed it correctly?

Offline

#6 2023-05-28 15:04:38

Tamaranch
Member
Registered: 2020-12-31
Posts: 279

Re: [SOLVED] Need help getting started with panel plugin development

The simplest thing is to set /usr as prefix:

./configure --prefix=/usr

See also https://gitlab.xfce.org/xfce/xfce4-dev- … /issues/62

Offline

#7 2023-05-28 17:23:28

AndyJ
Member
Registered: 2023-05-27
Posts: 7

Re: [SOLVED] Need help getting started with panel plugin development

Thanks again. I've made further progress. I found (based on error messages) that I needed to install a number of other packages:

  • xorg-dev

  • libgtk-3-dev

  • libxfce4ui-2-dev

  • libxfce4panel-2.0-dev

Once these were installed, ./autogen.sh, make and make install all worked.
However, now that it's built, I'm not sure how to add it to the panel! I thought the "make install" step might add it to the list of items available to be added to the panel from the "Add new items..." menu, but I don't see it.

Edit: corrected "autoconf" to "autogen.sh"

Last edited by AndyJ (2023-05-28 19:28:50)

Offline

#8 2023-05-28 17:25:55

Tamaranch
Member
Registered: 2020-12-31
Posts: 279

Re: [SOLVED] Need help getting started with panel plugin development

Did you install the panel and its plugins under the same prefix?

Offline

#9 2023-05-28 18:53:30

AndyJ
Member
Registered: 2023-05-27
Posts: 7

Re: [SOLVED] Need help getting started with panel plugin development

I'm afraid I'm not really sure what you mean. The panel itself was installed when I installed Debian and chose the XFCE desktop.

Offline

#10 2023-05-28 19:01:15

Tamaranch
Member
Registered: 2020-12-31
Posts: 279

Re: [SOLVED] Need help getting started with panel plugin development

So you need to install the plugin under /usr as well, as above for xfce4-dev-tools. It should not be a problem for the dependencies though (xorg-dev, libgtk-3-dev, etc.)

Offline

#11 2023-05-28 19:45:46

AndyJ
Member
Registered: 2023-05-27
Posts: 7

Re: [SOLVED] Need help getting started with panel plugin development

Just for clarity - I assume that this means running these commands in the xfce4-sample-plugin directory?

./autogen.sh --prefix=/usr
make

and as root

make install

This appears to have worked - thank you. Previously, when building xfce4-dev-tools, the "--prefix=/usr' bit came after a './configure' command, but there is no './configure' command in the instructions for building the plugin - it starts with './autogen.sh'. I guessed that was where to put it and it seems to have worked, though I confess that at this stage I don't fully understand the significance. I'm guessing it's telling the './configure' and './autogen.sh' commands to put things in the '/usr' directory - is that right?

Anyway, thank you very much for your help. Now I can build this, I'm going to start studying the code to see how much of it I understand. It appears to me that perhaps I ought to learn something about 'gtk' before taking this much further though.

I'll mark this thread as 'Solved' and start a new topic if I need more help, thank you.

Last edited by AndyJ (2023-05-28 19:48:40)

Offline

#12 2023-05-28 20:36:04

Tamaranch
Member
Registered: 2020-12-31
Posts: 279

Re: [SOLVED] Need help getting started with panel plugin development

> I'm guessing it's telling the './configure' and './autogen.sh' commands to put things in the '/usr' directory - is that right?

Yes that's it, you can do

./configure --help

when configure has been generated.
For autogen.sh it's a bit more complicated since autoconf comes into play but the result is the same.
Basically all you can pass to configure can be passed upstream to autogen.sh.

Offline

Board footer

Powered by FluxBB