Bug 162023 - readline should link with termcap or ncurses
readline should link with termcap or ncurses
Product: Fedora
Classification: Fedora
Component: readline (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
: 165979 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-06-29 03:56 EDT by Oskar Liljeblad
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-29 04:31:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Oskar Liljeblad 2005-06-29 03:56:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
If you want to compile a program that links with readline you have to link with ncurses or termcap or some other library that provides certain symbols. This is because the readline library so file itself doesn't depend on such a library. I think it would be most useful if it did. I think it is just a matter of putting SHLIB_LIBS=-lncurses after make, but I haven't tested (see patch below).

I crosscompile & crossbuild my RPM packages from a Debian installation. On Debian readline depends on ncurses through the above SHLIB_LIBS

diff -u readline.spec.v0 readline.spec
--- readline.spec.v0    2005-03-02 17:16:00.000000000 +0100
+++ readline.spec       2005-06-29 09:53:25.000000000 +0200
@@ -56,7 +56,7 @@

-make all shared
+make SHLIB_LIBS=-lncurses all shared

 [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
echo "int main() {}" > demo.c
gcc -o demo demo.c -lreadline

Actual Results:  undefined symbols

Expected Results:  no errors

Additional info:
Comment 1 Tim Waugh 2005-06-29 04:31:27 EDT
There are people who need to link against termcap, and people who need to link
against ncurses.  The choice has to be made at compile time for *their* app, not
Comment 2 Tim Waugh 2005-08-15 11:09:35 EDT
*** Bug 165979 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.