source: chapter06/ncurses.xml@ d3e7e98

multilib
Last change on this file since d3e7e98 was e8d4ea4, checked in by Thomas Trepl (Moody) <thomas@…>, 2 years ago

Automatic merge of trunk into multilib

  • Property mode set to 100644
File size: 8.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-tools-ncurses" role="wrap">
9 <?dbhtml filename="ncurses.html"?>
10
11 <sect1info condition="script">
12 <productname>ncurses</productname>
13 <productnumber>&ncurses-version;</productnumber>
14 <address>&ncurses-url;</address>
15 </sect1info>
16
17 <title>Ncurses-&ncurses-version;</title>
18
19 <indexterm zone="ch-tools-ncurses">
20 <primary sortas="a-Ncurses">Ncurses</primary>
21 <secondary>tools</secondary>
22 </indexterm>
23
24 <sect2 role="package">
25 <title/>
26
27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
28 href="../chapter08/ncurses.xml"
29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
30
31 <segmentedlist>
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
34
35 <seglistitem>
36 <seg>&ncurses-tmp-sbu;</seg>
37 <seg>&ncurses-tmp-du;</seg>
38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Ncurses</title>
45
46 <para>First, ensure that <command>gawk</command> is found first during configuration:</para>
47
48<screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen>
49
50 <para>Then, run the following commands to build the <quote>tic</quote>
51 program on the build host:</para>
52
53<screen><userinput remap="pre">mkdir build
54pushd build
55 ../configure
56 make -C include
57 make -C progs tic
58popd</userinput></screen>
59
60 <para>Prepare Ncurses for compilation:</para>
61
62<screen><userinput remap="configure">./configure --prefix=/usr \
63 --host=$LFS_TGT \
64 --build=$(./config.guess) \
65 --mandir=/usr/share/man \
66 --with-manpage-format=normal \
67 --with-shared \
68 --without-debug \
69 --without-ada \
70 --without-normal \
71 --disable-stripping \
72 --enable-widec</userinput></screen>
73
74 <variablelist>
75 <title>The meaning of the new configure options:</title>
76
77 <varlistentry>
78 <term><parameter>--with-manpage-format=normal</parameter></term>
79 <listitem>
80 <para>This prevents Ncurses installing compressed manual
81 pages, which may happen if the host distribution itself
82 has compressed manual pages.</para>
83 </listitem>
84 </varlistentry>
85
86 <varlistentry>
87 <term><parameter>--without-ada</parameter></term>
88 <listitem>
89 <para>This ensures that Ncurses does not build support for the Ada
90 compiler which may be present on the host but will not be available
91 once we enter the <command>chroot</command> environment.</para>
92 </listitem>
93 </varlistentry>
94
95 <varlistentry>
96 <term><parameter>--disable-stripping</parameter></term>
97 <listitem>
98 <para>This switch prevents the building system from stripping
99 the programs using <command>strip</command> program from the host.
100 Using host tools on cross-compiled program can cause failure.</para>
101 </listitem>
102 </varlistentry>
103
104 <varlistentry>
105 <term><parameter>--enable-widec</parameter></term>
106 <listitem>
107 <para>This switch causes wide-character libraries (e.g., <filename
108 class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
109 to be built instead of normal ones (e.g., <filename
110 class="libraryfile">libncurses.so.&ncurses-version;</filename>).
111 These wide-character libraries are usable in both multibyte and
112 traditional 8-bit locales, while normal libraries work properly
113 only in 8-bit locales. Wide-character and normal libraries are
114 source-compatible, but not binary-compatible.</para>
115 </listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term><parameter>--without-normal</parameter></term>
120 <listitem>
121 <para>This switch disables building and installing most static libraries.
122 </para>
123 </listitem>
124 </varlistentry>
125
126 </variablelist>
127
128 <para>Compile the package:</para>
129
130<screen><userinput remap="make">make</userinput></screen>
131
132 <para>Install the package:</para>
133
134<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
135echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so</userinput></screen>
136
137 <para>Remove an unneeded static library not handled by
138 <command>configure</command>:</para>
139
140<screen><userinput remap="install">rm -v $LFS/usr/lib/libncurses++w.a</userinput></screen>
141
142 <variablelist>
143 <title>The meaning of the install options:</title>
144
145 <varlistentry>
146 <term><parameter>TIC_PATH=$(pwd)/build/progs/tic</parameter></term>
147 <listitem>
148 <para>We need to pass the path of the just built
149 <command>tic</command> able to run on the building machine, so that
150 the terminal database can be created without errors.</para>
151 </listitem>
152 </varlistentry>
153
154 <varlistentry>
155 <term><command>echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so</command></term>
156 <listitem>
157 <para>The <filename>libncurses.so</filename> library is needed by
158 a few packages we will build soon. We create this small linker
159 script, as this is what is done in <xref
160 linkend="chapter-building-system"/>.</para>
161 </listitem>
162 </varlistentry>
163
164 </variablelist>
165
166 </sect2>
167
168 <!-- - - - - - - - - - -->
169 <!-- Multilib - 32bit -->
170 <!-- - - - - - - - - - -->
171 <sect2 arch="ml_32,ml_all">
172 <title>Building Ncurses - 32bit</title>
173
174 <para>Clean previous build:</para>
175
176<screen><userinput remap="pre">make distclean</userinput></screen>
177
178 <para>Prepare Ncurses for compilation:</para>
179
180<screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \
181CXX="$LFS_TGT-g++ -m32" \
182./configure --prefix=/usr \
183 --host=$LFS_TGT32 \
184 --build=$(./config.guess) \
185 --libdir=/usr/lib32 \
186 --mandir=/usr/share/man \
187 --with-shared \
188 --without-debug \
189 --without-ada \
190 --without-normal \
191 --disable-stripping \
192 --enable-widec</userinput></screen>
193
194 <para>Compile the package:</para>
195
196<screen><userinput remap="make">make</userinput></screen>
197
198 <para>Install the package:</para>
199
200<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
201ln -s libncursesw.so DESTDIR/usr/lib32/libcursesw.so
202cp -Rv DESTDIR/usr/lib32/* $LFS/usr/lib32
203rm -rf DESTDIR</userinput></screen>
204
205 </sect2><!-- m32 -->
206
207 <!-- - - - - - - - - - -->
208 <!-- Multilib - x32bit -->
209 <!-- - - - - - - - - - -->
210 <sect2 arch="ml_x32,ml_all">
211 <title>Building Ncurses - x32bit</title>
212
213 <para>Clean previous build:</para>
214
215<screen><userinput remap="pre">make distclean</userinput></screen>
216
217 <para>Prepare Ncurses for compilation:</para>
218
219<screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \
220CXX="$LFS_TGT-g++ -mx32" \
221./configure --prefix=/usr \
222 --host=$LFS_TGTX32 \
223 --build=$(./config.guess) \
224 --libdir=/usr/libx32 \
225 --mandir=/usr/share/man \
226 --with-shared \
227 --without-debug \
228 --without-ada \
229 --without-normal \
230 --disable-stripping \
231 --enable-widec</userinput></screen>
232
233 <para>Compile the package:</para>
234
235<screen><userinput remap="make">make</userinput></screen>
236
237 <para>Install the package:</para>
238
239<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
240ln -s libncursesw.so DESTDIR/usr/libx32/libcursesw.so
241cp -Rv DESTDIR/usr/libx32/* $LFS/usr/libx32
242rm -rf DESTDIR</userinput></screen>
243
244 </sect2><!-- mx32 -->
245
246 <sect2 role="content">
247 <title/>
248
249 <para>Details on this package are located in
250 <xref linkend="contents-ncurses" role="."/></para>
251
252 </sect2>
253
254</sect1>
Note: See TracBrowser for help on using the repository browser.