flacjacket / pywlroots

Python binding to the wlroots library using cffi
University of Illinois/NCSA Open Source License
53 stars 15 forks source link

Pywlroots on raspberry pi (ARM architecture) #150

Closed Steuv1871 closed 8 months ago

Steuv1871 commented 8 months ago

Hi!

Raspberry Pi OS switched compositor to Wayland when they upgraded to Debian Bookworm, so I wanted to give it a try with my favorite Window Manager: Qtile.
Qtile needs pywlroots to run with wayland, but I can't manage to install it on the raspberry pi.

I was able to install correctly pywayland and python-xkbcommon . wlroots is also correctly installed (was able to launch Wayfire which is Raspberry Pi OS default WM).

But when I pip install pywlroots==0.16.4 (Qtile require this version at the moment), I got a compiling error that I can't find documentation on, and I didn't found a way to fix it...

Here is the console output with the error message:

Console output ```bash Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting pywlroots==0.16.4 Using cached pywlroots-0.16.4.tar.gz (91 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: cffi>=1.12.0 in /usr/lib/python3/dist-packages (from pywlroots==0.16.4) (1.15.1) Requirement already satisfied: pywayland>=0.4.14 in ./.local/lib/python3.11/site-packages (from pywlroots==0.16.4) (0.4.17) Requirement already satisfied: xkbcommon>=0.2 in ./.local/lib/python3.11/site-packages (from pywlroots==0.16.4) (0.8) Building wheels for collected packages: pywlroots Building wheel for pywlroots (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for pywlroots (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [118 lines of output] Built with support for XWayland helpers. running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-cpython-311 creating build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/_build.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/version.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/allocator.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/xwayland.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/helper.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/renderer.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/ffi_build.py -> build/lib.linux-aarch64-cpython-311/wlroots copying wlroots/backend.py -> build/lib.linux-aarch64-cpython-311/wlroots creating build/lib.linux-aarch64-cpython-311/wlroots/util copying wlroots/util/box.py -> build/lib.linux-aarch64-cpython-311/wlroots/util copying wlroots/util/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots/util copying wlroots/util/clock.py -> build/lib.linux-aarch64-cpython-311/wlroots/util copying wlroots/util/edges.py -> build/lib.linux-aarch64-cpython-311/wlroots/util copying wlroots/util/region.py -> build/lib.linux-aarch64-cpython-311/wlroots/util copying wlroots/util/log.py -> build/lib.linux-aarch64-cpython-311/wlroots/util creating build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/data_control_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/pointer_gestures_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/output_power_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/virtual_pointer_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/idle_inhibit_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/data_device_manager.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/layer_shell_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/export_dmabuf_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/output.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/xdg_shell.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/relative_pointer_manager_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/keyboard.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/viewporter.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/server_decoration.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/xdg_activation_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/xdg_output_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/foreign_toplevel_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/xdg_decoration_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/compositor.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/virtual_keyboard_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/output_layout.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/texture.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/input_device.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/presentation_time.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/surface.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/primary_selection_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/seat.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/idle.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/matrix.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/xcursor_manager.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/scene.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/pointer_constraints_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/gamma_control_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/idle_notify_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/buffer.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/input_inhibit.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/pointer.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/output_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/cursor.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/output_damage.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/touch.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/wlr_types/screencopy_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types copying wlroots/py.typed -> build/lib.linux-aarch64-cpython-311/wlroots creating build/lib.linux-aarch64-cpython-311/wlroots/include copying wlroots/include/wlr-layer-shell-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include copying wlroots/include/xdg-shell-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include copying wlroots/include/pointer-constraints-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include copying wlroots/include/idle-inhibit-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include copying wlroots/include/wlr-output-power-management-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include copying wlroots/include/idle-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include running build_ext generating cffi module 'build/temp.linux-aarch64-cpython-311/wlroots._ffi.c' creating build/temp.linux-aarch64-cpython-311 building 'wlroots._ffi' extension creating build/temp.linux-aarch64-cpython-311/build creating build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311 aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWLR_USE_UNSTABLE -I/usr/include/pixman-1 -I/tmp/pip-install-cxyop2f9/pywlroots_487b3d06a7e349deb4fb52156dd9c78f/wlroots/include -I/usr/include/python3.11 -c build/temp.linux-aarch64-cpython-311/wlroots._ffi.c -o build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311/wlroots._ffi.o build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_d_wlr_linux_dmabuf_v1_create’: build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6799:41: warning: passing argument 2 of ‘wlr_linux_dmabuf_v1_create’ makes integer from pointer without a cast [-Wint-conversion] 6799 | return wlr_linux_dmabuf_v1_create(x0, x1); | ^~ | | | struct wlr_renderer * In file included from build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:592: /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:87:18: note: expected ‘uint32_t’ {aka ‘unsigned int’} but argument is of type ‘struct wlr_renderer *’ 87 | uint32_t version, const struct wlr_linux_dmabuf_feedback_v1 *default_feedback); | ~~~~~~~~~^~~~~~~ build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6799:10: error: too few arguments to function ‘wlr_linux_dmabuf_v1_create’ 6799 | return wlr_linux_dmabuf_v1_create(x0, x1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:86:29: note: declared here 86 | struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_f_wlr_linux_dmabuf_v1_create’: build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6837:45: warning: passing argument 2 of ‘wlr_linux_dmabuf_v1_create’ makes integer from pointer without a cast [-Wint-conversion] 6837 | { result = wlr_linux_dmabuf_v1_create(x0, x1); } | ^~ | | | struct wlr_renderer * /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:87:18: note: expected ‘uint32_t’ {aka ‘unsigned int’} but argument is of type ‘struct wlr_renderer *’ 87 | uint32_t version, const struct wlr_linux_dmabuf_feedback_v1 *default_feedback); | ~~~~~~~~~^~~~~~~ build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6837:14: error: too few arguments to function ‘wlr_linux_dmabuf_v1_create’ 6837 | { result = wlr_linux_dmabuf_v1_create(x0, x1); } | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:86:29: note: declared here 86 | struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_d_wlr_linux_dmabuf_v1_create’: build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6800:1: warning: control reaches end of non-void function [-Wreturn-type] 6800 | } | ^ error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pywlroots Failed to build pywlroots ERROR: Could not build wheels for pywlroots, which is required to install pyproject.toml-based projects ```

