README missing documentation on build tools and dependencies
Running ./autogen.sh in a freshly cloned copy of geany-plugins, on an Ubuntu 24.04.2 LTS machine with Automake, Autoconf and Autopoint installed, fails with the following output:
~/projects/geany-plugins$ ./autogen.sh
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: running: autopoint --force
Copying file ABOUT-NLS
Copying file po/Makefile.in.in
Copying file po/Makevars.template
Copying file po/Rules-quot
Copying file po/boldquot.sed
Copying file po/[email protected]
Copying file po/[email protected]
Copying file po/insert-header.sin
Copying file po/quot.sed
Copying file po/remove-potcdate.sin
autoreconf: running: aclocal --force -I build/cache -I build -I build/bundled
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /usr/bin/autoconf --force
configure.ac:16: warning: The macro `AC_PROG_CC_C99' is obsolete.
configure.ac:16: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
configure.ac:16: the top level
configure.ac:27: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
build/geany.m4:31: GP_CHECK_GEANY is expanded from...
configure.ac:27: the top level
configure.ac:27: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
build/geany.m4:1: _GP_GEANY_LIBDIR is expanded from...
build/geany.m4:16: GP_GEANY_PKG_CONFIG_PATH_PUSH is expanded from...
build/geany.m4:31: GP_CHECK_GEANY is expanded from...
configure.ac:27: the top level
configure.ac:29: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
build/gtk.m4:4: GP_CHECK_GTK_VERSION is expanded from...
configure.ac:29: the top level
configure.ac:30: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
build/compat.m4:8: PKG_CHECK_VAR is expanded from...
build/cppcheck.m4:3: GP_CHECK_CPPCHECK is expanded from...
configure.ac:30: the top level
configure:8537: error: possibly undefined macro: AM_CONDITIONAL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:8984: error: possibly undefined macro: m4_tolower
configure:8984: error: possibly undefined macro: AS_TR_SH
autoreconf: error: /usr/bin/autoconf failed with exit status: 1
I might be missing some dependencies or have forgotten some required step, but I was simply following the build instructions in README – IMO if there are any dependencies or steps required before building, they should be documented there.
Installing pkg-config should solve this
- After installing pkgconf, configuring fails due to libtool being used but "LIBTOOL" being undefined.
- After installing libtool, configuring fails because the installed Geany package is version 2.0 rather than the expected 2.1.
- After checking out the 2.0 tag, configuring fails due to "AM_GLIB_GNU_GETTEXT" being undefined.
- After cherry-picking a10d86bd, configuring fails because it cannot find gtk+-3.0 and glib-2.0.
- Trying to install libgtk-3-dev and libglib2.0-dev fails with version conflicts in dependencies. Likely due to some libraries being installed from noble-updates but noble-updates being disabled atm.
I’m giving up for now. I shall pursue this further some other time.
I do think all of those dependencies should be documented in README, though.
After installing libtool, configuring fails because the installed Geany package is version 2.0 rather than the expected 2.1.
You need to complile Geany 2.1 before trying to compile plugins.
I do think all of those dependencies should be documented in README, though.
These are described in Geany dependencies - see
https://github.com/geany/geany/blob/1ee413b5612b9a2772a1648c7d209ff6c5806733/README#L55 https://github.com/geany/geany/blob/1ee413b5612b9a2772a1648c7d209ff6c5806733/README#L118
Anyway, since you are on Ubuntu and Geany is packaged for Ubuntu, you can get all the build dependencies by
sudo apt build-dep geany
sudo apt build-dep geany-plugin-vimode
You need to complile Geany 2.1 before trying to compile plugins.
These are described in Geany dependencies
… Ah.
It may be obvious to you as developers that compiling Geany plugins requires the same dependencies as Geany itself, but this was not clear to me, since – again – the README of this repo does not say anything about this. Especially since it says that building plugins on their own without building Geany is possible.
I think README should have a section that documents what is actually needed for building, or at least link to the section in Geany’s README. I guess I could even do this myself with a PR – would that be appreciated?
I think README should have a section that documents what is actually needed for building, or at least link to the section in Geany’s README. I guess I could even do this myself with a PR – would that be appreciated?
That would be much appreciated. Try to keep it distribution agnostic, maybe use https://github.com/geany/geany?tab=readme-ov-file#installation-from-sources as orientation.
or at least link to the section in Geany’s README.
IMO this would be a better solution since the instructions are identical and it means it has to be updated at one place only if something changes.