Skip to content

meson/wayland: depend on epoll-shim on non-Linux for timerfd_*

Jan Beich requested to merge (removed):epoll-shim into main

Regressed by !94 (merged) + !97 (merged). Wayland is supported[1] on BSDs but some stuff requires compat library.

[1] DragonFly and FreeBSD can use arcan-wayland or wlroots (e.g., sway), NetBSD can use swc (e.g., velox), OpenBSD can use arcan-wayland.

EGL errors
$ meson setup --auto-features=disabled -Dwayland=enabled -Degl=enabled /tmp/demos_build
$ meson compile -C /tmp/demos_build
[...]
FAILED: src/egl/opengl/egltri_wayland
cc  -o src/egl/opengl/egltri_wayland src/egl/opengl/egltri_wayland.p/egltri.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -Wl,--start-group src/util/libutil.a src/egl/eglut/libeglut_wayland.a /usr/local/lib/libGL.so -lm /usr/local/lib/libGLU.so /usr/local/lib/libOpenGL.so /usr/local/lib/libwayland-egl.so /usr/local/lib/libwayland-client.so /usr/local/lib/libxkbcommon.so /usr/local/lib/libEGL.so /usr/local/lib/libdecor-0.so -Wl,--end-group
ld: error: undefined symbol: epoll_shim_poll
>>> referenced by eglut_wayland.c:524 (src/egl/eglut/eglut_wayland.c:524)
>>>               libeglut_wayland.a.p/eglut_wayland.c.o:(_eglutNativeEventLoop) in archive src/egl/eglut/libeglut_wayland.a

ld: error: undefined symbol: epoll_shim_read
>>> referenced by eglut_wayland.c:560 (src/egl/eglut/eglut_wayland.c:560)
>>>               libeglut_wayland.a.p/eglut_wayland.c.o:(_eglutNativeEventLoop) in archive src/egl/eglut/libeglut_wayland.a

ld: error: undefined symbol: timerfd_create
>>> referenced by eglut_wayland.c:221 (src/egl/eglut/eglut_wayland.c:221)
>>>               libeglut_wayland.a.p/eglut_wayland.c.o:(seat_capabilities) in archive src/egl/eglut/libeglut_wayland.a

ld: error: undefined symbol: epoll_shim_close
>>> referenced by eglut_wayland.c:64 (src/egl/eglut/eglut_wayland.c:64)
>>>               libeglut_wayland.a.p/eglut_wayland.c.o:(keymap_callback) in archive src/egl/eglut/libeglut_wayland.a

ld: error: undefined symbol: timerfd_settime
>>> referenced by eglut_wayland.c:172 (src/egl/eglut/eglut_wayland.c:172)
>>>               libeglut_wayland.a.p/eglut_wayland.c.o:(leave_callback) in archive src/egl/eglut/libeglut_wayland.a
>>> referenced by eglut_wayland.c:149 (src/egl/eglut/eglut_wayland.c:149)
>>>               libeglut_wayland.a.p/eglut_wayland.c.o:(handle_key) in archive src/egl/eglut/libeglut_wayland.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
[14/18] Compiling C object src/glad/libglad.a.p/src_glad.c.o
ninja: build stopped: subcommand failed.
Vulkan errors
$ meson setup --auto-features=disabled -Dwayland=enabled -Dvulkan=enabled /tmp/demos_build
$ meson compile -C /tmp/demos_build
[2/2] Linking target src/vulkan/vkgears
FAILED: src/vulkan/vkgears
cc  -o src/vulkan/vkgears src/vulkan/vkgears.p/vkgears.c.o src/vulkan/vkgears.p/wsi_wsi.c.o src/vulkan/vkgears.p/wsi_wayland.c.o src/vulkan/vkgears.p/wsi_xcb.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -Wl,--start-group src/util/libutil.a /usr/local/lib/libvulkan.so /usr/local/lib/libwayland-egl.so /usr/local/lib/libwayland-client.so /usr/local/lib/libxkbcommon.so /usr/local/lib/libxcb.so /usr/local/lib/libxkbcommon-x11.so /usr/local/lib/libdecor-0.so /usr/local/lib/libGLU.so /usr/local/lib/libOpenGL.so -lm -Wl,--end-group
ld: error: undefined symbol: timerfd_create
>>> referenced by wayland.c:237 (src/vulkan/wsi/wayland.c:237)
>>>               src/vulkan/vkgears.p/wsi_wayland.c.o:(init_display)

ld: error: undefined symbol: epoll_shim_close
>>> referenced by wayland.c:181 (src/vulkan/wsi/wayland.c:181)
>>>               src/vulkan/vkgears.p/wsi_wayland.c.o:(keymap)

ld: error: undefined symbol: timerfd_settime
>>> referenced by wayland.c:201 (src/vulkan/wsi/wayland.c:201)
>>>               src/vulkan/vkgears.p/wsi_wayland.c.o:(leave)
>>> referenced by wayland.c:148 (src/vulkan/wsi/wayland.c:148)
>>>               src/vulkan/vkgears.p/wsi_wayland.c.o:(handle_key)

ld: error: undefined symbol: epoll_shim_poll
>>> referenced by wayland.c:388 (src/vulkan/wsi/wayland.c:388)
>>>               src/vulkan/vkgears.p/wsi_wayland.c.o:(update_window)

ld: error: undefined symbol: epoll_shim_read
>>> referenced by wayland.c:423 (src/vulkan/wsi/wayland.c:423)
>>>               src/vulkan/vkgears.p/wsi_wayland.c.o:(update_window)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Merge request reports