What I've tried to fix the issue:

Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing ./dist/pywlroots-0.16.6.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pywayland>=0.4.14 in /home/myuser/.local/lib/python3.11/site-packages (from pywlroots==0.16.6) (0.4.17)
Requirement already satisfied: xkbcommon>=0.2 in /home/myuser/.local/lib/python3.11/site-packages (from pywlroots==0.16.6) (0.8)
Requirement already satisfied: cffi>=1.12.0 in /usr/lib/python3/dist-packages (from pywlroots==0.16.6) (1.15.1)
Building wheels for collected packages: pywlroots
  Building wheel for pywlroots (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pywlroots (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [128 lines of output]
      Built with support for XWayland helpers.
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-311
      creating build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/_build.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/version.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/allocator.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/xwayland.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/helper.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/renderer.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/ffi_build.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/backend.py -> build/lib.linux-aarch64-cpython-311/wlroots
      creating build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/box.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/clock.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/edges.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/region.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/log.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      creating build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/data_control_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/pointer_gestures_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_power_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/virtual_pointer_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/idle_inhibit_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/data_device_manager.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/layer_shell_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/export_dmabuf_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_shell.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/relative_pointer_manager_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/keyboard.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/viewporter.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/server_decoration.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_activation_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_output_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/foreign_toplevel_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_decoration_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/compositor.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/virtual_keyboard_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_layout.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/texture.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/input_device.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/presentation_time.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/surface.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/primary_selection_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/seat.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/idle.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/matrix.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xcursor_manager.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/scene.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/pointer_constraints_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/gamma_control_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/idle_notify_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/buffer.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/input_inhibit.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/pointer.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/cursor.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_damage.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/touch.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/screencopy_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      running egg_info
      writing pywlroots.egg-info/PKG-INFO
      writing dependency_links to pywlroots.egg-info/dependency_links.txt
      writing requirements to pywlroots.egg-info/requires.txt
      writing top-level names to pywlroots.egg-info/top_level.txt
      reading manifest file 'pywlroots.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'pywlroots.egg-info/SOURCES.txt'
      copying wlroots/py.typed -> build/lib.linux-aarch64-cpython-311/wlroots
      creating build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/wlr-layer-shell-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/xdg-shell-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/pointer-constraints-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/idle-inhibit-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/wlr-output-power-management-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/idle-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/README.rst -> build/lib.linux-aarch64-cpython-311/wlroots/include
      running build_ext
      generating cffi module 'build/temp.linux-aarch64-cpython-311/wlroots._ffi.c'
      creating build/temp.linux-aarch64-cpython-311
      building 'wlroots._ffi' extension
      creating build/temp.linux-aarch64-cpython-311/build
      creating build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311
      aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWLR_USE_UNSTABLE -I/usr/include/pixman-1 -I/tmp/pip-req-build-zeop3vbg/wlroots/include -I/usr/include/python3.11 -c build/temp.linux-aarch64-cpython-311/wlroots._ffi.c -o build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311/wlroots._ffi.o
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_d_wlr_linux_dmabuf_v1_create’:
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6871:41: warning: passing argument 2 of ‘wlr_linux_dmabuf_v1_create’ makes integer from pointer without a cast [-Wint-conversion]
       6871 |   return wlr_linux_dmabuf_v1_create(x0, x1);
            |                                         ^~
            |                                         |
            |                                         struct wlr_renderer *
      In file included from build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:593:
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:87:18: note: expected ‘uint32_t’ {aka ‘unsigned int’} but argument is of type ‘struct wlr_renderer *’
         87 |         uint32_t version, const struct wlr_linux_dmabuf_feedback_v1 *default_feedback);
            |         ~~~~~~~~~^~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6871:10: error: too few arguments to function ‘wlr_linux_dmabuf_v1_create’
       6871 |   return wlr_linux_dmabuf_v1_create(x0, x1);
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:86:29: note: declared here
         86 | struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display,
            |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_f_wlr_linux_dmabuf_v1_create’:
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6909:45: warning: passing argument 2 of ‘wlr_linux_dmabuf_v1_create’ makes integer from pointer without a cast [-Wint-conversion]
       6909 |   { result = wlr_linux_dmabuf_v1_create(x0, x1); }
            |                                             ^~
            |                                             |
            |                                             struct wlr_renderer *
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:87:18: note: expected ‘uint32_t’ {aka ‘unsigned int’} but argument is of type ‘struct wlr_renderer *’
         87 |         uint32_t version, const struct wlr_linux_dmabuf_feedback_v1 *default_feedback);
            |         ~~~~~~~~~^~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6909:14: error: too few arguments to function ‘wlr_linux_dmabuf_v1_create’
       6909 |   { result = wlr_linux_dmabuf_v1_create(x0, x1); }
            |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:86:29: note: declared here
         86 | struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display,
            |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_d_wlr_linux_dmabuf_v1_create’:
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6872:1: warning: control reaches end of non-void function [-Wreturn-type]
       6872 | }
            | ^
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

running sdist
running egg_info
writing pywlroots.egg-info/PKG-INFO
writing dependency_links to pywlroots.egg-info/dependency_links.txt
writing requirements to pywlroots.egg-info/requires.txt
writing top-level names to pywlroots.egg-info/top_level.txt
reading manifest file 'pywlroots.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'pywlroots.egg-info/SOURCES.txt'
running check
creating pywlroots-0.16.6
creating pywlroots-0.16.6/pywlroots.egg-info
creating pywlroots-0.16.6/tests
creating pywlroots-0.16.6/tiny
creating pywlroots-0.16.6/wlroots
creating pywlroots-0.16.6/wlroots/include
creating pywlroots-0.16.6/wlroots/util
creating pywlroots-0.16.6/wlroots/wlr_types
copying files to pywlroots-0.16.6...
copying .pre-commit-config.yaml -> pywlroots-0.16.6
copying LICENSE -> pywlroots-0.16.6
copying MANIFEST.in -> pywlroots-0.16.6
copying README.rst -> pywlroots-0.16.6
copying check_headers.py -> pywlroots-0.16.6
copying pyproject.toml -> pywlroots-0.16.6
copying requirements.txt -> pywlroots-0.16.6
copying setup.py -> pywlroots-0.16.6
copying pywlroots.egg-info/PKG-INFO -> pywlroots-0.16.6/pywlroots.egg-info
copying pywlroots.egg-info/SOURCES.txt -> pywlroots-0.16.6/pywlroots.egg-info
copying pywlroots.egg-info/dependency_links.txt -> pywlroots-0.16.6/pywlroots.egg-info
copying pywlroots.egg-info/not-zip-safe -> pywlroots-0.16.6/pywlroots.egg-info
copying pywlroots.egg-info/requires.txt -> pywlroots-0.16.6/pywlroots.egg-info
copying pywlroots.egg-info/top_level.txt -> pywlroots-0.16.6/pywlroots.egg-info
copying tests/__init__.py -> pywlroots-0.16.6/tests
copying tests/conftest.py -> pywlroots-0.16.6/tests
copying tests/test_display.py -> pywlroots-0.16.6/tests
copying tests/test_helper.py -> pywlroots-0.16.6/tests
copying tests/test_wlroots.py -> pywlroots-0.16.6/tests
copying tiny/__init__.py -> pywlroots-0.16.6/tiny
copying tiny/__main__.py -> pywlroots-0.16.6/tiny
copying tiny/cursor_mode.py -> pywlroots-0.16.6/tiny
copying tiny/keyboard_handler.py -> pywlroots-0.16.6/tiny
copying tiny/server.py -> pywlroots-0.16.6/tiny
copying tiny/view.py -> pywlroots-0.16.6/tiny
copying wlroots/__init__.py -> pywlroots-0.16.6/wlroots
copying wlroots/_build.py -> pywlroots-0.16.6/wlroots
copying wlroots/allocator.py -> pywlroots-0.16.6/wlroots
copying wlroots/backend.py -> pywlroots-0.16.6/wlroots
copying wlroots/ffi_build.py -> pywlroots-0.16.6/wlroots
copying wlroots/helper.py -> pywlroots-0.16.6/wlroots
copying wlroots/py.typed -> pywlroots-0.16.6/wlroots
copying wlroots/renderer.py -> pywlroots-0.16.6/wlroots
copying wlroots/version.py -> pywlroots-0.16.6/wlroots
copying wlroots/xwayland.py -> pywlroots-0.16.6/wlroots
copying wlroots/include/README.rst -> pywlroots-0.16.6/wlroots/include
copying wlroots/include/idle-inhibit-unstable-v1-protocol.h -> pywlroots-0.16.6/wlroots/include
copying wlroots/include/idle-protocol.h -> pywlroots-0.16.6/wlroots/include
copying wlroots/include/pointer-constraints-unstable-v1-protocol.h -> pywlroots-0.16.6/wlroots/include
copying wlroots/include/wlr-layer-shell-unstable-v1-protocol.h -> pywlroots-0.16.6/wlroots/include
copying wlroots/include/wlr-output-power-management-unstable-v1-protocol.h -> pywlroots-0.16.6/wlroots/include
copying wlroots/include/xdg-shell-protocol.h -> pywlroots-0.16.6/wlroots/include
copying wlroots/util/__init__.py -> pywlroots-0.16.6/wlroots/util
copying wlroots/util/box.py -> pywlroots-0.16.6/wlroots/util
copying wlroots/util/clock.py -> pywlroots-0.16.6/wlroots/util
copying wlroots/util/edges.py -> pywlroots-0.16.6/wlroots/util
copying wlroots/util/log.py -> pywlroots-0.16.6/wlroots/util
copying wlroots/util/region.py -> pywlroots-0.16.6/wlroots/util
copying wlroots/wlr_types/__init__.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/buffer.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/compositor.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/cursor.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/data_control_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/data_device_manager.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/export_dmabuf_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/foreign_toplevel_management_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/gamma_control_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/idle.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/idle_inhibit_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/idle_notify_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/input_device.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/input_inhibit.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/keyboard.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/layer_shell_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/matrix.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/output.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/output_damage.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/output_layout.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/output_management_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/output_power_management_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/pointer.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/pointer_constraints_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/pointer_gestures_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/presentation_time.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/primary_selection_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/relative_pointer_manager_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/scene.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/screencopy_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/seat.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/server_decoration.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/surface.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/texture.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/touch.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/viewporter.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/virtual_keyboard_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/virtual_pointer_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/xcursor_manager.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/xdg_activation_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/xdg_decoration_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/xdg_output_v1.py -> pywlroots-0.16.6/wlroots/wlr_types
copying wlroots/wlr_types/xdg_shell.py -> pywlroots-0.16.6/wlroots/wlr_types
copying pywlroots.egg-info/SOURCES.txt -> pywlroots-0.16.6/pywlroots.egg-info
Writing pywlroots-0.16.6/setup.cfg
Creating tar archive
removing 'pywlroots-0.16.6' (and everything under it)
running bdist_wheel
running build
Traceback (most recent call last):
  File "/home/myuser/pywlroots/pywlroots/setup.py", line 34, in <module>
    setup(**keywords_with_side_effects(sys.argv))
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/__init__.py", line 104, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
    super().run_command(command)
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/myuser/.local/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 368, in run
    self.run_command("build")
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
    super().run_command(command)
  File "/home/myuser/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/myuser/pywlroots/pywlroots/setup.py", line 14, in run
    raise RuntimeError("Requested running build")
