From 9d854e9c7f6e1e89588ca5ecb058622d429bc02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Sun, 6 Oct 2024 21:30:11 +0200 Subject: [PATCH] pkcs11: add missing threads dependency (#485) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following error when building for Debian 11: ``` FAILED: src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock cc -o src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.p/clevis-pkcs11-afunix-socket-unlock.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -g -O2 -ffile-prefix-map=/usr/src/clevis-21=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 /usr/bin/ld: src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.p/clevis-pkcs11-afunix-socket-unlock.c.o: in function `main': ./obj-x86_64-linux-gnu/../src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c:270: undefined reference to `pthread_create' /usr/bin/ld: ./obj-x86_64-linux-gnu/../src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c:359: undefined reference to `pthread_kill' /usr/bin/ld: ./obj-x86_64-linux-gnu/../src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c:361: undefined reference to `pthread_join' collect2: error: ld returned 1 exit status ``` Signed-off-by: Oldřich Jedlička --- src/pins/pkcs11/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pins/pkcs11/meson.build b/src/pins/pkcs11/meson.build index 12852859..b09fd8f8 100644 --- a/src/pins/pkcs11/meson.build +++ b/src/pins/pkcs11/meson.build @@ -27,7 +27,9 @@ if pcscd.found() and pkcs11tool.found() ### TODO: Include man pages # mans += join_paths(meson.current_source_dir(), 'clevis-decrypt-pkcs11.1') subdir('tests') + threads_dep = dependency('threads', required: true) executable('clevis-pkcs11-afunix-socket-unlock', ['clevis-pkcs11-afunix-socket-unlock.c'], + dependencies: threads_dep, install_dir: bindir, install: true, c_args: GIT_VERSION_FLAG