Summary: | sys-apps/usbguard-0.7.8 - ./.libs/libusbguard.so: error: undefined reference to 'pthread_create' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dennis Schridde <dschridde+gentoobugs> |
Component: | Current packages | Assignee: | Sebastian Pipping <sping> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jstein |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/USBGuard/usbguard/issues/432 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
usbguard-0.7.8-pthread.patch |
Description
Dennis Schridde
2020-11-16 12:39:03 UTC
Could be related to use of GCC 10, I haven't been able to reproduce the issue yet. Created attachment 674623 [details, diff]
usbguard-0.7.8-pthread.patch
Attached patch makes usbguard build for me, together with:
```
# cat /etc/portage/env/sys-apps/usbguard-0.7.8
#!/bin/sh
post_src_prepare() {
cd "${S}"
autoreconf -i
}
```
Note that it is likely a hack. I could not find evidence that usbguard uses pthreads directly (greping reveals no function calls). I assume that instead the pthread calls make their way into libusbguard.so through some definitions in a header file of a dependency. Maybe libqb, but I did not investigate this yet.
P.S. Please note especially that the important part was passing PTHREAD_CFLAGS to the linker. Without that (and with just PTHREAD_LIBS being passed to the linker) it would still not compile. Thanks for your research. I must admit I'm not a fan of patching issues before I can reproduce them locally. I think I should involve upstream and open an issue with them. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4513980b9b0042067415a706732fccde87014d7f commit 4513980b9b0042067415a706732fccde87014d7f Author: Sebastian Pipping <sping@gentoo.org> AuthorDate: 2021-01-31 17:19:19 +0000 Commit: Sebastian Pipping <sping@gentoo.org> CommitDate: 2021-01-31 17:21:11 +0000 sys-apps/usbguard: Fix pthreads linking issue Thanks for the patch (that went upstream) to Dennis Schridde! Closes: https://bugs.gentoo.org/754906 Signed-off-by: Sebastian Pipping <sping@gentoo.org> Package-Manager: Portage-3.0.14, Repoman-3.0.2 .../files/usbguard-1.0.0-pthreads-link.patch | 36 ++++++++++++++++++++++ sys-apps/usbguard/usbguard-0.7.8.ebuild | 13 +++++++- sys-apps/usbguard/usbguard-1.0.0.ebuild | 11 +++++++ 3 files changed, 59 insertions(+), 1 deletion(-) |