RuntimeError: Requested running build

Any help would be appreciated, thanks !

EDIT: Solution

# Remove previous version of libwlroots
sudo apt remove libwlroots11 libwlroots-dev -y
# Install the functioning ones
wget https://launchpad.net/ubuntu/+source/wlroots/0.16.2-3/+build/26476999/+files/libwlroots-dev_0.16.2-3_arm64.deb
wget http://launchpadlibrarian.net/680327734/libwlroots11_0.16.2-3_arm64.deb
sudo apt install ./libwlroots11_0.16.2-3_arm64.deb
sudo apt install ./libwlroots-dev_0.16.2-3_arm64.deb
# install Qtile with Wayland dependencies and backend
pip install --no-binary :all: --config-setting backend=wayland qtile[wayland]
heuer commented 8 months ago

I guess the wlroots version of bookworm is too old. Acc. to https://packages.debian.org/bookworm/libwlroots-dev Debian bookworm ships wlroots 0.15.1

Steuv1871 commented 8 months ago

Thanks for your response, I didn't think to check if debian packages are up-to-date !

I'll try to install a more recent version or build from source. Do you know what is the minimum version needed ?

heuer commented 8 months ago

I'd try 0.16.2. Maybe any of the 0.16.x versions may work. I use wlroots 0.16.2 with Qtile 0.24.0 and pywlroots 0.16.6.

