meson: require epoll-shim on BSDs

epoll/timerfd are Linux-only but BSDs have a shim via kqueue.
libwayland on FreeBSD uses epoll-shim by default, so the build may
fail at linking instead of compilation stage.

csi.c:13:10: fatal error: 'sys/timerfd.h' file not found
 #include <sys/timerfd.h>
          ^~~~~~~~~~~~~~~
selection.c:10:10: fatal error: 'sys/epoll.h' file not found
 #include <sys/epoll.h>
          ^~~~~~~~~~~~~
terminal.c:15:10: fatal error: 'sys/epoll.h' file not found
 #include <sys/epoll.h>
          ^~~~~~~~~~~~~
ld: error: undefined symbol: timerfd_create
>>> referenced by pgo.c:154 (pgo/pgo.c:154)
>>>               pgo.p/pgo_pgo.c.o:(main)
>>> referenced by pgo.c:158 (pgo/pgo.c:158)
>>>               pgo.p/pgo_pgo.c.o:(main)
>>> referenced by terminal.c:2022 (terminal.c:2022)
>>>               terminal.c.o:(cursor_blink_rearm_timer) in archive libpgolib.a
>>> referenced 7 more times

ld: error: undefined symbol: epoll_shim_close
>>> referenced by pgo.c:160 (pgo/pgo.c:160)
>>>               pgo.p/pgo_pgo.c.o:(main)
>>> referenced by pgo.c:258 (pgo/pgo.c:258)
>>>               pgo.p/pgo_pgo.c.o:(main)
>>> referenced by pgo.c:277 (pgo/pgo.c:277)
>>>               pgo.p/pgo_pgo.c.o:(main)
>>> referenced 14 more times

ld: error: undefined symbol: epoll_shim_read
>>> referenced by pgo.c:251 (pgo/pgo.c:251)
>>>               pgo.p/pgo_pgo.c.o:(main)
>>> referenced by terminal.c:237 (terminal.c:237)
>>>               terminal.c.o:(fdm_ptmx) in archive libpgolib.a
>>> referenced by terminal.c:363 (terminal.c:363)
>>>               terminal.c.o:(fdm_blink) in archive libpgolib.a
>>> referenced 8 more times

ld: error: undefined symbol: timerfd_settime
>>> referenced by terminal.c:301 (terminal.c:301)
>>>               terminal.c.o:(fdm_ptmx) in archive libpgolib.a
>>> referenced by terminal.c:309 (terminal.c:309)
>>>               terminal.c.o:(fdm_ptmx) in archive libpgolib.a
>>> referenced by terminal.c:2041 (terminal.c:2041)
>>>               terminal.c.o:(cursor_blink_rearm_timer) in archive libpgolib.a
>>> referenced 11 more times

ld: error: undefined symbol: timerfd_gettime
>>> referenced by selection.c:1165 (selection.c:1165)
>>>               selection.c.o:(selection_start_scroll_timer) in archive libpgolib.a
This commit is contained in:
Jan Beich 2021-01-19 15:54:18 +00:00 committed by Daniel Eklöf
parent 796301f228
commit 3ac107ce82
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -61,6 +61,7 @@ endif
math = cc.find_library('m')
threads = [dependency('threads'), cc.find_library('stdthreads', required: false)]
libepoll = dependency('epoll-shim', required: false)
pixman = dependency('pixman-1')
wayland_protocols = dependency('wayland-protocols')
wayland_client = dependency('wayland-client')
@ -129,7 +130,7 @@ vtlib = static_library(
'vt.c', 'vt.h',
wl_proto_src + wl_proto_headers,
version,
dependencies: [pixman, fcft, tllist],
dependencies: [libepoll, pixman, fcft, tllist],
link_with: misc,
)
@ -139,7 +140,7 @@ pgolib = static_library(
'selection.c', 'selection.h',
'terminal.c', 'terminal.h',
wl_proto_src + wl_proto_headers,
dependencies: [pixman, fcft, tllist],
dependencies: [libepoll, pixman, fcft, tllist],
link_with: vtlib,
)
@ -147,7 +148,7 @@ executable(
'pgo',
'pgo/pgo.c',
wl_proto_src + wl_proto_headers,
dependencies: [math, threads, pixman, wayland_client, fcft, tllist],
dependencies: [math, threads, libepoll, pixman, wayland_client, fcft, tllist],
link_with: pgolib,
)
@ -175,7 +176,7 @@ executable(
'user-notification.h',
'wayland.c', 'wayland.h',
wl_proto_src + wl_proto_headers, version,
dependencies: [math, threads, pixman, wayland_client, wayland_cursor, xkb, fontconfig,
dependencies: [math, threads, libepoll, pixman, wayland_client, wayland_cursor, xkb, fontconfig,
tllist, fcft],
link_with: pgolib,
install: true)