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: Chet Ramey
Subject: Re: [Bug-readline] libreadline.so.7: undefined symbol: UP
Date: Tue, 24 Oct 2017 14:52:57 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/23/17 12:56 PM, Jeffrey Walton wrote:

>> 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.

You don't have to. That's what the SHLIB_LIBS Makefile variable (set
by configure via the shobj-conf script) does:

SHLIB_LIBS      Any additional libraries that shared libraries should be
                linked against when they are created.

If you want readline to link against ncurses or terminfo at build time, so
applications don't have to do it, you can run

make SHLIB_LIBS=-lncursesw

or similar without messing with the generated Makefiles.

> 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:

Not sure how you specified it, but readline's configure doesn't substitute
LIBS into the Makefiles, and the Makefiles don't use it.

> 
> 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.

You are on the right track, but you can just specify SHLIB_LIBS when you
run make. I could change shobj-conf to preserve any value for SHLIB_LIBS
it imports from the environment, since only a couple of systems set it
there. I'll look at doing that.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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