Steuv1871 commented 8 months ago

Thanks !

But unfortunally it didn't work.

I've tried wlroots 0.16.2 from Rapsberrypi repo and 0.17.2 from Debian Experimental and neither works.

Got a different error message with wlroots 0.17.2 (build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:587:10: fatal error: wlr/types/wlr_idle.h: No such file or directory) but can't go further.

heuer commented 8 months ago

0.17.x has changed a lot, so it's not surprising that it does not work. The error you're referring to is caused by the removal of the KDE idle protocol in wlroots 0.17.

wlroots 0.16.x ships with the protocol, so it's required by pywlroots 0.16.x.

What error do you get with wlroots 0.16.2 from the Raspberry repo?

Steuv1871 commented 8 months ago

Same as before:

build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6799:10: error: too few arguments to function ‘wlr_linux_dmabuf_v1_create’
       6799 |   return wlr_linux_dmabuf_v1_create(x0, x1);
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:86:29: note: declared here
         86 | struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display,
            |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~

Full output with warnings:

Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pywlroots==0.16.4
  Using cached pywlroots-0.16.4.tar.gz (91 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi>=1.12.0 in /usr/lib/python3/dist-packages (from pywlroots==0.16.4) (1.15.1)
Requirement already satisfied: pywayland>=0.4.14 in ./.local/lib/python3.11/site-packages (from pywlroots==0.16.4) (0.4.17)
Requirement already satisfied: xkbcommon>=0.2 in ./.local/lib/python3.11/site-packages (from pywlroots==0.16.4) (0.8)
Building wheels for collected packages: pywlroots
  Building wheel for pywlroots (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pywlroots (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [118 lines of output]
      Built with support for XWayland helpers.
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-311
      creating build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/_build.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/version.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/allocator.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/xwayland.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/helper.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/renderer.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/ffi_build.py -> build/lib.linux-aarch64-cpython-311/wlroots
      copying wlroots/backend.py -> build/lib.linux-aarch64-cpython-311/wlroots
      creating build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/box.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/clock.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/edges.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/region.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      copying wlroots/util/log.py -> build/lib.linux-aarch64-cpython-311/wlroots/util
      creating build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/data_control_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/pointer_gestures_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_power_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/virtual_pointer_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/idle_inhibit_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/data_device_manager.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/layer_shell_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/__init__.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/export_dmabuf_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_shell.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/relative_pointer_manager_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/keyboard.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/viewporter.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/server_decoration.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_activation_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_output_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/foreign_toplevel_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xdg_decoration_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/compositor.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/virtual_keyboard_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_layout.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/texture.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/input_device.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/presentation_time.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/surface.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/primary_selection_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/seat.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/idle.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/matrix.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/xcursor_manager.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/scene.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/pointer_constraints_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/gamma_control_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/idle_notify_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/buffer.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/input_inhibit.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/pointer.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_management_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/cursor.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/output_damage.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/touch.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/wlr_types/screencopy_v1.py -> build/lib.linux-aarch64-cpython-311/wlroots/wlr_types
      copying wlroots/py.typed -> build/lib.linux-aarch64-cpython-311/wlroots
      creating build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/wlr-layer-shell-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/xdg-shell-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/pointer-constraints-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/idle-inhibit-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/wlr-output-power-management-unstable-v1-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      copying wlroots/include/idle-protocol.h -> build/lib.linux-aarch64-cpython-311/wlroots/include
      running build_ext
      generating cffi module 'build/temp.linux-aarch64-cpython-311/wlroots._ffi.c'
      creating build/temp.linux-aarch64-cpython-311
      building 'wlroots._ffi' extension
      creating build/temp.linux-aarch64-cpython-311/build
      creating build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311
      aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWLR_USE_UNSTABLE -I/usr/include/pixman-1 -I/tmp/pip-install-cxyop2f9/pywlroots_487b3d06a7e349deb4fb52156dd9c78f/wlroots/include -I/usr/include/python3.11 -c build/temp.linux-aarch64-cpython-311/wlroots._ffi.c -o build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311/wlroots._ffi.o
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_d_wlr_linux_dmabuf_v1_create’:
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6799:41: warning: passing argument 2 of ‘wlr_linux_dmabuf_v1_create’ makes integer from pointer without a cast [-Wint-conversion]
       6799 |   return wlr_linux_dmabuf_v1_create(x0, x1);
            |                                         ^~
            |                                         |
            |                                         struct wlr_renderer *
      In file included from build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:592:
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:87:18: note: expected ‘uint32_t’ {aka ‘unsigned int’} but argument is of type ‘struct wlr_renderer *’
         87 |         uint32_t version, const struct wlr_linux_dmabuf_feedback_v1 *default_feedback);
            |         ~~~~~~~~~^~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6799:10: error: too few arguments to function ‘wlr_linux_dmabuf_v1_create’
       6799 |   return wlr_linux_dmabuf_v1_create(x0, x1);
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:86:29: note: declared here
         86 | struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display,
            |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_f_wlr_linux_dmabuf_v1_create’:
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6837:45: warning: passing argument 2 of ‘wlr_linux_dmabuf_v1_create’ makes integer from pointer without a cast [-Wint-conversion]
       6837 |   { result = wlr_linux_dmabuf_v1_create(x0, x1); }
            |                                             ^~
            |                                             |
            |                                             struct wlr_renderer *
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:87:18: note: expected ‘uint32_t’ {aka ‘unsigned int’} but argument is of type ‘struct wlr_renderer *’
         87 |         uint32_t version, const struct wlr_linux_dmabuf_feedback_v1 *default_feedback);
            |         ~~~~~~~~~^~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6837:14: error: too few arguments to function ‘wlr_linux_dmabuf_v1_create’
       6837 |   { result = wlr_linux_dmabuf_v1_create(x0, x1); }
            |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/wlr/types/wlr_linux_dmabuf_v1.h:86:29: note: declared here
         86 | struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display,
            |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c: In function ‘_cffi_d_wlr_linux_dmabuf_v1_create’:
      build/temp.linux-aarch64-cpython-311/wlroots._ffi.c:6800:1: warning: control reaches end of non-void function [-Wreturn-type]
       6800 | }
            | ^
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pywlroots
Failed to build pywlroots
ERROR: Could not build wheels for pywlroots, which is required to install pyproject.toml-based projects
heuer commented 8 months ago

