aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/ncurses.xml
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2021-12-04 16:53:16 +0800
committerXi Ruoyao <xry111@mengyan1223.wang>2021-12-04 16:53:16 +0800
commit88bbf22f8b83290658266330f99ac2a05cad768d (patch)
treede0a740ac8fb20033a82de931e48ac250cb2dee1 /chapter08/ncurses.xml
parent0fc98a07ffecf993c6597d71089e40b3f5687fae (diff)
ncursesw: do not in-place overwrite library being used by bash
Diffstat (limited to 'chapter08/ncurses.xml')
-rw-r--r--chapter08/ncurses.xml24
1 files changed, 17 insertions, 7 deletions
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 @@
<filename>README</filename> file in that directory for further details.
</para>
- <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+ <!-- To editors: crash of shell process was very rare but really
+ observed. We can't simply remove /usr/lib/libncursesw.so.6.x like
+ how we handle libmozjs-xx.so in BLFS because bash needs it, and
+ make will spawn new shell processes during "make install". -->
+
+ <para>The installation of this package will overwrite
+ <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>
+ in-place. It may crash the shell process which is using code and data
+ from the library file. Install the package with
+ <literal>DESTDIR</literal>, and replace the library file correctly using
+ <command>install</command> command. A useless static archive which is
+ not handled by <command>configure</command> is also removed:</para>
+
+<screen><userinput remap="install">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/* /</userinput></screen>
<para>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</userinput></screen>
echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
- <para>Remove a static library that is not handled by configure:</para>
-
-<screen><userinput remap="install">rm -fv /usr/lib/libncurses++w.a</userinput></screen>
-
<para>If desired, install the Ncurses documentation:</para>
<screen><userinput remap="install">mkdir -pv /usr/share/doc/ncurses-&ncurses-version;