bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] libreadline.so.7: undefined symbol: UP


From: Jeffrey Walton
Subject: Re: [Bug-readline] libreadline.so.7: undefined symbol: UP
Date: Mon, 23 Oct 2017 12:56:54 -0400

On Mon, Oct 23, 2017 at 11:32 AM, Chet Ramey <address@hidden> wrote:
> On 10/22/17 10:57 PM, Jeffrey Walton wrote:
>> I keep hitting this issue when building programs like cURL and Git
>> against Readline 7:
>>
>>   $ ./configure
>>   configure: creating ./config.status
>>   config.status: creating Makefile
>>   gawk: symbol lookup error: /usr/local/lib64/libreadline.so.7:
>> undefined symbol: UP
>>   config.status: error: could not create Makefile
>>
>> Sure enough:
>>
>>   $ nm -D /usr/local/lib64/libreadline.so | egrep 'UP|DOWN|LEFT|RIGHT'
>>                  U UP
>>
>> Others have hit the issue. Conventional wisdom from the various posts
>> is, downgrade to readline 6.3.
>>
>> I've reviewed the CHANGELOG but but I'm not seeing what changed and why.
>>
>> Could someone please please explain the change to me, and explain what
>> needs to be done to get the symbol back?
>
> Readline doesn't provide this symbol. It's an extern exported by the
> termcap/termlib/ncurses library as part of the termcap interface, along
> with BC/PC/ospeed.
>
> You can either link with ncurses, as bash does, or link readline with the
> ncurses library when the shared library is constructed, as some vendors do.

Thanks Chet.

No, we were not using LD_PRELOAD tricks.

We think we tracked it down to the dynamic loader caching readline
location at /usr/local/lib64. The one at /usr/local/lib64 was being
configuration tested. Later, when /usr/bin/gawk ran, the stupid-ass
loader guessed and used the wrong library from /usr/local/lib64 (with
no way for us to say, programs from /usr/bin link to libraries in
/lib64 and /usr/lib64).

We also needed a small hack for readline on Fedora 26 after unpacking.
We found that symbol in libtinfow.so (and its archive). The configure
program did not honor our request to add -ltinfow to LIBS:

if [[ -f "$INSTALL_LIBDIR/libtinfow.so" ]]; then
    for mfile in $(find "$PWD" -name 'Makefile'); do
        sed -i 's|SHLIB_LIBS =|SHLIB_LIBS = -ltinfow|g' "$mfile"
    done
fi

The SHLIB_LIBS change created the dependencies we needed so that when
/usr/bin/gawk [incorrectly] loaded /usr/local/lib64/libreadline.so,
/usr/local/lib64/libtinfow.so was loaded too.

Several others have experienced the problem, too. Most advice was to
downgrade to readline 6.3. However, we wanted to use 7.0, so we
avoided the downgrade and performed the hack.

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]