source: chapter06/bc.xml@ 1e472fb

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 8.1 8.1-rc1 8.1-rc2 8.2 8.2-rc1 8.3 8.3-rc1 8.3-rc2 8.4 8.4-rc1 9.0 9.0-rc1 9.1 9.1-rc1 cross-chap5 ml-11.0 multilib old-trunk trunk xry111/git-transition xry111/glibc-2.34 xry111/tester-nohack xry111/usr-move
Last change on this file since 1e472fb was 1e472fb, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Move realline to be before bc in Cahpater 6.
Update to linux-4.10.6.
Update to pkg-config-0.29.2.
Update to tzdata-2017b.
Add option -Dusethreads to perl in Chapter 6.

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

  • Property mode set to 100644
File size: 3.9 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-system-bc" role="wrap">
9 <?dbhtml filename="bc.html"?>
10
11 <sect1info condition="script">
12 <productname>bc</productname>
13 <productnumber>&bc-version;</productnumber>
14 <address>&bc-url;</address>
15 </sect1info>
16
17 <title>Bc-&bc-version;</title>
18
19 <indexterm zone="ch-system-bc">
20 <primary sortas="a-Bc">Bc</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Bc package contains an arbitrary precision numeric processing
27 language.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&bc-ch6-sbu;</seg>
35 <seg>&bc-ch6-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Bc</title>
43
44 <para>First, fix some minor memory leaks in the code:</para>
45
46<screen><userinput remap="pre">patch -Np1 -i ../&bc-memory-leak-patch;</userinput></screen>
47
48 <para>Create a temporary symbolic link so the package can find
49 the readline library and confirm that its required libncurses
50 library is available. Even though the libraries are in /tools/lib
51 at this point, the system will use /usr/lib at the end of
52 this chapter.</para>
53
54<screen><userinput remap="pre">ln -sv /tools/lib/libncursesw.so /usr/lib/libncurses.so</userinput></screen>
55
56 <para>Prepare Bc for compilation:</para>
57
58<screen><userinput remap="configure">./configure --prefix=/usr \
59 --with-readline \
60 --mandir=/usr/share/man \
61 --infodir=/usr/share/info</userinput></screen>
62
63 <variablelist>
64 <title>The meaning of the configure options:</title>
65
66 <varlistentry>
67 <term><parameter>--with-readline</parameter></term>
68 <listitem>
69 <para>This option tells Bc to use the <filename
70 class="libraryfile">readline</filename> library that is already
71 installed on the system rather than using its own readline
72 version.</para>
73 </listitem>
74 </varlistentry>
75
76 </variablelist>
77
78 <para>Compile the package:</para>
79
80<screen><userinput remap="make">make</userinput></screen>
81
82 <para>To test bc, run the commands below. There is quite a bit of output,
83 so you may want to redirect it to a file. There are a very small percentage
84 of tests (10 of 12,144) that will indicate a round off error at the last
85 digit.</para>
86
87<screen><userinput remap="test">echo "quit" | ./bc/bc -l Test/checklib.b</userinput></screen>
88
89 <para>Install the package:</para>
90
91<screen><userinput remap="install">make install</userinput></screen>
92
93 </sect2>
94
95 <sect2 id="contents-bc" role="content">
96 <title>Contents of Bc</title>
97
98 <segmentedlist>
99 <segtitle>Installed programs</segtitle>
100
101 <seglistitem>
102 <seg>bc and dc</seg>
103 </seglistitem>
104 </segmentedlist>
105
106 <variablelist>
107 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
108 <?dbfo list-presentation="list"?>
109 <?dbhtml list-presentation="table"?>
110
111 <varlistentry id="bc">
112 <term><command>bc</command></term>
113 <listitem>
114 <para>is a command line calculator</para>
115 <indexterm zone="ch-system-bc bc">
116 <primary sortas="b-bc">bc</primary>
117 </indexterm>
118 </listitem>
119 </varlistentry>
120
121 <varlistentry id="dc">
122 <term><command>dc</command></term>
123 <listitem>
124 <para>is a reverse-polish command line calculator</para>
125 <indexterm zone="ch-system-bc dc">
126 <primary sortas="b-dc">dc</primary>
127 </indexterm>
128 </listitem>
129 </varlistentry>
130
131 </variablelist>
132
133 </sect2>
134
135</sect1>
Note: See TracBrowser for help on using the repository browser.