So when I was building Linux from Scratch with an Ubuntu ISO, I was all right, until I came at Readline-8.1.2 on chapter 8.11. Also, there were no errors prior. Here were my steps for building Readline-8.1.2:
First, (as chroot) I unzipped the readline-8.1.2.tar.gz file with
Code:
tar -xf readline-8.1.2.tar.gz
. I then ran
Then, I ran
Code:
sed -i '/MV.*old/d' Makefile.in
sed -i '/{OLDSUFF}/c:' support/shlib-install
, which produced no output.
Then I ran
Code:
./configure --prefix=/usr \
--disable-static \
--with-curses \
--docdir=/usr/share/doc/readline-8.1.2
, which didn't throw any errors either.
This is where I started seeing the error. When I ran
Code:
make SHLIB_LIBS="-lncursesw"
, it threw an error. The main log is listed below. Is this something I should worry about, or should I not think about this?
Code:
cannot find -lncursesw: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:177: libreadline.so.8.1] Error 1
make[1]: Leaving directory '/sources/readline-8.1.2/shlib'
make: *** [Makefile:219: shared] Error 2
Full log:
Code:
test -d shlib || mkdir shlib
( cd shlib ; make all )
make[1]: Entering directory '/sources/readline-8.1.2/shlib'
rm -f readline.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o readline.o ../readline.c
mv readline.o readline.so
rm -f vi_mode.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o vi_mode.o ../vi_mode.c
mv vi_mode.o vi_mode.so
rm -f funmap.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o funmap.o ../funmap.c
mv funmap.o funmap.so
rm -f keymaps.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o keymaps.o ../keymaps.c
mv keymaps.o keymaps.so
rm -f parens.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o parens.o ../parens.c
mv parens.o parens.so
rm -f search.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o search.o ../search.c
mv search.o search.so
rm -f rltty.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o rltty.o ../rltty.c
mv rltty.o rltty.so
rm -f complete.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o complete.o ../complete.c
mv complete.o complete.so
rm -f bind.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o bind.o ../bind.c
mv bind.o bind.so
rm -f isearch.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o isearch.o ../isearch.c
mv isearch.o isearch.so
rm -f display.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o display.o ../display.c
mv display.o display.so
rm -f signals.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o signals.o ../signals.c
mv signals.o signals.so
rm -f util.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o util.o ../util.c
mv util.o util.so
rm -f kill.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o kill.o ../kill.c
mv kill.o kill.so
rm -f undo.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o undo.o ../undo.c
mv undo.o undo.so
rm -f macro.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o macro.o ../macro.c
mv macro.o macro.so
rm -f input.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o input.o ../input.c
mv input.o input.so
rm -f callback.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o callback.o ../callback.c
mv callback.o callback.so
rm -f terminal.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o terminal.o ../terminal.c
mv terminal.o terminal.so
rm -f text.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o text.o ../text.c
mv text.o text.so
rm -f nls.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o nls.o ../nls.c
mv nls.o nls.so
rm -f misc.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o misc.o ../misc.c
mv misc.o misc.so
rm -f history.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o history.o ../history.c
mv history.o history.so
rm -f histexpand.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o histexpand.o ../histexpand.c
mv histexpand.o histexpand.so
rm -f histfile.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o histfile.o ../histfile.c
mv histfile.o histfile.so
rm -f histsearch.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o histsearch.o ../histsearch.c
mv histsearch.o histsearch.so
rm -f shell.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o shell.o ../shell.c
mv shell.o shell.so
rm -f mbutil.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o mbutil.o ../mbutil.c
mv mbutil.o mbutil.so
rm -f tilde.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -DREADLINE_LIBRARY -c -o tilde.o ../tilde.c
mv tilde.o tilde.so
rm -f colors.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o colors.o ../colors.c
mv colors.o colors.so
rm -f parse-colors.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o parse-colors.o ../parse-colors.c
mv parse-colors.o parse-colors.so
rm -f xmalloc.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o xmalloc.o ../xmalloc.c
mv xmalloc.o xmalloc.so
rm -f xfree.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o xfree.o ../xfree.c
mv xfree.o xfree.so
rm -f compat.so
gcc -c -DHAVE_CONFIG_H -I. -I.. -I.. -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o compat.o ../compat.c
mv compat.o compat.so
rm -f libreadline.so.8.1
gcc -shared -Wl,-soname,libreadline.so.8.1 -Wl,-rpath,/usr/lib -Wl,-soname,`basename libreadline.so.8.1 .1` -o libreadline.so.8.1 readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so colors.so parse-colors.so xmalloc.so xfree.so compat.so -lncursesw
/usr/lib/gcc/x86_64-lfs-linux-gnu/11.2.0/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find -lncursesw: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:177: libreadline.so.8.1] Error 1
make[1]: Leaving directory '/sources/readline-8.1.2/shlib'
make: *** [Makefile:219: shared] Error 2
Thanks in advance!