Re: [Makefile:1063: 828-ncurses] Error 1
"Pierre Labastie" ([email protected] via alfs-discuss Mailing List) <[email protected]> Fri, 13 Jun 2025 16:05:41 +0200
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2025-06-12 at 12:26 -0500, Bruce Dubbs wrote: > On 6/12/25 10:25 AM, Pierre Labastie ([email protected] via > alfs-discuss > Mailing List) wrote: > > On Sat, 2025-06-07 at 19:50 +0200, Pierre Labastie wrote: > > > On Sat, 2025-06-07 at 18:20 +0200, Marcin Dulak wrote: > > > > On Sat, Jun 7, 2025 at 5:30 PM Xi Ruoyao > > > > <[email protected]> wrote: > > > > > > > > > > On Sat, 2025-06-07 at 17:01 +0200, Marcin Dulak wrote: > > > > > > > > > > /* snip */ > > > > > > > > > > > Here is the content of lib, showing the first two links in > > > > > > red, > > > > > > broken. > > > > > > ls -latr $LFS/sources/ncurses-6.5-20250531/dest/usr/lib/ > > > > > > lrwxrwxrwx 1 root root 18 Jun 7 11:29 libncursesw.so.6 > > > > > > -> > > > > > > libncursesw.so.6.5 > > > > > > lrwxrwxrwx 1 root root 16 Jun 7 11:29 libncursesw.so - > > > > > > > > > > > > > libncursesw.so.6 > > > > > > > > > > The book has: > > > > > > > > > > make DESTDIR=$PWD/dest install > > > > > install -vm755 dest/usr/lib/libncursesw.so.6.5 /usr/lib > > > > > rm -v dest/usr/lib/libncursesw.so.6.5 > > > > > sed -e 's/^#if.*XOPEN.*$/#if 1/' \ > > > > > -i dest/usr/include/curses.h > > > > > cp -av dest/* / > > > > > > > > > > So yes we removed dest/usr/lib/libncursesw.so.6.5, > > > > > explicitly, > > > > > and > > > > > after > > > > > the rm -v command there will be dangling symlinks. And the > > > > > paragraph > > > > > above this command has already explained why we must do that. > > > > > > > > > > Again the LFS book is a book for human to read, not (just) a > > > > > script > > > > > collection, thus the text has at least the same importance as > > > > > the > > > > > commands. Running jhalfs w/o reading the text is not the > > > > > intended > > > > > use > > > > > of the LFS book. > > > > > > > > > > > > > What could be further suggestions how to debug the "make > > > > mk_CHROOT" > > > > problem? > > > > > > I'd say you have to find the _real_ error. In make output, you > > > can > > > grep > > > for "\*\*\*.*Error". > > > > Ok, so I managed to reproduce it, and sure, the script does not > > complete... It looks like "cp -a" creates symbolic links pointing > > to > > themselves, for example: > > ls -l /usr/share/terminfo/z/z29 > > lrwxrwxrwx 2 root root 3 Jun 12 16:33 /usr/share/terminfo/z/z29 -> > > z29 > > > > So when those files are accessed by cp -a, they generate an error. > > Problem is cp -a runs to completion nevertheless, and exits with an > > error code, but no error message at this point, which may be hard > > to > > diagnose. > > > > What I find weird is that other editors don't have an error... > > This looks like it's from the stable LFS-12.3. The current > development system is > using ncurses-6.5-20250531, but I do not see how that changes the > install. > That said this is my log: > > https://anduin.linuxfromscratch.org/~bdubbs/files/828-ncurses-6.5-20250531 > Update: this has been a tough bug! It depends on the ncurses version installed on the host! The reason is that TIC_PATH is not honored by run_tic.sh (the program that installs the whole terminfo database), so that it runs host's tic when cross compiling, and it looks like tic-6.4 generates symlinks in the terminfo directory, while tic-6.5-20250531 generates hardlinks. Then, what happens is the following: - if built with debian stable (for example), ncurses-6.4 is used, and the terminfo database is created with symlinks in chapter 6 - then, when rebuilding ncurses in chapter 8, tic from the current version of ncurses is used, and the terminfo database is created with hardlinks in the dest directory. - then copying hardlinks to symlinks with "cp -a dest /" screws the whole thing and creates symlinks pointing to themselves... Note that if the host has a recent enough version of ncurses, then everything is done with hardlinks, and there is no problem when using "cp -a"... See https://wiki.linuxfromscratch.org/lfs/ticket/5744 Fixed at commit 5e4ff8cb2 (in lfs) Pierre -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page