[lfs] branch trunk updated: Fix "Too many levels of symbolic links" in chapter 8 ncurses

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <174982344755.21398.17751432010062940667@rivendell.linuxfromscratch.org>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository lfs.

The following commit(s) were added to refs/heads/trunk by this push:
     new 5e4ff8cb2 Fix "Too many levels of symbolic links" in chapter 8 ncurses
5e4ff8cb2 is described below

commit 5e4ff8cb2e04ddadea4f0401725caeb4c32a0ee9
Author: Pierre Labastie <[email protected]>
AuthorDate: Fri Jun 13 15:52:08 2025 +0200

    Fix "Too many levels of symbolic links" in chapter 8 ncurses
    
    The problem is that TIC_PATH is nor honored anymore in chapter
    6, so that tic from the host is used to create the terminfo
    database in chapter 6. The problem is that old versions of
    tic create symlinks in the database, while newer versions
    create hardlinks. Since we use a DESTDIR install in chapter 8
    (with a recent version of ncurses, so with hardlinks), and copy
    it in place with cp -a, then it seems that copying hardlinks to
    symlinks. If an old version of tic has been used in chapter 6,
    this copies hardlinks to symlinks, which creates symlinks
    pointing to themselves (cp bug?).
    
    Anyway, the solution is to copy the auxilliary tic built
    in chapter 6 to $LFS/tools/bin (suggestion by Xi Ruoyao).
    Now, there is no need to set TIC_PATH or whatever because this
    tic is in the PATH.
    
    Bug first reported by Marcin Dulak. Analysis with the help of
    Bruce Dubbs and Thomas Trepl.
    
    Fixes https://wiki.linuxfromscratch.org/lfs/ticket/5744
---
 chapter06/ncurses.xml | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml
index 2d2baf7dc..a29bcea7f 100644
--- a/chapter06/ncurses.xml
+++ b/chapter06/ncurses.xml
@@ -44,13 +44,16 @@
     <title>Installation of Ncurses</title>
 
     <para>First, run the following commands to build the <quote>tic</quote>
-    program on the build host:</para>
+      program on the build host. We install it in
+      <filename class="directory">$LFS/tools</filename>, so that it is found
+      in the <envar>PATH</envar> when needed:</para>
 
 <screen><userinput remap="pre">mkdir build
 pushd build
-  ../configure AWK=gawk
+  ../configure --prefix=$LFS/tools AWK=gawk
   make -C include
   make -C progs tic
+  install progs/tic $LFS/tools/bin
 popd</userinput></screen>
 
     <para>Prepare Ncurses for compilation:</para>
@@ -147,28 +150,14 @@ popd</userinput></screen>
 
     <para>Install the package:</para>
 
-<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
+<screen><userinput remap="install">make DESTDIR=$LFS install
 ln -sv libncursesw.so $LFS/usr/lib/libncurses.so
 sed -e 's/^#if.*XOPEN.*$/#if 1/' \
     -i $LFS/usr/include/curses.h</userinput></screen>
-<!--
-    <para>Remove an unneeded static library not handled by
-    <command>configure</command>:</para>
 
-<screen><userinput remap="install">rm -v $LFS/usr/lib/libncurses++w.a</userinput></screen>
--->
     <variablelist>
       <title>The meaning of the install options:</title>
 
-      <varlistentry>
-        <term><parameter>TIC_PATH=$(pwd)/build/progs/tic</parameter></term>
-        <listitem>
-          <para>We need to pass the path of the newly built
-          <command>tic</command> program that runs on the building machine, so
-          the terminal database can be created without errors.</para>
-        </listitem>
-      </varlistentry>
-
       <varlistentry>
         <term><command>ln -sv libncursesw.so $LFS/usr/lib/libncurses.so</command></term>
         <listitem>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.