aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2021-01-19 15:54:18 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-23 08:52:41 +0000
commit603bbcbcff3514e29ea54dc316010027a6d740a9 (patch)
treee1ecfefc8dd445b27485ea0cfeb33a602ea92035
parentmeson: libpthread may lack C11 threads e.g., on FreeBSD (diff)
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
-rw-r--r--meson.build9
1 files changed, 5 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 2c7954fd..dd3c07c1 100644
--- a/meson.build
+++ b/meson.build
@@ -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')
@@ -130,7 +131,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,
)
@@ -140,7 +141,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,
)
@@ -148,7 +149,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,
)
@@ -177,7 +178,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)