LFS - BASH - compilation and installation


DOWNLOADING  REQUIRED PACKAGES
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
+SOLUTION:
./configure --enable-static-link --prefix=$LFS/usr --disable-nls --without-bash-malloc (INCLUDE "--without-bash-malloc") in the configure option.
+REFERENCE:
http://www.linuxforums.org/forum/programming-scripting/129616-multiple-definitions-compliling-error.html
+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
*./sh
It should open a new shell which contains information on the version installed. Bash is hence installed successfully.

Abishek Ramdas
NYU Poly

Comments

Popular posts from this blog

Generating 16k ROM using Xilinx IP COREGEN and simulating it in modelsim

Setting up atalanta ATPG to work on Linux

Sparse matrix - 3 tuple representation