Can you try the following and report if it works (with libwlroots-dev 1.6.2 installed):

$ python -m venv test
$ source ./test/bin/activate
$ pip install pywlroots
Steuv1871 commented 8 months ago

unfortunaly not, still the same error.

heuer commented 8 months ago

Okay, if nobody jumps in I'll try to install pywlroots during next week on my Raspberry Pi. From the logs I see that you're running the 64-bit version of the OS. Which Raspberry Pi model, btw?

Steuv1871 commented 8 months ago

Yep, 64bits it is.
I'm using a Raspberry Pi Zero 2, but I've also tried on a Raspberry Pi 4.

Thanks again for your valuable hep !

heuer commented 8 months ago

I still think there is a libwlroots-dev vs. pywlroots version mismatch, anyway. I have both Raspberries, I'll try it within the next days.

heuer commented 8 months ago

I still think there is a libwlroots-dev vs. pywlroots version mismatch

What's the output of

apt list --installed | grep libwlroots
Steuv1871 commented 8 months ago

I still think there is a libwlroots-dev vs. pywlroots version mismatch

What's the output of

apt list --installed | grep libwlroots

Here's the output:

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,automatic]
heuer commented 8 months ago

I can confirm the problem (using a Pi400) for Raspberry Pi OS Lite released March 15th 2024:

