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

Compile Error LSP plugin #1409

Closed
killermoehre opened this issue Feb 5, 2025 · 6 comments · May be fixed by #1411
Closed

Compile Error LSP plugin #1409

killermoehre opened this issue Feb 5, 2025 · 6 comments · May be fixed by #1411

Comments

@killermoehre
Copy link

Trying to compile the lsp-plugin I get the following error message.

Making all in lsp
make[2]: Entering directory '/home/knizek/.cache/yay/geany-plugins-git/src/geany-plugins/lsp'
Making all in deps
make[3]: Entering directory '/home/knizek/.cache/yay/geany-plugins-git/src/geany-plugins/lsp/deps'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/knizek/.cache/yay/geany-plugins-git/src/geany-plugins/lsp/deps'
Making all in src
make[3]: Entering directory '/home/knizek/.cache/yay/geany-plugins-git/src/geany-plugins/lsp/src'
  CC       lsp_la-lsp-autocomplete.lo
  CC       lsp_la-lsp-goto-anywhere.lo
  CC       lsp_la-lsp-goto.lo
  CC       lsp_la-lsp-goto-panel.lo
In file included from lsp-goto-panel.c:29:
lsp-symbol-kinds.h:146:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  146 | TMIcon lsp_symbol_kinds_get_completion_icon(LspCompletionKind kind);
      | ^~~~~~
      | GIcon
In file included from lsp-autocomplete.c:27:
lsp-symbol-kinds.h:146:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  146 | TMIcon lsp_symbol_kinds_get_completion_icon(LspCompletionKind kind);
      | ^~~~~~
      | GIcon
In file included from lsp-symbol.h:22,
                 from lsp-goto.c:27:
lsp-symbol-kinds.h:146:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  146 | TMIcon lsp_symbol_kinds_get_completion_icon(LspCompletionKind kind);
      | ^~~~~~
      | GIcon
lsp-symbol-kinds.h:147:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  147 | TMIcon lsp_symbol_kinds_get_symbol_icon(LspSymbolKind kind);
      | ^~~~~~
      | GIcon
lsp-symbol-kinds.h:147:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  147 | TMIcon lsp_symbol_kinds_get_symbol_icon(LspSymbolKind kind);
      | ^~~~~~
      | GIcon
In file included from lsp-symbol.h:22,
                 from lsp-goto-anywhere.c:27:
lsp-symbol-kinds.h:146:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  146 | TMIcon lsp_symbol_kinds_get_completion_icon(LspCompletionKind kind);
      | ^~~~~~
      | GIcon
lsp-symbol-kinds.h:147:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  147 | TMIcon lsp_symbol_kinds_get_symbol_icon(LspSymbolKind kind);
      | ^~~~~~
      | GIcon
lsp-symbol-kinds.h:147:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
  147 | TMIcon lsp_symbol_kinds_get_symbol_icon(LspSymbolKind kind);
      | ^~~~~~
      | GIcon
lsp-symbol.h:45:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
   45 | TMIcon lsp_symbol_get_icon(const LspSymbol *sym);
      | ^~~~~~
      | GIcon
lsp-symbol.h:45:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
   45 | TMIcon lsp_symbol_get_icon(const LspSymbol *sym);
      | ^~~~~~
      | GIcon
lsp-goto-anywhere.c: In function 'goto_line':
lsp-goto-anywhere.c:82:17: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
   82 |                 TMIcon icon = TM_ICON_OTHER;
      |                 ^~~~~~
      |                 GIcon
In file included from lsp-goto-panel.c:31:
lsp-symbol.h:45:1: error: unknown type name 'TMIcon'; did you mean 'GIcon'?
   45 | TMIcon lsp_symbol_get_icon(const LspSymbol *sym);
      | ^~~~~~
      | GIcon
