> Because it found the library somewhere else ... I suppose in /lib or in > /usr/lib. > > If you want to to get compile-time errors, you could use the following > CFLAGS > > CFLAGS='<your_options> -nostdlib -L/toosl/lib' > > The compilation will then fail because the ncurses library is not found Thanks for the answer. I tried what you said, that is adding -nostdlib -L/tools/lib to CFLAGS, but now I can't even configure bash. This is the error message: checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for emacs... no checking for xemacs... no Beginning configuration for bash-4.0-release for x86_64-pc-linux-gnu checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: in `/home/booleandomain/tmp/lfs/sources/bash-build': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. This is the relevant part of config.log: /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400120 configure:3206: $? = 0 configure:3244: result: a.out configure:3263: checking whether the C compiler works configure:3273: ./a.out ../bash-4.0/configure: line 3275: 11682 Segmentation fault ./$ac_file configure:3277: $? = 139 configure:3284: error: in `/home/booleandomain/tmp/lfs/sources/bash-build': configure:3288: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details.