I am following the Linux from Scratch book, Version 8.4 and am stuck on compiling bc (Chapter 6.15).
I have copied and pasted the commands on that page up to the make command, but when I run make, I get this error:
./fbc -c ./libmath.b </dev/null >libmath.h ./fbc: error while loading shared libraries: libreadline.so.8: cannot open shared object file: No such file or directory make: *** [Makefile:631: libmath.h] Error 127 make: Leaving directory '/sources/bc-1.07.1/bc'
I have checked inside /lib and /usr/lib for libreadline.so.8 and it is present in both directories. I have also tried copying libreadline.so.8 to /sources/bc-1.07.1/bc, /sources/bc-1.07.1/bc/lib, and /sources/bc-1.07.1/bc/bc, but I still get the same error.
cat config.log | grep readline:
$ ./configure --prefix=/usr --with-readline --mandir=/usr/share/man --infodir=/usr/share/info configure:5164: checking for readline in -lreadline configure:5189: gcc -o conftest -g -O2 -lncurses conftest.c -lreadline >&5 configure:5201: checking readline/readline.h usability configure:5201: checking readline/readline.h presence configure:5201: checking for readline/readline.h ac_cv_header_readline_readline_h=yes ac_cv_lib_readline_readline=yes READLINELIB='-lreadline -lncurses'
Could anyone please help me with this problem?
I managed to solve this issue by running the configure script outside of the chroot environment. The make command and tests return no errors, however I am not sure if this will break anything else in the book.