Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphics/wayland: switch to devel/libepoll-shim #1043

Open
jbeich opened this issue Mar 17, 2021 · 4 comments
Open

graphics/wayland: switch to devel/libepoll-shim #1043

jbeich opened this issue Mar 17, 2021 · 4 comments

Comments

@jbeich
Copy link

jbeich commented Mar 17, 2021

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

@tuxillo
Copy link
Member

tuxillo commented Mar 17, 2021

@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



@jbeich
Copy link
Author

jbeich commented Mar 17, 2021

@tuxillo, can you re-try with more recent snapshot? See jiixyj/epoll-shim@e499ec0c93b0

@tuxillo
Copy link
Member

tuxillo commented Mar 17, 2021

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
Copy link
Member

tuxillo commented Jun 26, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants