Ncurses instructions - libcurses symlinks

Chris Staub chris at
Thu Oct 4 20:46:42 PDT 2007

In Chapter 6, there is this set of commands...

for lib in curses ncurses form panel menu ; do \
     rm -vf /usr/lib/lib${lib}.so ; \
     echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
     ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
ln -sfv libncurses++w.a /usr/lib/libncurses++.a

Finally, make sure that old applications that look for -lcurses at build
time are still buildable:

rm -vf /usr/lib/
echo "INPUT(-lncursesw)" >/usr/lib/
ln -sfv /usr/lib/
ln -sfv libncursesw.a /usr/lib/libcursesw.a
ln -sfv libncurses.a /usr/lib/libcurses.a

The for loop in the 1st set of commands creates (among other things) and libcurses.a. However, both of these are overwritten by
the ln commands that follow, so it looks like including "curses" in the
for loop is redundant.

Also, the rm commands in the for loop don't do anything, since all the
installed ncurses libs end in "w".

Or is there just something I'm missing here?

More information about the lfs-dev mailing list