Skip to content

wayfire-plugin meson libdir can be incorrect (Ubuntu 24.04) #3124

Description

@dkondor

Wayfire version

0.12 (latest git)

GPU / Driver

Not relevant

Describe the bug

I'm trying out the new wayfire-plugin command with my plugins, but ran into some problems. Specifically, I'm trying to follow the instructions here to adjust the build of a plugin.

To Reproduce

Steps to reproduce the behavior:

  1. Write a simple plugin that uses meson
  2. Use the recommended command to install, e.g.
scale_ipc_filter_lib = shared_module('scale_ipc_filter', sources,
    dependencies: [wayfire],
    install: true,
    install_dir: get_option('prefix') / get_option('libdir') / 'wayfire',
    cpp_args: ['-Wno-unused-parameter', '-Wno-format-security','-DWAYFIRE_PLUGIN'],
    link_args: '-rdynamic')
  1. Plugin gets installed under: ~/.local/share/wayfire/plugin-manager/install/lib/x86_64-linux-gnu/wayfire/
  2. Wayfire cannot load it as it is looking for plugins under ~/.local/share/wayfire/plugin-manager/install/lib/wayfire -- see here

Note: the plugin shows up as correctly installed with wayfire-plugin:

wayfire-plugin list
wayfire-scale-ipc: 0.12.0 ABI 20260801

Expected behavior

Wayfire can find and load the plugin.

Apparently, on Ubuntu (and I assume Debian as well), get_option('libdir') expands to lib/x86_64-linux-gnu by default. Everything works as expected if I change the meson install command to include:

install_dir: get_option('prefix') / 'lib' / 'wayfire',

I suggest to either:

  • update the doc to suggest using 'lib' as that is where Wayfire will look for (and there does not seems to be a downside of a hardcoded path, since this is a directory only used by Wayfire)
  • change the path discovery to use the "libdir" that meson does via config.h (that now only contains a full path to system plugins)

Let me know which solution is preferred, and I can create a PR.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions