Bug 1025744
Summary: | pkg-config doesn't show tinfo link flag for ncurses | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Deepu K S <dkochuka> | ||||
Component: | ncurses | Assignee: | Miroslav Lichvar <mlichvar> | ||||
Status: | CLOSED ERRATA | QA Contact: | Martin Frodl <mfrodl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.4 | CC: | chantry.xavier, cww, dkochuka, dkutalek, gregory.0xf0, mfrodl, mlichvar, ovasik, philwyett.vendetta | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | ncurses-5.7-4.20090207.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause:
The ncurses pc (pkg-config) files didn't include -ltinfo for static linking with ncurses.
Consequence:
Compilation of applications that use pkg-config and static linking could fail.
Fix:
Include -ltinfo in the pkg-config files
Result:
Applications compile successfully.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-03-16 08:40:11 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 947782, 1075802, 1159825 | ||||||
Attachments: |
|
Description
Deepu K S
2013-11-01 12:27:56 UTC
Created attachment 818281 [details]
ncurses.pc file with tinfo added
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux. Yes, with static linking -ltinfo should be included in the list. But it needs to be in requires.private so it's not listed when using dynamic linking. I.e. Requires.private: tinfo Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0687.html If "pkg-config --libs ncurses" returns only "-lncurses", and the linker flags --no-add-needed is used, don't we have a problem ? If I understood correctly, the --no-add-needed flag even became the default in redhat 7. And when using clang, which invokes directly the linker, the --no-add-needed flag is always added as soon as we are on a redhat system (c.f. https://llvm.org/bugs/show_bug.cgi?id=19745) And on debian "pkg-config --libs ncurses" returns "-lncurses -ltinfo". That said, I guess I can use "pkg-config --libs ncurses tinfo" instead, centos 5 did not have a pkgconfig file anyway, and this will work on redhat >= 6 and on debian. I think that depends on the application. If it uses the libtinfo symbols, it should use pkg-config to get the tinfo libs and don't expect it will be included in the ncurses libs. |