raspberrypi/bookworm-feedback

libwlroots-dev 0.16.0-2 provides a mixture of wlroots 0.16.0 and wlroots 0.17

Closed this issue · 9 comments

The package should only contain files for wlroots 0.16, but some files are from wlroots 0.17.

All wlroots 0.16 files have a timestamp of November 2022, but some files with a timestamp of February 2024 have been replaced. These files come from wlroots 0.17, which is incompatible with wlroots 0.16 in some respects due to API changes.

apt list --installed | grep libwlroots

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libwlroots-dev/stable,now 0.16.0-2~bpo11+1~rpt13 arm64 [installed]
libwlroots11/stable,now 0.16.0-2~bpo11+1~rpt13 arm64 [installed]
/usr/include/wlr/types $ ls -al
total 372
drwxr-xr-x 2 root root  4096 Mar 19 21:29 .
drwxr-xr-x 8 root root  4096 Mar 19 21:29 ..
-rw-r--r-- 1 root root  5226 Nov 11  2022 wlr_buffer.h
-rw-r--r-- 1 root root 10098 Nov 11  2022 wlr_compositor.h
-rw-r--r-- 1 root root  7174 Nov 11  2022 wlr_cursor.h
-rw-r--r-- 1 root root  2251 Nov 11  2022 wlr_damage_ring.h
-rw-r--r-- 1 root root  1333 Nov 11  2022 wlr_data_control_v1.h
-rw-r--r-- 1 root root  7164 Nov 11  2022 wlr_data_device.h
-rw-r--r-- 1 root root  1230 Feb 13 13:33 wlr_drm.h
-rw-r--r-- 1 root root  4092 Nov 11  2022 wlr_drm_lease_v1.h
-rw-r--r-- 1 root root   985 Nov 11  2022 wlr_export_dmabuf_v1.h
-rw-r--r-- 1 root root  5140 Nov 11  2022 wlr_foreign_toplevel_management_v1.h
-rw-r--r-- 1 root root   985 Nov 11  2022 wlr_fullscreen_shell_v1.h
-rw-r--r-- 1 root root   712 Nov 11  2022 wlr_gamma_control_v1.h
-rw-r--r-- 1 root root  2364 Nov 11  2022 wlr_idle.h
-rw-r--r-- 1 root root  1436 Nov 11  2022 wlr_idle_inhibit_v1.h
-rw-r--r-- 1 root root  1115 Nov 11  2022 wlr_idle_notify_v1.h
-rw-r--r-- 1 root root   781 Nov 11  2022 wlr_input_device.h
-rw-r--r-- 1 root root   814 Nov 11  2022 wlr_input_inhibitor.h
-rw-r--r-- 1 root root  4685 Nov 11  2022 wlr_input_method_v2.h
-rw-r--r-- 1 root root  3188 Nov 11  2022 wlr_keyboard.h
-rw-r--r-- 1 root root  1996 Nov 11  2022 wlr_keyboard_group.h
-rw-r--r-- 1 root root  2683 Nov 11  2022 wlr_keyboard_shortcuts_inhibit_v1.h
-rw-r--r-- 1 root root  6742 Nov 11  2022 wlr_layer_shell_v1.h
-rw-r--r-- 1 root root  4046 Feb 13 13:33 wlr_linux_dmabuf_v1.h
-rw-r--r-- 1 root root  1905 Nov 11  2022 wlr_matrix.h
-rw-r--r-- 1 root root 19403 Feb 13 13:33 wlr_output.h
-rw-r--r-- 1 root root  3122 Nov 11  2022 wlr_output_damage.h
-rw-r--r-- 1 root root  2621 Feb 13 13:33 wlr_output_layer.h
-rw-r--r-- 1 root root  4731 Nov 11  2022 wlr_output_layout.h
-rw-r--r-- 1 root root  4935 Nov 11  2022 wlr_output_management_v1.h
-rw-r--r-- 1 root root  1035 Nov 11  2022 wlr_output_power_management_v1.h
-rw-r--r-- 1 root root  3824 Nov 11  2022 wlr_pointer.h
-rw-r--r-- 1 root root  2643 Nov 11  2022 wlr_pointer_constraints_v1.h
-rw-r--r-- 1 root root  2090 Nov 11  2022 wlr_pointer_gestures_v1.h
-rw-r--r-- 1 root root  3001 Nov 11  2022 wlr_presentation_time.h
-rw-r--r-- 1 root root  2041 Nov 11  2022 wlr_primary_selection.h
-rw-r--r-- 1 root root  1284 Nov 11  2022 wlr_primary_selection_v1.h
-rw-r--r-- 1 root root   811 Nov 11  2022 wlr_region.h
-rw-r--r-- 1 root root  2205 Nov 11  2022 wlr_relative_pointer_v1.h
-rw-r--r-- 1 root root 14312 Nov 11  2022 wlr_scene.h
-rw-r--r-- 1 root root  1394 Nov 11  2022 wlr_screencopy_v1.h
-rw-r--r-- 1 root root 25117 Nov 11  2022 wlr_seat.h
-rw-r--r-- 1 root root  2162 Nov 11  2022 wlr_server_decoration.h
-rw-r--r-- 1 root root  2649 Nov 11  2022 wlr_session_lock_v1.h
-rw-r--r-- 1 root root   519 Nov 11  2022 wlr_single_pixel_buffer_v1.h
-rw-r--r-- 1 root root  1845 Nov 11  2022 wlr_subcompositor.h
-rw-r--r-- 1 root root   236 Nov 11  2022 wlr_surface.h
-rw-r--r-- 1 root root  1060 Nov 11  2022 wlr_switch.h
-rw-r--r-- 1 root root  2209 Nov 11  2022 wlr_tablet_pad.h
-rw-r--r-- 1 root root  3368 Nov 11  2022 wlr_tablet_tool.h
-rw-r--r-- 1 root root 10720 Nov 11  2022 wlr_tablet_v2.h
-rw-r--r-- 1 root root  3096 Nov 11  2022 wlr_text_input_v3.h
-rw-r--r-- 1 root root  1507 Nov 11  2022 wlr_touch.h
-rw-r--r-- 1 root root   993 Nov 11  2022 wlr_viewporter.h
-rw-r--r-- 1 root root  1128 Nov 11  2022 wlr_virtual_keyboard_v1.h
-rw-r--r-- 1 root root  1401 Nov 11  2022 wlr_virtual_pointer_v1.h
-rw-r--r-- 1 root root  2188 Nov 11  2022 wlr_xcursor_manager.h
-rw-r--r-- 1 root root  2538 Nov 11  2022 wlr_xdg_activation_v1.h
-rw-r--r-- 1 root root  2010 Nov 11  2022 wlr_xdg_decoration_v1.h
-rw-r--r-- 1 root root  2164 Nov 11  2022 wlr_xdg_foreign_registry.h
-rw-r--r-- 1 root root  1580 Nov 11  2022 wlr_xdg_foreign_v1.h
-rw-r--r-- 1 root root  1580 Nov 11  2022 wlr_xdg_foreign_v2.h
-rw-r--r-- 1 root root  1108 Nov 11  2022 wlr_xdg_output_v1.h
-rw-r--r-- 1 root root 15836 Nov 11  2022 wlr_xdg_shell.h


