From 88bbf22f8b83290658266330f99ac2a05cad768d Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 4 Dec 2021 16:53:16 +0800 Subject: ncursesw: do not in-place overwrite library being used by bash --- chapter08/ncurses.xml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'chapter08/ncurses.xml') diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml index 7b0da21fe..64e7c7653 100644 --- a/chapter08/ncurses.xml +++ b/chapter08/ncurses.xml @@ -97,9 +97,23 @@ README file in that directory for further details. - Install the package: - -make install + + + The installation of this package will overwrite + libncursesw.so.&ncurses-version; + in-place. It may crash the shell process which is using code and data + from the library file. Install the package with + DESTDIR, and replace the library file correctly using + install command. A useless static archive which is + not handled by configure is also removed: + +make DESTDIR=$PWD/dest install +install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib +rm -v dest/usr/lib/{libncursesw.so.&ncurses-version;,libncurses++w.a} +cp -av dest/* / Many applications still expect the linker to be able to find non-wide-character Ncurses libraries. Trick such applications into linking with @@ -119,10 +133,6 @@ done echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so ln -sfv libncurses.so /usr/lib/libcurses.so - Remove a static library that is not handled by configure: - -rm -fv /usr/lib/libncurses++w.a - If desired, install the Ncurses documentation: mkdir -pv /usr/share/doc/ncurses-&ncurses-version; -- cgit v1.2.3-54-g00ecf