DeltaPorts icon indicating copy to clipboard operation
DeltaPorts copied to clipboard

graphics/wayland: switch to devel/libepoll-shim

Open jbeich opened this issue 3 years ago • 4 comments

libepoll-shim upstream claims to support all BSDs nowadays. Given DragonFly supports many apps from wlroots ecosystem the coverage should be good. If graphics/weston breaks maybe adapt some fixes from a FreeBSD fork.

Inspired by https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/120

jbeich avatar Mar 17 '21 13:03 jbeich

@jbeich not true unless they don't include DragonFly in the "all BSDs" definition:

antonioh@devbox:~/s/epoll-shim/build$ cmake --build .
Scanning dependencies of target epoll-shim
[  3%] Building C object src/CMakeFiles/epoll-shim.dir/epoll_shim_ctx.c.o
<command-line>: error: two or more data types in declaration specifiers
In file included from /home/antonioh/s/epoll-shim/src/epoll_shim_ctx.h:4,
                 from /home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c:1:
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c: In function 'fd_context_map__RB_REMOVE':
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c:85:1: error: dereferencing pointer to incomplete type 'struct fd_context_map__scan_info'
 RB_GENERATE_STATIC(fd_context_map_, fd_context_map_node_, entry,
 ^~~~~~~~~~~~~~~~~~
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c:85:20: warning: implicit declaration of function 'fd_context_map__RB_NEXT'; did you mean 'fd_context_map__RB_REMOVE'? [-Wimplicit-function-declaration]
 RB_GENERATE_STATIC(fd_context_map_, fd_context_map_node_, entry,
                    ^~~~~~~~~~~~~~~
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c: In function '_fd_context_map__RB_SCAN':
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c:85:1: error: storage size of 'info' isn't known
 RB_GENERATE_STATIC(fd_context_map_, fd_context_map_node_, entry,
 ^~~~~~~~~~~~~~~~~~
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c: At top level:
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c:85:20: error: conflicting types for 'fd_context_map__RB_NEXT'
 RB_GENERATE_STATIC(fd_context_map_, fd_context_map_node_, entry,
                    ^~~~~~~~~~~~~~~
/home/antonioh/s/epoll-shim/src/epoll_shim_ctx.c:85:20: note: previous implicit declaration of 'fd_context_map__RB_NEXT' was here
 RB_GENERATE_STATIC(fd_context_map_, fd_context_map_node_, entry,
                    ^~~~~~~~~~~~~~~
gmake[2]: *** [src/CMakeFiles/epoll-shim.dir/build.make:82: src/CMakeFiles/epoll-shim.dir/epoll_shim_ctx.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:932: src/CMakeFiles/epoll-shim.dir/all] Error 2
gmake: *** [Makefile:160: all] Error 2



tuxillo avatar Mar 17 '21 14:03 tuxillo

@tuxillo, can you re-try with more recent snapshot? See https://github.com/jiixyj/epoll-shim/commit/e499ec0c93b0

jbeich avatar Mar 17 '21 15:03 jbeich

You were right, I was using an old copy (from freebsddesktop):

100% tests passed, 0 tests failed out of 118

Total Test time (real) =  51.39 sec

The following tests did not run:
         22 - epoll-test.epoll__signalfd_in_thread (Skipped)
         24 - epoll-test.epoll__epollhup_on_fresh_socket (Skipped)
         65 - signalfd-test.signalfd__sigwait_openbsd (Skipped)
         66 - signalfd-test.signalfd__sigchld (Skipped)
         76 - eventfd-ctx-test.eventfd__pollout (Skipped)
         83 - eventfd-ctx-test.eventfd__fork (Skipped)
         86 - eventfd-ctx-test.eventfd__epoll (Skipped)
         88 - pipe-test.pipe__poll_write_end_after_read_end_close (Skipped)
         90 - pipe-test.pipe__poll_full_write_end_after_read_end_close_hup (Skipped)
         93 - pipe-test.pipe__poll_full_minus_512b_write_end_after_read_end_close (Skipped)
         94 - pipe-test.pipe__pipe_event_poll (Skipped)
        100 - pipe-test.pipe__closed_read_end (Skipped)
        102 - pipe-test.pipe__closed_read_end_register_before_close (Skipped)
        103 - pipe-test.pipe__closed_write_end (Skipped)

tuxillo avatar Mar 17 '21 15:03 tuxillo

For now we've removed our newport for x11/libinput and switched to the FreeBSD ports version which uses the epoll shim. I'll ask around if anybody is using wayland so that they can test, I'm worried that something could stop working since there are wayland users in DFly.

tuxillo avatar Jun 26 '22 15:06 tuxillo

I don't know about wayland specifically but our libinput seems to work ok. I think we can safely close this issue.

daftaupe avatar Aug 06 '24 15:08 daftaupe