From d97b5389173f6fb5924c3546cdd5b8a03fcb90cc Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 19 Jan 2021 15:48:56 +0000 Subject: [PATCH] meson: libpthread may lack C11 threads e.g., on FreeBSD ld: error: undefined symbol: mtx_init >>> referenced by terminal.c:579 (terminal.c:579) >>> terminal.c.o:(initialize_render_workers) in archive libpgolib.a ld: error: undefined symbol: thrd_create >>> referenced by terminal.c:595 (terminal.c:595) >>> terminal.c.o:(initialize_render_workers) in archive libpgolib.a >>> referenced by terminal.c:935 (terminal.c:935) >>> terminal.c.o:(reload_fonts) in archive libpgolib.a >>> did you mean: thr_create >>> defined in: /lib/libc.so.7 ld: error: undefined symbol: mtx_lock >>> referenced by terminal.c:1410 (terminal.c:1410) >>> terminal.c.o:(term_destroy) in archive libpgolib.a ld: error: undefined symbol: mtx_unlock >>> referenced by terminal.c:1427 (terminal.c:1427) >>> terminal.c.o:(term_destroy) in archive libpgolib.a ld: error: undefined symbol: thrd_join >>> referenced by terminal.c:1462 (terminal.c:1462) >>> terminal.c.o:(term_destroy) in archive libpgolib.a >>> referenced by terminal.c:947 (terminal.c:947) >>> terminal.c.o:(reload_fonts) in archive libpgolib.a ld: error: undefined symbol: mtx_destroy >>> referenced by terminal.c:1466 (terminal.c:1466) >>> terminal.c.o:(term_destroy) in archive libpgolib.a --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 47ce4e43..2c7954fd 100644 --- a/meson.build +++ b/meson.build @@ -60,7 +60,7 @@ if cc.has_argument('-fmacro-prefix-map=/foo=') endif math = cc.find_library('m') -threads = dependency('threads') +threads = [dependency('threads'), cc.find_library('stdthreads', required: false)] pixman = dependency('pixman-1') wayland_protocols = dependency('wayland-protocols') wayland_client = dependency('wayland-client')