Tuesday, May 17, 2011

LFS - BASH - compilation and installation

1. Downloading bash - (bash-4.2)
http://ftp.gnu.org/gnu/bash/ - download the latest tar.gz file. I downloaded bash-4.2.tar.gz
It is put inside the folder $LFS/usr/src

* as root (sudo -i) cd into the folder $LFS/usr/src/bash-4.2
* ./configure --enable-static-link --prefix=$LFS/usr --disable-nls --without-bash-malloc
* make

+ERROR: /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libc.a(malloc.o): In function `malloc':
(.text+0x4ad0): multiple definition of `malloc'
./lib/malloc/libmalloc.a(malloc.o):/mnt/lfs/usr/src/bash-4.2/lib/malloc/malloc.c:1254: first defined here
./configure --enable-static-link --prefix=$LFS/usr --disable-nls --without-bash-malloc (INCLUDE "--without-bash-malloc") in the configure option.
+make succeded

* make prefix=$LFS/usr install
* mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin
* cd $LFS/bin
* ln -s bash sh

Testing if bash is installed properly
*cd $LFS/bin
It should open a new shell which contains information on the version installed. Bash is hence installed successfully.

Abishek Ramdas
NYU Poly

No comments:

Post a Comment