[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] readline-5.2 does not link necessary libraries, break
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] readline-5.2 does not link necessary libraries, breaking parted |
Date: |
Sun, 25 Mar 2007 19:51:28 -0400 |
User-agent: |
Thunderbird 1.5.0.10 (Macintosh/20070221) |
Adam J. Richter wrote:
> When readline-5.2 builds its sharead library, it does not
> "-lcurses" to the ld command. Consequently, the resultant .so file
> does not indicate the it needs libcurses.so. So, attempts to link to
> link agaisnt readline using "ld --if-needed" will fail. For example,
> the configure script for GNU parted-1.8.6 attempts to link a test
> program on my system thusly:
>
> cc -o conftest conftest.c -Wl,--if-needed -lreadline -lncurses [...]
>
> "--if-needed" does not consider symbols that were undefined in
> other shared libraries (such as readline requiring symbols from
> ncurses). So, the link fails. Without "--if-needed", the link succeeds.
Here's what I wrote in response to a recent query on the same subject:
It is the application's responsibility to decide which library (termcap,
curses, ncurses, etc.) should be used to provide the necessary symbols
and to link with it. Bash uses the BASH_CHECK_LIB_TERMCAP autoconf macro
to do the job; other applications use similar mechanisms.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/