Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkcs11: add missing threads dependency #485

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

oldium
Copy link
Contributor

@oldium oldium commented Oct 5, 2024

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

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 <[email protected]>
@sarroutbi
Copy link
Collaborator

Hello @oldium . Thanks for your PR.

May I ask why was not this detected by the corresponding GH action?

@oldium
Copy link
Contributor Author

oldium commented Oct 6, 2024

I have not checked this specifically earlier, but I found there were some recent changes in glibc and its integration of standard libraries. This article brings some details - https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread.

@sarroutbi
Copy link
Collaborator

I have not checked this specifically earlier, but I found there were some recent changes in glibc and its integration of standard libraries. This article brings some details - https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread.

OK. Thanks for the information

Copy link
Collaborator

@sarroutbi sarroutbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR @oldium . Changes LGTM

@sarroutbi sarroutbi merged commit 9d854e9 into latchset:master Oct 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants