source: chapter06/bc.xml@ a36bd4f

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 a36bd4f was a36bd4f, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Update to bc-1.07

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

  • Property mode set to 100644
File size: 4.1 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, change an internal script to use <command>sed</command> instead
45 of <command>ed</command>:</para>
46
47<screen><userinput remap="pre">cat &gt; bc/fix-libmath_h &lt;&lt; "EOF"
48#! /bin/bash
49sed -e '1 s/^/{"/' \
50 -e 's/$/",/' \
51 -e '2,$ s/^/"/' \
52 -e '$ d' \
53 -i libmath.h
54
55sed -e '$ s/$/0}/' \
56 -i libmath.h
57EOF</userinput></screen>
58
59 <para>Create a temporary symbolic link so the package can find
60 the readline library and confirm that its required libncurses
61 library is available. Even though the libraries are in /tools/lib
62 at this point, the system will use /usr/lib at the end of
63 this chapter.</para>
64
65<screen><userinput remap="pre">ln -sv /tools/lib/libncursesw.so /usr/lib/libncurses.so</userinput></screen>
66
67 <para>Prepare Bc for compilation:</para>
68
69<screen><userinput remap="configure">./configure --prefix=/usr \
70 --with-readline \
71 --mandir=/usr/share/man \
72 --infodir=/usr/share/info</userinput></screen>
73
74 <variablelist>
75 <title>The meaning of the configure options:</title>
76
77 <varlistentry>
78 <term><parameter>--with-readline</parameter></term>
79 <listitem>
80 <para>This option tells Bc to use the <filename
81 class="libraryfile">readline</filename> library that is already
82 installed on the system rather than using its own readline
83 version.</para>
84 </listitem>
85 </varlistentry>
86
87 </variablelist>
88
89 <para>Compile the package:</para>
90
91<screen><userinput remap="make">make</userinput></screen>
92
93 <para>To test bc, run the commands below. There is quite a bit of output,
94 so you may want to redirect it to a file. There are a very small percentage
95 of tests (10 of 12,144) that will indicate a round off error at the last
96 digit.</para>
97
98<screen><userinput remap="test">echo "quit" | ./bc/bc -l Test/checklib.b</userinput></screen>
99
100 <para>Install the package:</para>
101
102<screen><userinput remap="install">make install</userinput></screen>
103
104 </sect2>
105
106 <sect2 id="contents-bc" role="content">
107 <title>Contents of Bc</title>
108
109 <segmentedlist>
110 <segtitle>Installed programs</segtitle>
111
112 <seglistitem>
113 <seg>bc and dc</seg>
114 </seglistitem>
115 </segmentedlist>
116
117 <variablelist>
118 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
119 <?dbfo list-presentation="list"?>
120 <?dbhtml list-presentation="table"?>
121
122 <varlistentry id="bc">
123 <term><command>bc</command></term>
124 <listitem>
125 <para>is a command line calculator</para>
126 <indexterm zone="ch-system-bc bc">
127 <primary sortas="b-bc">bc</primary>
128 </indexterm>
129 </listitem>
130 </varlistentry>
131
132 <varlistentry id="dc">
133 <term><command>dc</command></term>
134 <listitem>
135 <para>is a reverse-polish command line calculator</para>
136 <indexterm zone="ch-system-bc dc">
137 <primary sortas="b-dc">dc</primary>
138 </indexterm>
139 </listitem>
140 </varlistentry>
141
142 </variablelist>
143
144 </sect2>
145
146</sect1>
Note: See TracBrowser for help on using the repository browser.