Skip to content

Commit

Permalink
pkcs11: add missing threads dependency (#485)
Browse files Browse the repository at this point in the history
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 <oldium.pro@gmail.com>
  • Loading branch information
oldium authored Oct 6, 2024
1 parent 75fde36 commit 9d854e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pins/pkcs11/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9d854e9

Please sign in to comment.