Ignore:
Timestamp:
12/26/2005 07:00:06 PM (18 years ago)
Author:
Archaic <archaic@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
94aa6621
Parents:
2550494
Message:

Applied Alexander Patrakov's patch which adds UTF-8 capability to the
development branch of the LFS Book.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7235 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/ncurses.xml

    r2550494 r5536f74  
    2929<sect2 role="installation">
    3030<title>Installation of Ncurses</title>
     31<!-- Uncomment if using a dated ncurses release instead of a numbered one.
     32
     33<para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
     34and features added. The most important news are .......
     35To get these fixes and features, apply the rollup patch:</para>
     36
     37<screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
     38-->
     39
     40<para>Since the release of Ncurses-&ncurses-version;, a memory leak and some
     41display bugs were found and fixed upstream. Apply those fixes:</para>
     42
     43<screen><userinput>patch -Np1 -i ../&ncurses-fixes-patch;</userinput></screen>
    3144
    3245<para>Prepare Ncurses for compilation:</para>
    3346
    34 <screen><userinput>./configure --prefix=/usr --with-shared --without-debug</userinput></screen>
     47<screen><userinput>./configure --prefix=/usr --with-shared --without-debug --enable-widec</userinput></screen>
     48
     49<para>The meaning of the configure options:</para>
     50
     51<variablelist>
     52<varlistentry>
     53<term><parameter>--enable-widec</parameter></term>
     54<listitem><para>This switch causes wide-character libraries
     55(e.g. <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
     56to be built instead of normal ones
     57(e.g. <filename class="libraryfile">libncurses.so.&ncurses-version;</filename>).
     58Those wide-character libraries are usable in both multibyte and traditional 8-bit
     59locales, while normal libraries work properly only in 8-bit locales.
     60Wide-character and normal libraries are source-compatible, but not
     61binary-compatible.</para>
     62</listitem>
     63</varlistentry>
     64<!--
     65<varlistentry>
     66<term><parameter>- -without-cxx-binding</parameter></term>
     67<listitem><para>This optional switch causes the
     68<filename class="libraryfile">libncurses++w.a</filename> library
     69not to be built. Nothing in LFS and BLFS uses this library.</para>
     70</listitem>
     71</varlistentry>
     72-->
     73</variablelist>
    3574
    3675<para>Compile the package:</para>
     
    5089<para>Fix a library that should not be executable:</para>
    5190
    52 <screen><userinput>chmod -v 644 /usr/lib/libncurses++.a</userinput></screen>
     91<screen><userinput>chmod -v 644 /usr/lib/libncurses++w.a</userinput></screen>
    5392
    5493<para>Move the libraries to the <filename class="directory">/lib</filename> directory,
    5594where they are expected to reside:</para>
    5695
    57 <screen><userinput>mv -v /usr/lib/libncurses.so.5* /lib</userinput></screen>
    58 
    59 <para>Because the libraries have been moved, a few symlinks point to
    60 non-existent files. Recreate those symlinks:</para>
    61 
    62 <screen><userinput>ln -sfv ../../lib/libncurses.so.5 /usr/lib/libncurses.so
    63 ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
     96<screen><userinput>mv -v /usr/lib/libncursesw.so.5* /lib</userinput></screen>
     97
     98<para>Because the libraries have been moved, one symlink points to
     99a non-existent file. Recreate it:</para>
     100
     101<screen><userinput>ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
     102
     103<para>Many applications still expect the linker to be able to find
     104non-wide-character Ncurses libraries. Trick such applications into linking with
     105wide-character libraries by means of symlinks and linker scripts:</para>
     106
     107<screen><userinput>for lib in curses ncurses form panel menu ; do \
     108        rm -vf /usr/lib/lib${lib}.so ; \
     109        echo "INPUT(-l${lib}w)" &gt;/usr/lib/lib${lib}.so ; \
     110        ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
     111done &amp;&amp;
     112ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
     113
     114<para>Finally, make sure that really old applications that look for
     115<filename class="libaryfile">-lcurses</filename> at build time are still
     116buildable:</para>
     117
     118<screen><userinput>echo "INPUT(-lncursesw)" &gt;/usr/lib/libcursesw.so &amp;&amp;
     119ln -sfv libncurses.so /usr/lib/libcurses.so &amp;&amp;
     120ln -sfv libncursesw.a /usr/lib/libcursesw.a &amp;&amp;
     121ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
     122
     123<note><para>The instructions above don't create non-wide-character Ncurses
     124libraries since nothing in LFS and BLFS would link against them at runtime.
     125If you must have such libraries because of some binary-only application,
     126build them with the following commands:</para>
     127<screen role="nodump"><userinput>make distclean &amp;&amp;
     128./configure --prefix=/usr --with-shared --without-normal \
     129        --without-debug --without-cxx-binding &amp;&amp;
     130make sources libs &amp;&amp;
     131cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
     132</note>
    64133</sect2>
    65134
     
    72141<seglistitem><seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
    73142reset (link to tset), tack, tic, toe, tput, and tset</seg>
    74 <seg>libcurses.[a,so] (link to libncurses.[a,so]), libform.[a,so], libmenu.[a,so],
    75 libncurses++.a, libncurses.[a,so], and libpanel.[a,so]</seg></seglistitem>
     143<seg>libcursesw.[a,so] (symlink and linker script to libncursesw.[a,so]),
     144libformw.[a,so], libmenuw.[a,so],
     145libncurses++w.a, libncursesw.[a,so], libpanelw.[a,so] and their
     146non-wide-character counterparts without "w" in the library names.</seg></seglistitem>
    76147</segmentedlist>
    77148
     
    213284
    214285</sect1>
    215 
Note: See TracChangeset for help on using the changeset viewer.