Changeset 5536f74 for chapter06


Ignore:
Timestamp:
12/26/2005 07:00:06 PM (19 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, 12.2, 12.2-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/loongarch-12.2, xry111/mips64el, xry111/multilib, 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

Location:
chapter06
Files:
2 added
16 edited

Legend:

Unmodified
Added
Removed
  • chapter06/chapter06.xml

    r2550494 r5536f74  
    3535<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>
    3636<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="less.xml"/>
     37<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gdbm.xml"/>
    3738<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="groff.xml"/>
    3839<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
     
    5657<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
    5758<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hotplug.xml"/>
    58 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man.xml"/>
     59<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-db.xml"/>
    5960<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
    6061<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="module-init-tools.xml"/>
  • chapter06/coreutils.xml

    r2550494 r5536f74  
    4141
    4242<screen><userinput>patch -Np1 -i ../&coreutils-suppress-patch;</userinput></screen>
     43
     44<para>POSIX requires that programs from Coreutils recognize character
     45boundaries correctly even in multibyte locales. The following patch
     46fixes this non-compliance and other internationalization-related bugs:</para>
     47
     48<screen><userinput>patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen>
     49
     50<para>In order for the tests added by this patch to pass, the permissions for
     51the test file have to be changed:</para>
     52
     53<screen><userinput>chmod +x tests/sort/sort-mb-tests</userinput></screen>
     54
     55<note><para>In the past, many bugs were found in this patch. When reporting
     56new bugs to Coreutils maintainers, please check first if they are reproducible
     57without this patch.</para></note>
     58
     59<para>It has been found that translated messages sometimes overflow a buffer
     60in the <command>who -Hu</command> command. Increase the buffer size:</para>
     61
     62<screen><userinput>sed -i 's,_LEN 6,_LEN 20,' src/who.c</userinput></screen>
    4363
    4464<para>Now prepare Coreutils for compilation:</para>
  • chapter06/diffutils.xml

    r2550494 r5536f74  
    2929<sect2 role="installation">
    3030<title>Installation of Diffutils</title>
     31
     32<para>POSIX requires that the <command>diff</command> command treats whitespace
     33characters according to the current locale. The following patch fixes the
     34non-complinace issue:</para>
     35
     36<screen><userinput>patch -Np1 -i ../&diffutils-i18n-patch;</userinput></screen>
    3137
    3238<para>Prepare Diffutils for compilation:</para>
  • chapter06/gawk.xml

    r2550494 r5536f74  
    2929<title>Installation of Gawk</title>
    3030
    31 <para>Patch Gawk to fix a bug which causes it to segfault when invoked on a
    32 non-existent file:</para>
     31<para>Under some circumstances, Gawk-&gawk-version;  attempts to free a chunk
     32of memory that was not allocated. This bug is fixed by the following patch:</para>
    3333
    3434<screen><userinput>patch -Np1 -i ../&gawk-segfault-patch;</userinput></screen>
     
    3838<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib</userinput></screen>
    3939
    40 <para>The configure script doesn't detect some functionality correctly.  The
    41 following commands correct this problem:</para>
     40<para>Due to a bug in the <command>./configure</command> script, Gawk fails
     41to detect certain aspects of locale support in glibc. This
     42bug leads to, e.g., Gettext testsuite failures. Work around this issue
     43by appending the missing macro definitions to <filename>config.h</filename>:</para>
    4244
    43 <screen><userinput>echo "#define HAVE_LANGINFO_CODESET 1" >> config.h
    44 echo "#define HAVE_LC_MESSAGES 1" >> config.h</userinput></screen>
     45<screen><userinput>cat &gt;&gt;config.h &lt;&lt;"EOF"
     46<literal>#define HAVE_LANGINFO_CODESET 1
     47#define HAVE_LC_MESSAGES 1</literal>
     48EOF</userinput></screen>
    4549
    4650<para>Compile the package:</para>
  • chapter06/glibc.xml

    r2550494 r5536f74  
    4848of achieving a clean build.</para>
    4949
     50<para>The glibc-libidn tarball adds support for internationalized
     51domain names (IDN) to Glibc. Note that many programs that
     52support IDN require the full libidn library from
     53<ulink url="http://josefsson.org/libidn/releases/"/>, not this add-on.
     54Unpack the tarball from within the Glibc source
     55directory:</para>
     56
     57<screen><userinput>tar jxf ../glibc-libidn-&glibc-version;.tar.bz2</userinput></screen>
     58
     59<para>In the vi_VN.TCVN locale, bash enters infinite loop at startup. It is
     60unknown whether this is a bash bug or a glibc problem. Disable installation
     61of this locale in order to avoid the problem:</para>
     62
     63<screen><userinput>sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED</userinput></screen>
     64
    5065<para>The Glibc documentation recommends building Glibc outside of the source
    5166directory in a dedicated build directory:</para>
     
    5772
    5873<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
    59     --disable-profile --enable-add-ons \
     74    --disable-profile --enable-add-ons=nptl,libidn \
    6075    --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc</userinput></screen>
    6176
     
    129144
    130145<screen><userinput>make localedata/install-locales</userinput></screen>
     146
     147<note><para>It is possible to create and install additional locales such as
     148ru_RU.CP1251 by means of the <command>localedef</command> command, as
     149explained in the <filename>INSTALL</filename> file in the Glibc source.</para></note>
     150<!-- The Live CD patches the localedata/SUPPORTED file instead of running localedef -->
    131151
    132152<para>To save time, an alternative to running the
     
    143163for the tests to run successfully:</para>
    144164
     165<!-- FIXME: recheck that "make localedata/install_locales" actually does the same -->
    145166<screen role="nodump"><userinput>mkdir -pv /usr/lib/locale
    146167localedef -i de_DE -f ISO-8859-1 de_DE
     
    153174localedef -i fr_FR -f ISO-8859-1 fr_FR
    154175localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
     176localedef -i fr_FR.UTF-8 -f UTF-8 fr_FR
    155177localedef -i it_IT -f ISO-8859-1 it_IT
    156178localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
    157179
    158 <para>Some locales installed by the <command>make
    159 localedata/install-locales</command> command above are not properly
    160 supported by some applications that are in the LFS and BLFS books.
    161 Because of the various problems that arise due to application
    162 programmers making assumptions that break in such locales, LFS should
    163 not be used in locales that utilize multibyte character sets
    164 (including UTF-8) or right-to-left writing order.  Numerous unofficial
    165 and unstable patches are required to fix these problems, and it has
    166 been decided by the LFS developers not to support such complex locales at this
    167 time.  This applies to the ja_JP and fa_IR locales as well&mdash;they have been
    168 installed only for GCC and Gettext tests to pass, and the
    169 <command>watch</command> program (part of the Procps package) does not work
    170 properly in them. Various attempts to circumvent these restrictions are
    171 documented in internationalization-related hints.</para>
    172 
     180<para>The first <command>localedef</command> above combines the
     181<filename>/usr/share/i18n/locales/de_DE</filename> charset-independent
     182locale definition with the
     183<filename>/usr/share/i18n/charmaps/ISO-8859-1.gz</filename> charmap definition
     184and appends the result to the
     185<filename>/usr/lib/locale/locale-archive</filename> file.</para>
    173186</sect2>
    174187
  • chapter06/grep.xml

    r2550494 r5536f74  
    2828<sect2 role="installation">
    2929<title>Installation of Grep</title>
     30
     31<para>The original Grep package has many bugs, especially in the support of
     32multibyte locales. RedHat fixed some of them by the following patch:</para>
     33
     34<screen><userinput>patch -Np1 -i ../&grep-fixes-patch;</userinput></screen>
     35
     36<para>In order for the tests added by this patch to pass, the permissions for
     37the test file have to be changed:</para>
     38
     39<screen><userinput>chmod +x tests/fmbtest.sh</userinput></screen>
    3040
    3141<para>Prepare Grep for compilation:</para>
  • chapter06/groff.xml

    r2550494 r5536f74  
    2929<title>Installation of Groff</title>
    3030
     31<para>Apply the patch that adds the "ascii8" and "nippon" devices to Groff:</para>
     32
     33<screen><userinput>zcat ../&groff-debian-patch; | patch -Np1</userinput></screen>
     34
     35<note><para>These devices are used by Man-DB when formatting non-English manual
     36pages that are not in the ISO-8859-1 encoding. There is no working patch for
     37Groff-1.19.x that adds this functionality at the time of this writing.
     38<!-- Details: http://bugs.debian.org/196762 -->
     39</para></note>
     40
     41<para>Many screen fonts don't have Unicode dashes in them. Tell groff to use
     42the ASCII hyphen instead:</para>
     43
     44<screen><userinput>sed -i 's,2010,002D,' font/devutf8/R.proto
     45sed -i 's,2212,002D,' font/devutf8/R.proto</userinput></screen>
     46
    3147<para>Groff expects the environment variable <envar>PAGE</envar>
    3248to contain the default paper size. For users in the United States,
    3349<parameter>PAGE=letter</parameter> is appropriate. Elsewhere,
    34 <parameter>PAGE=A4</parameter> may be more suitable.</para>
     50<parameter>PAGE=A4</parameter> may be more suitable.
     51The default paper size can be changed after installation by writing
     52the word "A4" or "letter" to the <filename>/etc/papersize</filename>
     53file.</para>
    3554
    3655<para>Prepare Groff for compilation:</para>
  • chapter06/kbd.xml

    r2550494 r5536f74  
    2929<title>Installation of Kbd</title>
    3030
     31<para>The behaviour of Backspace and Delete keys is not consistent across the
     32keymaps in the Kbd package. The following patch fixes this issue for
     33i386 keymaps:</para>
     34
     35<screen><userinput>patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
     36
     37<para>After patching, the Backspace key generates the character with code 127,
     38and the Delete key generates a well-known escape sequence.</para>
     39
    3140<para>Patch Kbd to fix a bug in <command>setfont</command> that is triggered
    3241when compiling with GCC-&gcc-version;:</para>
     
    4756
    4857<screen><userinput>make install</userinput></screen>
     58
     59<note>For some languages, e.g. Belarusian, the Kbd package doesn't provide
     60a useful keymap (the stock "by" keymap assumes the ISO-8859-5 encoding,
     61while everybody uses CP1251 instead). Users of such languages
     62have to download working keymaps separately.</note>
    4963
    5064</sect2>
     
    275289<term><command>unicode_start</command></term>
    276290<listitem>
    277 <para>Puts the keyboard and console in UNICODE mode. Never use it on LFS,
    278 because applications are not configured to support UNICODE.</para>
     291<para>Puts the keyboard and console in UNICODE mode. Don't use this program
     292unless your keymap file is in the ISO-8859-1 encoding. For other encodings,
     293this utility produces incorrect results.</para>
    279294<indexterm zone="ch-system-kbd unicode_start"><primary sortas="b-unicode_start">unicode_start</primary></indexterm>
    280295</listitem>
  • chapter06/man.xml

    r2550494 r5536f74  
    1 <?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    3   <!ENTITY % general-entities SYSTEM "../general.ent">
    4   %general-entities;
    5 ]>
    6 <sect1 id="ch-system-man" role="wrap">
    7 <title>Man-&man-version;</title>
    8 <?dbhtml filename="man.html"?>
    9 
    10 <indexterm zone="ch-system-man"><primary sortas="a-Man">Man</primary></indexterm>
    11 
    12 <sect2 role="package"><title/>
    13 <para>The Man package contains programs for finding and viewing man pages.</para>
    14 
    15 <segmentedlist>
    16 <segtitle>&buildtime;</segtitle>
    17 <segtitle>&diskspace;</segtitle>
    18 <seglistitem><seg>0.1 SBU</seg><seg>1.3 MB</seg></seglistitem>
    19 </segmentedlist>
    20 
    21 <segmentedlist>
    22 <segtitle>&dependencies;</segtitle>
    23 <seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
    24 Glibc, Grep, Make, and Sed</seg></seglistitem>
    25 </segmentedlist>
    26 </sect2>
    27 
    28 <sect2 role="installation">
    29 <title>Installation of Man</title>
    30 
    31 <para>Two adjustments need to be made to the sources of Man.</para>
    32 
    33 <para>The first is a <command>sed</command> substitution to add the
    34 <parameter>-R</parameter> switch to the <envar>PAGER</envar>
    35 variable so that escape sequences are properly handled by Less:</para>
    36 
    37 <screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
    38 
    39 <para>The second is also a <command>sed</command> substitution to comment out the
    40 <quote>MANPATH /usr/man</quote> line in the
    41 <filename>man.conf</filename> file to prevent redundant results when
    42 using programs such as <command>whatis</command>:</para>
    43 
    44 <screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
    45 
    46 <para>Prepare Man for compilation:</para>
    47 
    48 <screen><userinput>./configure -confdir=/etc</userinput></screen>
    49 
    50 <para>The meaning of the configure options:</para>
    51 
    52 <variablelist>
    53 <varlistentry>
    54 <term><parameter>-confdir=/etc</parameter></term>
    55 <listitem><para>This tells the <command>man</command> program to look for the
    56 <filename>man.conf</filename> configuration file in the <filename
    57 class="directory">/etc</filename> directory.</para></listitem>
    58 </varlistentry>
    59 </variablelist>
    60 
    61 <para>Compile the package:</para>
    62 
    63 <screen><userinput>make</userinput></screen>
    64 
    65 <para>This package does not come with a test suite.</para>
    66 
    67 <para>Install the package:</para>
    68 
    69 <screen><userinput>make install</userinput></screen>
    70 
    71 <note><para>If you will be working on a terminal that does not support text
    72 attributes such as color and bold, you can disable Select Graphic Rendition
    73 (SGR) escape sequences by editing the <filename>man.conf</filename> file and
    74 adding the <parameter>-c</parameter> option to the <envar>NROFF</envar>
    75 variable. If you use multiple terminal types for one computer it may be better
    76 to selectively add the <envar>GROFF_NO_SGR</envar> environment variable for the
    77 terminals that do not support SGR.</para></note>
    78 
    79 <para>If the character set of the locale uses 8-bit characters, search for the
    80 line beginning with <quote>NROFF</quote> in <filename>/etc/man.conf</filename>,
    81 and verify that it matches the following:</para>
    82 
    83 <screen>NROFF  /usr/bin/nroff -Tlatin1 -mandoc</screen>
    84 
    85 <para>Note that <quote>latin1</quote> should be used even if it is not
    86 the character set of the locale. The reason is that, according to the
    87 specification, <command>groff</command> has no means of typesetting
    88 characters outside International Organization for Standards
    89 (ISO) 8859-1 without some strange escape codes. When formatting man
    90 pages, <command>groff</command> thinks that they are in the ISO 8859-1
    91 encoding and this <parameter>-Tlatin1</parameter> switch tells
    92 <command>groff</command> to use the same encoding for output. Since
    93 <command>groff</command> does no recoding of input characters, the
    94 formatted result is really in the same encoding as input, and therefore
    95 it is usable as the input for a pager.</para>
    96 
    97 <para>This does not solve the problem of a non-working
    98 <command>man2dvi</command> program for localized man pages in
    99 non-ISO 8859-1 locales. Also, it does not work with multibyte
    100 character sets. The first problem does not currently have a solution.
    101 The second issue is not of concern because the LFS installation does
    102 not support multibyte character sets.</para>
    103 
    104 <para>Additional information with regards to the compression of
    105 man and info pages can be found in the BLFS book at
    106 <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para>
    107 
    108 </sect2>
    109 
    110 
    111 <sect2 id="contents-man" role="content"><title>Contents of Man</title>
    112 
    113 <segmentedlist>
    114 <segtitle>Installed programs</segtitle>
    115 <seglistitem><seg>apropos, makewhatis, man,
    116 man2dvi, man2html, and whatis</seg></seglistitem>
    117 </segmentedlist>
    118 
    119 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
    120 <?dbfo list-presentation="list"?>
    121 <?dbhtml list-presentation="table"?>
    122 
    123 <varlistentry id="apropos">
    124 <term><command>apropos</command></term>
    125 <listitem>
    126 <para>Searches the <command>whatis</command> database and displays the short descriptions
    127 of system commands that contain a given string</para>
    128 <indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
    129 </listitem>
    130 </varlistentry>
    131 
    132 <varlistentry id="makewhatis">
    133 <term><command>makewhatis</command></term>
    134 <listitem>
    135 <para>Builds the <command>whatis</command> database; it reads all the man pages
    136 in the <envar>MANPATH</envar> and writes the name and a short description in the
    137 <command>whatis</command> database for each page</para>
    138 <indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
    139 </listitem>
    140 </varlistentry>
    141 
    142 <varlistentry id="man">
    143 <term><command>man</command></term>
    144 <listitem>
    145 <para>Formats and displays the requested on-line man page</para>
    146 <indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
    147 </listitem>
    148 </varlistentry>
    149 
    150 <varlistentry id="man2dvi">
    151 <term><command>man2dvi</command></term>
    152 <listitem>
    153 <para>Converts a man page into dvi format</para>
    154 <indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
    155 </listitem>
    156 </varlistentry>
    157 
    158 <varlistentry id="man2html">
    159 <term><command>man2html</command></term>
    160 <listitem>
    161 <para>Converts a man page into HTML</para>
    162 <indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
    163 </listitem>
    164 </varlistentry>
    165 
    166 <varlistentry id="whatis">
    167 <term><command>whatis</command></term>
    168 <listitem>
    169 <para>Searches the <command>whatis</command> database and displays the short descriptions
    170 of system commands that contain the given keyword as a separate
    171 word</para>
    172 <indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
    173 </listitem>
    174 </varlistentry>
    175 </variablelist>
    176 
    177 </sect2>
    178 
    179 </sect1>
    180 
  • 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 
  • chapter06/readline.xml

    r2550494 r5536f74  
    4444<term><parameter>SHLIB_LIBS=-lncurses</parameter></term>
    4545<listitem><para>This option forces Readline to link against the
    46 <filename class="libraryfile">libncurses</filename> library.</para></listitem>
     46<filename class="libraryfile">libncurses</filename>
     47(really, <filename class="libraryfile">libncursesw</filename>)
     48library.</para></listitem>
    4749</varlistentry>
    4850</variablelist>
  • chapter06/sysklogd.xml

    r2550494 r5536f74  
    3333
    3434<screen><userinput>patch -Np1 -i ../&sysklogd-fixes-patch;</userinput></screen>
     35
     36<para>The following patch makes sysklogd treat bytes in the 0x80--0x9f range
     37literally in the messages being logged, instead of replacing them with octal
     38codes. Such replacement caused damage to messages in UTF-8 encoding.</para>
     39
     40<screen><userinput>patch -Np1 -i ../&sysklogd-8bit-patch;</userinput></screen>
    3541
    3642<para>Compile the package:</para>
  • chapter06/sysvinit.xml

    r2550494 r5536f74  
    8585su:S016:once:/sbin/sulogin
    8686
    87 1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
    88 2:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
    89 3:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
    90 4:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
    91 5:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
    92 6:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600
     871:2345:respawn:/sbin/agetty tty1 9600
     882:2345:respawn:/sbin/agetty tty2 9600
     893:2345:respawn:/sbin/agetty tty3 9600
     904:2345:respawn:/sbin/agetty tty4 9600
     915:2345:respawn:/sbin/agetty tty5 9600
     926:2345:respawn:/sbin/agetty tty6 9600
    9393
    9494# End /etc/inittab</literal>
    9595EOF</userinput></screen>
    96 
    97 <para>The <parameter>-I '\033(K'</parameter> option tells
    98 <command>agetty</command> to send this escape sequence to the terminal
    99 before doing anything else. This escape sequence switches the console
    100 character set to a user-defined one, which can be modified by running
    101 the <command>setfont</command> program. The <command>console</command>
    102 initscript from the LFS-Bootscripts package calls the <command>setfont</command>
    103 program during system startup. Sending this escape sequence is
    104 necessary for people who use non-ISO 8859-1 screen fonts, but it does
    105 not affect native English speakers.</para>
    106 
    10796</sect2>
    10897
  • chapter06/texinfo.xml

    r2550494 r5536f74  
    2929<sect2 role="installation">
    3030<title>Installation of Texinfo</title>
     31
     32<para>The <command>info</command> program makes assumptions such as "a string
     33occupies the same number of character cells on the screen and bytes in memory"
     34and "one can break the string anywhere" that are incorrect in UTF-8 locales.
     35While the patch below is not the proper solution, it at least hides the problem
     36by falling back to English messages when a multibyte locale is in use:</para>
     37
     38<screen><userinput>patch -Np1 -i ../&texinfo-multibyte-patch;</userinput></screen>
    3139
    3240<para>Texinfo allows local users to overwrite arbitrary files via a symlink
  • chapter06/udev.xml

    r2550494 r5536f74  
    7979<screen><userinput>install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
    8080
     81<!-- Not for the LiveCD -->
    8182<!-- Edit Me -->
    8283<para>Run the <command>udevstart</command> program to create our full
  • chapter06/vim.xml

    r2550494 r5536f74  
    5454<varlistentry>
    5555<term><parameter>--enable-multibyte</parameter></term>
    56 <listitem><para>This optional but highly recommended switch enables support for
     56<listitem><para>This switch enables support for
    5757editing files in multibyte character encodings.  This is needed if using a
    5858locale with a multibyte character set. This switch is also helpful to be able to
     
    7575
    7676<screen><userinput>make install</userinput></screen>
     77
     78<para>In UTF-8 locales, the <command>vimtutor</command> program
     79tries to convert the tutorials from ISO-8859-1 to UTF-8. Since
     80some tutorials are not in ISO-8859-1, the text in them is thus made unreadable.
     81If you unpacked the <filename>vim-&vim-version;-lang.tar.gz</filename>
     82archive and are going to use a UTF-8 based locale, remove non-ISO-8859-1
     83tutorials. An English tutorial will be used instead.</para>
     84<!-- Removal is used instead of conversion in order for the user to be able to
     85painlessly revert his UTF-8 locale choice. -->
     86
     87<screen><userinput>rm -f /usr/share/vim/vim64/tutor/tutor.{gr,pl,ru,sk}
     88rm -f /usr/share/vim/vim64/tutor/tutor.??.*</userinput></screen>
    7789
    7890<para>Many users are used to using <command>vi</command> instead of
Note: See TracChangeset for help on using the changeset viewer.