cannot find -lncursesw error in section 7.13 Util-linux-2.36 LFS v10.0

303 views Asked by At

I am using Ubuntu 16 vm for building LFS 10.0 version. A present I am section in 7.13 Util-linux-2.36 after doing chroot. When I try to install Util-linux-2.36 I get the following error.

make[2] Leaving directory /build/sources/util-linux/util-linux-2.36/po
make[2] Entering directory /build/sources/util-linux/util-linux-2.36/
CC lib/libcommon_la-sysfs.lo
CCLD libcommon.la
CCLD more
/usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../..x86_64-lfs-linux-gnu/bin/ld: cannot find -lncursesw
collect2:error:ld returned 1 exit status
make[2] (Makefile :7349 more] Error 1

I tried reinstall few times but the issue remains same. I have checked section 6.3 ncurses-6.2 also. Do I miss any softlinks in chroot enviornment? May I know how to troubleshoot this issue using Linux standard commands?

1

There are 1 answers

0
chaotic_hpv On BEST ANSWER

Could not comment since I am lacking reputation points. But Here is how I figured it out.

I am on my fist run of LFS 10.1. I also run in to the the issue "cannot find -lncursesw". So went back to section 6.3 and redid those commands outside the current chroot. At the start of section 7 most if not all folders were chowned to root so the make install command did not have any permission to do jack shit.

TLDR >>>

The problem was that the PDF version of LFS have these preformatted command snippets that do not wrap lines at the end of the page. The command snippet I am talking about is

ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw

It ends before the command if fully formed because the page clips it and there is no way to copy it. the full command is

ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so

I found this on the html version of LFS book on the sites archives.

Since the chown changes permissions I had to sudo this command to get privileges. After this util-linux maked to completion.