sudo apt install -y python3-dev libwlroots11 libwlroots-dev
python -m venv qtile
source qtile/bin/activate
pip install qtile[wayland]
==> ERROR
pip install pywlroots
==> ERROR
sudo apt install -y git
git clone https://github.com/flacjacket/pywlroots.git
cd pywlroots/
pip install .
==> ERROR

We need to dig deeper into why this doesn't work. I still assume a version mismatch, but we need to investigate this further.

heuer commented 8 months ago

Congrats, you found a bug in the libwlroots-dev package! ;)

The package mixes sources from wlroots 0.16 and 0.17. Looking at the files, some were replaced with newer ones on February 13th.

I'll take a closer look at this this evening and (hopefully) write how to solve the problem.

Steuv1871 commented 8 months ago

Congrats, you found a bug in the libwlroots-dev package! ;)

One of my life goal :)

Thanks a lot for your time !

heuer commented 8 months ago

I found a solution to the problem that pywlroots cannot be installed:

wget https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/0.16.0/downloads/wlroots-0.16.0.tar.gz
tar -zxf wlroots-0.16.0.tar.gz
cd wlroots-0.16.0/include/wlr
# Replace any wlroots 0.17 file with 0.16.0
sudo cp -pr backend interfaces render types util xwayland /usr/include/wlr/
# Change permissions back to root
sudo chown -R root:root /usr/include/wlr/

Now

pip install qtile[wayland]

should work.

But unfortunately, the ffi module required by the Qtile Wayland backend is not created.

So

qtile start -b wayland

quits with the error message

Warning: Wayland backend not built. Backend will not run.

Solution:

wget https://files.pythonhosted.org/packages/be/56/8d6e2716e8ec37fa7c32d074130bd23fb7dd40b7e2e8231633c183942e5b/qtile-0.24.0.tar.gz
tar -zxf qtile-0.24.0.tar.gz
cd qtile-0.24.0/
./scripts/ffibuild
# (assuming that you created a virtual environment "qtile-venv")
cp libqtile/backend/wayland/_ffi* ../qtile-venv/lib/python3.11/site-packages/libqtile/backend/wayland/

Now

qtile start -b wayland

simply quits quietly. I call it progress. ;)

I don't know what's going wrong, I added the logfile (using qtile start -b wayland -l DEBUG). Maybe the Qtile developers have an idea what's going wrong there?

