Bug 951781
Summary: | guile-1.8 linked with pthreads but no -lpthread in pkg-config --libs | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sebastian Freundt <devel> |
Component: | guile | Assignee: | Miroslav Lichvar <mlichvar> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 18 | CC: | jsynacek, mlichvar |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-04-19 09:22:02 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Sebastian Freundt
2013-04-13 05:42:02 UTC
Fedora's linker does not use indirect linking (https://fedoraproject.org/wiki/UnderstandingDSOLinkChange), so you have to provide -lpthread yourself. However, I'm not sure if this should be 'fixed' or not, I'm currently discussing it with upstream. As stated before, you should provide the correct flags yourself, as indirect linking is not supported. Closing this bug. Yep. I guess I just won't support Fedora then. This is inherently broken. If pkg-config can't tell me what to link with, who else can? Thanks for the effort though. > If pkg-config can't tell me what to link with, who else can?
pkg-config is telling you what you asked for - the guile linker flags. It won't tell you what you need to link from what you use in your source code.
However, you can tell gcc to indirectly include NEEDED symbols from the Dynamic section, just add -Wl,--copy-dt-needed-entries.
That's wrong, pkg-config is supposed to tell me what *I* need to add to *my* linker line when I want to link to libguile. And it just doesn't do that. The upstream guile doesn't have that problem as it won't be linked with pthread support by default. That's just another Fedora patch. However, upstream makes the mistake of not mentioning -lpthread in their .pc when it was configured with pthread support and hence does need to be linked with -lpthread. I will take this to upstream directly. Adding more and more kludges to my linker lines is definitely not the way to go. I want to write lean and portable code. I already started the discussion: http://lists.gnu.org/archive/html/guile-devel/2013-04/msg00165.html |