/usr/include/wlr/interfaces $ ls -al
total 44
drwxr-xr-x 2 root root 4096 Mar 20 17:27 .
drwxr-xr-x 8 root root 4096 Mar 20 17:27 ..
-rw-r--r-- 1 root root 1563 Nov 11  2022 wlr_buffer.h
-rw-r--r-- 1 root root  986 Nov 11  2022 wlr_keyboard.h
-rw-r--r-- 1 root root 4755 Feb 13 13:33 wlr_output.h
-rw-r--r-- 1 root root  553 Nov 11  2022 wlr_pointer.h
-rw-r--r-- 1 root root  555 Nov 11  2022 wlr_switch.h
-rw-r--r-- 1 root root  786 Nov 11  2022 wlr_tablet_pad.h
-rw-r--r-- 1 root root  556 Nov 11  2022 wlr_tablet_tool.h
-rw-r--r-- 1 root root  530 Nov 11  2022 wlr_touch.h


/usr/include/wlr/render $ ls -al
total 48
drwxr-xr-x 2 root root 4096 Mar 20 17:27 .
drwxr-xr-x 8 root root 4096 Mar 20 17:27 ..
-rw-r--r-- 1 root root 2078 Nov 11  2022 allocator.h
-rw-r--r-- 1 root root 1785 Nov 11  2022 dmabuf.h
-rw-r--r-- 1 root root 2583 Feb 13 13:33 drm_format_set.h
-rw-r--r-- 1 root root 1314 Nov 11  2022 egl.h
-rw-r--r-- 1 root root 1189 Nov 11  2022 gles2.h
-rw-r--r-- 1 root root 2511 Feb 13 13:33 interface.h
-rw-r--r-- 1 root root 1275 Feb 13 13:33 pixman.h
-rw-r--r-- 1 root root 1158 Nov 11  2022 vulkan.h
-rw-r--r-- 1 root root 4068 Feb 13 13:33 wlr_renderer.h
-rw-r--r-- 1 root root 1815 Nov 11  2022 wlr_texture.h

More background: flacjacket/pywlroots#150

I believe that the 0.16 version we ship has some backports from 0.17. They were initially needed for wayfire. But now that we're moving away from wayfire and we have walroots 0.17 in the repo, maybe the 0.16 changes can be reverted.

@spl237

The files in question have been modified to improve performance on Raspberry Pi; in some cases the changes have been pulled from a newer version of wlroots, but in others they are specific to Raspberry Pi. They are needed in the 0.16 version to provide acceleration to wayfire.

Thanks for your valuable post. It does not solve the problem, though. Users assume that a package called libwlroots-0.16.0 contains wlroots 0.16.0 and not other stuff which is incompatible with wlroots 0.16.0

The files in the package are compatible with wlroots 0.16, because they are built into our version of it! This is not something we can change without incurring a significant performance degradation on our version of wayfire.

wlroots 0.16 is obsolete anyway - Debian's standard versions are now 0.15 for bookworm and 0.17 for trixie, sid and experimental, so whatever your users are using it for ought to be made compatible with 0.17 instead.

The files in the package are compatible with wlroots 0.16

They are not. At least include/wlr/types/wlr_linux_dmabuf_v1.h contains code from wlroots 0.17 which is incompatible with wlroots 0.16:

You ship 0.17:

struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display,
	uint32_t version, const struct wlr_linux_dmabuf_feedback_v1 *default_feedback);

0.16.x version of the function:

struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display,
	struct wlr_renderer *renderer);

I've not checked all files but wlr_linux_dmabuf_v1.h is clearly incompatible with wlroots 0.16

In that case, it is at least possible to modify 0.16 to work with that header file, because the package we ship is fundamentally 0.16 code, albeit with some optimisations taken from 0.17.

That said, there is nothing we can do to fix this. Optimisations in our code rely on these changes, and we cannot take them out. From what I can see, the only clean version of 0.16 in the Debian repos is in sid, so you would need to backport this to bookworm yourself, but as said before, 0.16 appears to be obsolete, and all future development should be on 0.17.

At least Ubuntu manages to provide packages that contain what the name promises.

In my opinion, advising all projects to switch to a newer version of wlroots doesn't make much sense. Smaller projects require time and developers to implement the changes. When Raspberry PI OS offers packages that promise wlroots 0.16 but do not deliver on the promise, it is very confusing for end users.

Why can't Raspberry PI OS provide wlroots 0.16 and wlroots 0.17? If I understood @XECDesign correctly, the deviations from wlroots 0.16 are now obsolete?

In the worst case scenario, Raspberry PI OS should not offer the libwlroots 0.16 packages at all, but only 0.15 and 0.17 to follow the same line as Debian.

Why can't Raspberry PI OS provide wlroots 0.16 and wlroots 0.17?

As already explained - we require custom modifications to 0.16 to improve performance. We do also provide vanilla 0.17, but our optimised packages require the modified 0.16.

If I understood @XECDesign correctly, the deviations from wlroots 0.16 are now obsolete?

They will become obsolete at some point in the future. They are not obsolete at present.

In the worst case scenario, Raspberry PI OS should not offer the libwlroots 0.16 packages at all, but only 0.15 and 0.17 to follow the same line as Debian.

As above - we require the modified 0.16. As and when the packages we ship which use it migrate to 0.17, we will drop it, but until then, it is needed. I'm afraid I do not currently have a timescale for when this might happen.

Great solution. Thanks for your time. 👍