Temporary ABI incompatibility between plugins built for upstream rofi and rofi-wayland
Describe the bug
Plugins that are built for release rofi (1.7.5) are ABI incompatible with rofi-wayland (1.7.5+wayland2/3) until the next upstream release, resulting in runtime errors when attempting to run rofi with those plugins enabled (namely rofi-calc):
(process:124485): Rofi-WARNING **: 23:02:32.891: ABI version of plugin: 'calc.so' does not match: 00000006 expecting: 00000007
Those plugins need to be built against rofi-wayland instead of upstream rofi. This can be worked around in nixpkgs by overriding the rofi-unwrapped package in the plugin module:
(pkgs.rofi-calc.override {
rofi-unwrapped = rofi-wayland-unwrapped;
})
Steps To Reproduce
- Build rofi-wayland with rofi-calc plugin (overlay or home-manager)
- Execute
rofi -modes calc -show calcin terminal - Observe error message "Mode calc is not found." with above warning printed in terminal
Expected behavior
- Observe rofi-calc operating normally
Additional context
This is more a reference for those encountering the bug than an actionable issue.
The incompatibility should only last until the next rofi release, but something of this nature that requires different build inputs for plugins may occur again in the future considering that rofi-wayland strays behind upstream by design. In which case, anything that can be done through nixpkgs would be welcome, though home-manager seems like it would be the best place to handle that as it already exposes options for plugins.
Notify maintainers
rofi(-wayland): @bew rofi-calc: @luc65r @albakham
Metadata
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.8.0-zen1, NixOS, 24.05 (Uakari), 24.05.20240323.44d0940`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.2`
- nixpkgs: `/nix/store/amxd2p02wx78nyaa4bkb0hjvgwhz1dq7-source`
Add a :+1: reaction to issues you find important.
Can I do something on distro other than NixOS or it is better just to wait?
For other distros, you can build rofi-calc from source using rofi-wayland headers, or probably downgrade rofi-wayland to version 1.7.5+wayland1, but the latter is untested and you may run into other issues that are fixed with recent versions.
Maybe related (?): I get a collision error when using any plugin
> error: collision between `/nix/store/yi64...-rofi-1.7.5+wayland3/bin/rofi' and `/nix/store/sr361...-rofi-1.7.5+wayland3/bin/rofi'
pkgs.rofi-wayland.override { plugins = [pkgs.rofi-calc]; };
Tried with override:
(final: prev: {
rofi-calc = prev.rofi-calc.override {rofi-unwrapped = prev.rofi-wayland-unwrapped;};
})
Should I open a separate Issue for this?
@sdaqo
A collision is likely due to different derivations of rofi being used in your configuration, which is not this issue:
/nix/store/yi64...-rofi-1.7.5+wayland3/bin/rofi /nix/store/sr361...-rofi-1.7.5+wayland3/bin/rofi
In this case, you may have references to pkgs.rofi-wayland that are not overridden to include plugins. I use the home-manager options instead of overrides myself, so I may be reading the situation incorrectly.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/rofi-calc-not-working-with-rofi-wayland/51301/2
This issue has mostly been fixed by the rofi-wayland 1.7.7+wayland1 release in unstable, so this can be closed if preemptive measures are not planned for nixpkgs.