make[3]: *** [Makefile:812: lsp_la-lsp-autocomplete.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
lsp-goto-anywhere.c:82:31: error: 'TM_ICON_OTHER' undeclared (first use in this function)
   82 |                 TMIcon icon = TM_ICON_OTHER;
      |                               ^~~~~~~~~~~~~
lsp-goto-anywhere.c:82:31: note: each undeclared identifier is reported only once for each function it appears in
lsp-goto.c: In function 'goto_cb':
lsp-goto.c:215:65: error: 'TM_ICON_OTHER' undeclared (first use in this function)
  215 |                                                                 TM_ICON_OTHER);
      |                                                                 ^~~~~~~~~~~~~
lsp-goto.c:215:65: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [Makefile:861: lsp_la-lsp-goto.lo] Error 1
lsp-goto-panel.c: In function 'lsp_goto_panel_fill':
lsp-goto-panel.c:169:35: error: implicit declaration of function 'symbols_get_icon_pixbuf'; did you mean 'gtk_entry_get_icon_pixbuf'? [-Wimplicit-function-declaration]
  169 |                         COL_ICON, symbols_get_icon_pixbuf(lsp_symbol_get_icon(sym)),
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~
      |                                   gtk_entry_get_icon_pixbuf
make[3]: *** [Makefile:868: lsp_la-lsp-goto-panel.lo] Error 1
lsp-goto-anywhere.c: In function 'goto_file':
lsp-goto-anywhere.c:152:75: error: 'TM_ICON_OTHER' undeclared (first use in this function)
  152 |                 sym = lsp_symbol_new(name, "", "", file_name, 0, 0, 0, 0, TM_ICON_OTHER);
      |                                                                           ^~~~~~~~~~~~~
make[3]: *** [Makefile:854: lsp_la-lsp-goto-anywhere.lo] Error 1

I did a

./autogen.sh --prefix=/usr \
               --sbindir=/usr/bin \
               --libexecdir=/usr/lib \
               --sysconfdir=/etc \
               --localstatedir=/var \
               --runstatedir=/run
make

What compile environment information do you need?

@b4n
Copy link
Member

b4n commented Feb 5, 2025

You probably need a newer version of Geany

@killermoehre
Copy link
Author

You're right. Thanks for the hint.

@b4n
Copy link
Member

b4n commented Feb 5, 2025

@techee the version dependency might need updating 😉

@b4n b4n added the plugin/lsp label Feb 5, 2025
@techee
Copy link
Member

techee commented Feb 5, 2025

@techee the version dependency might need updating 😉

What should I do exactly? Should I update it globally for all the plugins in

GP_CHECK_GEANY(2.0)

@b4n
Copy link
Member

b4n commented Feb 5, 2025

@techee looks like that's what has been done lately, but check with @eht16 and @frlan what they think about interdep.

Otherwise, you probably can do something like that:

diff --git a/build/lsp.m4 b/build/lsp.m4
index d4c65c79..8c352ac7 100644
--- a/build/lsp.m4
+++ b/build/lsp.m4
@@ -2,6 +2,10 @@ AC_DEFUN([GP_CHECK_LSP],
 [
     GP_ARG_DISABLE([LSP], [auto])
 
+    GP_GEANY_PKG_CONFIG_PATH_PUSH
+    GP_CHECK_PLUGIN_DEPS([LSP], [LSP], [geany >= 2.1])
+    GP_GEANY_PKG_CONFIG_PATH_POP
+
     JSON_GLIB_PACKAGE_NAME=json-glib-1.0
     JSON_GLIB_VERSION=1.10
     JSONRPC_GLIB_PACKAGE_NAME=jsonrpc-glib-1.0

eht16 added a commit to eht16/geany-plugins that referenced this issue Feb 8, 2025
Geany-LSP requires 2.1.

Closes geany#1409.
@eht16
Copy link
Member

eht16 commented Feb 8, 2025

I think we can also increase the Geany version requirement in G-P already, it doesn't make much difference doing now or before the release.

See #1411.

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

Successfully merging a pull request may close this issue.

4 participants