You are not logged in.

#1 2024-07-19 11:14:24

duyinthee
Member
Registered: 2015-06-14
Posts: 228
Website

no /usr/include/wlr folder

I am trying to compile the recent release dwl version v0.6 at https://codeberg.org/dwl/dwl/releases/d … 0.6.tar.gz
I am getting the following error.

`pkg-config --variable=wayland_scanner wayland-scanner` server-header \
	`pkg-config --variable=pkgdatadir wayland-protocols`/staging/cursor-shape/cursor-shape-v1.xml cursor-shape-v1-protocol.h
`pkg-config --variable=wayland_scanner wayland-scanner` server-header \
	`pkg-config --variable=pkgdatadir wayland-protocols`/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml pointer-constraints-unstable-v1-protocol.h
`pkg-config --variable=wayland_scanner wayland-scanner` server-header \
	protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
`pkg-config --variable=wayland_scanner wayland-scanner` server-header \
	protocols/wlr-output-power-management-unstable-v1.xml wlr-output-power-management-unstable-v1-protocol.h
`pkg-config --variable=wayland_scanner wayland-scanner` server-header \
	`pkg-config --variable=pkgdatadir wayland-protocols`/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
gcc  `pkg-config --cflags wlroots wayland-server xkbcommon libinput xcb xcb-icccm` -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L  -DVERSION=\"`git describe --tags --dirty 2>/dev/null || echo 0.6`\" -DXWAYLAND -g -pedantic -Wall -Wextra -Wdeclaration-after-statement  -Wno-unused-parameter -Wshadow -Wunused-macros -Werror=strict-prototypes  -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types  -Wfloat-conversion -O1 -o dwl.o -c dwl.c
Package wlroots was not found in the pkg-config search path.
Perhaps you should add the directory containing `wlroots.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wlroots', required by 'virtual:world', not found
dwl.c:15:10: fatal error: wlr/backend.h: No such file or directory
   15 | #include <wlr/backend.h>

I have wlroots installed.

[user@hostname ~]$ pacman -Qi wlroots
Name            : wlroots
Version         : 0.18.0-1
Description     : Modular Wayland compositor library
Architecture    : x86_64
URL             : https://gitlab.freedesktop.org/wlroots/wlroots
Licenses        : MIT
...

But I don't have

/usr/inlude/wlr

folder.

[user@hostname ~]$ ls /usr/include | grep  wlr
wlroots0.17
wlroots-0.18

What I am missing? Thanks in advance.

Last edited by duyinthee (2024-07-19 11:15:58)

Offline

#2 2024-07-19 12:09:03

Head_on_a_Stick
Member
From: Belsize Park
Registered: 2014-02-20
Posts: 8,245
Website

Re: no /usr/include/wlr folder

I can get version 0.6 to build by updating the v0.5 AUR PKGBUILD then passing:

PKG_CONFIG_PATH=/usr/lib/wlroots0.17/pkgconfig/ makepkg -sri

There will be a "proper" way to do this but installing the wayland-protocols package and passing the correct PKG_CONFIG_PATH should work.

EDIT: correct version numbers. And no, I don't know what the "proper" fix is.

Last edited by Head_on_a_Stick (2024-07-19 12:12:49)


"The nation-state domesticates the society in the name of capitalism and alienates the community from its natural foundations."
Democratic Confederalism, Abdullah Öcalan.

Offline

#3 2024-07-19 12:45:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,262
Website

Re: no /usr/include/wlr folder

You could also patch dwl's makefile to list wlroots-0.18 instead of wlroots in the PKGS variable and it'd find the header files properly, but it'd likely fail to build.  Instead switch it to wlroots0.17 and install that package as a dependency as I'm pretty sure dwl has not been rewritten for the new wlroots version yet.

There isn't really a strictly proper fix yet.  Wlroots is still pre-version 1 and there are huge breaking changes as each minor version update.  At least 0.16 and 0.17 were effectively completely different libraries: software using it needed to be completely rewritten to build against 0.17; I suspect it will be similar for 0.18 too.

I suspect the arch packages are in transition and quite soon the 0.18 package will soon be installed under /usr/include/wlr, but for now both it and the 0.17 version have versioned paths.

Arguably if the 0.18 package is going to provide the "wlroots" package then this should come with a .pc file for that lib name.  This wouldn't be an unreasonable request to make on the bug tracker.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2024-07-19 14:38:01

duyinthee
Member
Registered: 2015-06-14
Posts: 228
Website

Re: no /usr/include/wlr folder

You could also patch dwl's makefile to list wlroots-0.18 instead of wlroots in the PKGS variable and it'd find the header files properly, but it'd likely fail to build.

Yes, it found the header but failed to build.

...
`pkg-config --variable=wayland_scanner wayland-scanner` server-header \
	`pkg-config --variable=pkgdatadir wayland-protocols`/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
gcc  `pkg-config --cflags wlroots-0.18 wayland-server xkbcommon libinput ` -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L  -DVERSION=\"`git describe --tags --dirty 2>/dev/null || echo 0.6`\"  -g -pedantic -Wall -Wextra -Wdeclaration-after-statement  -Wno-unused-parameter -Wshadow -Wunused-macros -Werror=strict-prototypes  -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types  -Wfloat-conversion -O1 -o dwl.o -c dwl.c
dwl.c: In function ‘axisnotify’:
dwl.c:588:9: error: too few arguments to function ‘wlr_seat_pointer_notify_axis’
  588 |         wlr_seat_pointer_notify_axis(seat,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/wlroots-0.18/wlr/types/wlr_data_control_v1.h:13,
                 from dwl.c:22:
/usr/include/wlroots-0.18/wlr/types/wlr_seat.h:461:6: note: declared here
  461 | void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time_msec,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
dwl.c: In function ‘setup’:
dwl.c:2396:48: error: passing argument 1 of ‘wlr_backend_autocreate’ from incompatible pointer type [-Wincompatible-pointer-types]
 2396 |         if (!(backend = wlr_backend_autocreate(dpy, &session)))
      |                                                ^~~
      |                                                |
      |                                                struct wl_display *
In file included from dwl.c:15:
/usr/include/wlroots-0.18/wlr/backend.h:53:66: note: expected ‘struct wl_event_loop *’ but argument is of type ‘struct wl_display *’
   53 | struct wlr_backend *wlr_backend_autocreate(struct wl_event_loop *loop,
      |                                            ~~~~~~~~~~~~~~~~~~~~~~^~~~
dwl.c:2421:13: error: implicit declaration of function ‘wlr_renderer_get_dmabuf_texture_formats’; did you mean ‘wlr_renderer_get_texture_formats’? [-Wimplicit-function-declaration]
 2421 |         if (wlr_renderer_get_dmabuf_texture_formats(drw)) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |             wlr_renderer_get_texture_formats
dwl.c:2463:25: error: too few arguments to function ‘wlr_output_layout_create’
 2463 |         output_layout = wlr_output_layout_create();
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/wlroots-0.18/wlr/types/wlr_cursor.h:13,
                 from dwl.c:20:
/usr/include/wlroots-0.18/wlr/types/wlr_output_layout.h:65:27: note: declared here
   65 | struct wlr_output_layout *wlr_output_layout_create(struct wl_display *display);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~
dwl.c:2570:9: error: implicit declaration of function ‘wlr_scene_set_presentation’; did you mean ‘wlr_seat_set_selection’? [-Wimplicit-function-declaration]
 2570 |         wlr_scene_set_presentation(scene, wlr_presentation_create(dpy, backend));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |         wlr_seat_set_selection
make: *** [Makefile:78: dwl.o] Error 1

I think I should wait. Thanks for replies with explanations.

Offline

#5 2024-07-19 15:06:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,262
Website

Re: no /usr/include/wlr folder

You might be waiting a while - just install the library dwl uses, it's in the main repos.

For reference, wlroots-0.17 was released seven months ago, and it looks like dwl may have just had their first release supporting wlroots-0.17 last week.  That said, there is an rc-tagged release that claims to have initial support for 0.18, so it sounds like they may have learned from last time and been (edit) they are ahead of the game.  Just the same, the changes between these library versions are massive - it can take a while for dependent programs to catch up (if they do at all).  wlroots-0.16 remained in the main repos until quite recently, so I anticipate 0.17 will stay around for a while too (probably right up to a 0.19 release).

Last edited by Trilby (2024-07-27 12:21:38)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2024-07-27 03:42:18

thanatos2996
Member
From: United States
Registered: 2019-04-24
Posts: 5

Re: no /usr/include/wlr folder

Trilby wrote:

For reference, wlroots-0.17 was released seven months ago, and it looks like dwl may have just had their first release supporting wlroots-0.17 last week.  That said, there is an rc-tagged release that claims to have initial support for 0.18, so it sounds like they may have learned from last time and been ahead of the game.

To clarify, DWL’s releases to date represented the last commit with support for a given wlroots version; they were struck when wlroots released a newer version. DWL doesn’t lag behind wlroots like the releases might suggest; the main branch was built against 0.17 for those seven months, and a branch was available for 0.18, they just didn’t receive releases until wlroots 0.18.0 was released.

That scheme has changed now that DWL itself is fairly stable. Main now builds against the latest wlroots git instead of the most recent release, and DWL releases will be struck when a new version is released by wlroots. That’s why 0.6 and 0.7-rc1 were created at the same time, and why 0.7 has the rc suffix, as it may receive backported updates from main. The actual time to bring dwl up to date with a given wlroots version hasn’t changed, that was and still is ongoing as the breaking changes come in, it’s just being organized differently.

Offline

Board footer

Powered by FluxBB