Or maybe you've more luck on your machine?

qtile.log

heuer commented 8 months ago

I don't know what's going wrong

I guess that the binary libwlroots package suffers from similar problems as the -dev package.

Anyway, I was now able to run Qtile. \o/

Please note that it is generally not a good idea to mix packages. I haven't tested the system any further; it could be that other programs are now unstable or no longer running at all.

You are now sufficiently warned, here is my way to run Qtile (using packages from Ubuntu):

wget https://launchpad.net/ubuntu/+source/wlroots/0.16.2-3/+build/26476999/+files/libwlroots-dev_0.16.2-3_arm64.deb
wget http://launchpadlibrarian.net/680327734/libwlroots11_0.16.2-3_arm64.deb
sudo apt install ./libwlroots11_0.16.2-3_arm64.deb
sudo apt install ./libwlroots-dev_0.16.2-3_arm64.deb
Steuv1871 commented 8 months ago

Please note that it is generally not a good idea to mix packages. I haven't tested the system any further; it could be that other programs are now unstable or no longer running at all.

I'm ricing a Raspberry Pi zero 2, unstable is my way of life 😎 (I have PTST caused by neovim's LSP)

Jokes aside, I removed libwlroots11 and libwlroots-dev before trying your solution.

And it worked ! I was able to install pywlroots and launch qtile with Wayland !

Note, that I had the backend error too and used your method to fix it.

So to sum up the solution :

# Remove previous version of libwlroots
sudo apt remove libwlroots11 libwlroots-dev -y
# Install the functioning ones
wget https://launchpad.net/ubuntu/+source/wlroots/0.16.2-3/+build/26476999/+files/libwlroots-dev_0.16.2-3_arm64.deb
wget http://launchpadlibrarian.net/680327734/libwlroots11_0.16.2-3_arm64.deb
sudo apt install ./libwlroots11_0.16.2-3_arm64.deb
sudo apt install ./libwlroots-dev_0.16.2-3_arm64.deb
# install Qtile with Wayland dependencies and backend
pip install --no-binary :all: --config-setting backend=wayland qtile[wayland]

Thanks a lot for your help !

Do you consider the issue as resolved as the problem was not from pywlroots ?
Or do you prefer to keep it open until libwlroots* are patched ?

heuer commented 8 months ago

Thanks a lot for your help !

You're welcome. Thanks for your feedback!

Do you consider the issue as resolved as the problem was not from pywlroots ?

Whatever you want to do, I'm okay with it all.

heuer commented 8 months ago
# correct Wayland backend for qtile
wget https://files.pythonhosted.org/packages/be/56/8d6e2716e8ec37fa7c32d074130bd23fb7dd40b7e2e8231633c183942e5b/qtile-0.24.0.tar.gz
tar -zxf qtile-0.24.0.tar.gz
cd qtile-0.24.0/
./scripts/ffibuild
cp libqtile/backend/wayland/_ffi* /usr/lib/python3.11/site-packages/libqtile/backend/wayland/

This doesn't seem to be necessary if you install Qtile like this:

pip install --no-binary :all: --config-setting backend=wayland qtile[wayland]

See https://github.com/qtile/qtile/issues/4735#issuecomment-2014423952

Steuv1871 commented 8 months ago
# correct Wayland backend for qtile
wget https://files.pythonhosted.org/packages/be/56/8d6e2716e8ec37fa7c32d074130bd23fb7dd40b7e2e8231633c183942e5b/qtile-0.24.0.tar.gz
tar -zxf qtile-0.24.0.tar.gz
cd qtile-0.24.0/
./scripts/ffibuild
cp libqtile/backend/wayland/_ffi* /usr/lib/python3.11/site-packages/libqtile/backend/wayland/

This doesn't seem to be necessary if you install Qtile like this:

pip install --no-binary :all: --config-setting backend=wayland qtile[wayland]

See qtile/qtile#4735 (comment)

You are absolutly right ! I correct the recap.

Steuv1871 commented 8 months ago

Thanks a lot for your help !

You're welcome. Thanks for your feedback!

Do you consider the issue as resolved as the problem was not from pywlroots ?

Whatever you want to do, I'm okay with it all.

It works for me so let's close this issue :)