The bc package contains an arbitrary precision numeric processing language.
Download (HTTP): http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
Download MD5 sum: d44b5dddebd8a7a7309aea6c36fda117
Download size: 273 KB
Estimated disk space required: 2.36 MB
Estimated build time: less than 0.1 SBU (0.2 SBU if running the testsuite)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/bc
Install bc by running the following commands:
sed -i '/PROTO.*readline/d' bc/scan.l && sed -i '/flex -I8/s/8//' configure && sed -i '/stdlib/a #include <string.h>' lib/number.c && sed -i 's/program.*save/static &/' bc/load.c && ./configure --prefix=/usr --with-readline && make
To test bc, run the commands below. There is quite a bit of output, so you may want to redirect it to a file. There are a very small percentage of tests (10 of 12,144) that will indicate a roundoff error at the last digit.
echo "quit" | ./bc/bc -l Test/checklib.b
Now, as the root
user:
make install
sed -i '/PROTO.*readline/d' bc/scan.l: This command fixes the Readline library call.
sed -i '/flex -I8/s/8//' configure: This command fixes the Flex invocation.
sed -i '/stdlib/a #include <string.h>' lib/number.c: This command inserts a missing header.
sed -i 's/program.*save/static &/' bc/load.c: This command fixes a segfault when running bc with bc -l.
--with-readline
: This
option enables Readline support in
interactive mode.
Last updated on 2007-04-04 14:42:53 -0500