%general-entities; ]> ncurses &ncurses-version;
&ncurses-url;
Ncurses-&ncurses-version; Ncurses tools <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../chapter08/ncurses.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&ncurses-tmp-sbu;</seg> <seg>&ncurses-tmp-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Ncurses First, ensure that gawk is found first during configuration: sed -i s/mawk// configure Then, run the following commands to build the tic program on the build host: mkdir build pushd build ../configure make -C include make -C progs tic popd Prepare Ncurses for compilation: ./configure --prefix=/usr \ --host=$LFS_TGT \ --build=$(./config.guess) \ --mandir=/usr/share/man \ --with-manpage-format=normal \ --with-shared \ --without-normal \ --with-cxx-shared \ --without-debug \ --without-ada \ --disable-stripping \ --enable-widec The meaning of the new configure options: --with-manpage-format=normal This prevents Ncurses from installing compressed manual pages, which may happen if the host distribution itself has compressed manual pages. --with-shared This makes Ncurses build and install shared C libraries. --without-normal This prevents Ncurses from building and installing static C libraries. --without-debug This prevents Ncurses from building and installing debug libraries. --with-cxx-shared This makes Ncurses build and install shared C++ bindings. It also prevents it building and installing static C++ bindings. --without-ada This ensures that Ncurses does not build support for the Ada compiler, which may be present on the host but will not be available once we enter the chroot environment. --disable-stripping This switch prevents the building system from using the strip program from the host. Using host tools on cross-compiled programs can cause failure. --enable-widec This switch causes wide-character libraries (e.g., libncursesw.so.&ncurses-version;) to be built instead of normal ones (e.g., libncurses.so.&ncurses-version;). These wide-character libraries are usable in both multibyte and traditional 8-bit locales, while normal libraries work properly only in 8-bit locales. Wide-character and normal libraries are source-compatible, but not binary-compatible. Compile the package: make Install the package: make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so The meaning of the install options: TIC_PATH=$(pwd)/build/progs/tic We need to pass the path of the newly built tic program that runs on the building machine, so the terminal database can be created without errors. echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so The libncurses.so library is needed by a few packages we will build soon. We create this small linker script, as this is what is done in . Building Ncurses - 32bit Clean previous build: make distclean Prepare Ncurses for compilation: CC="$LFS_TGT-gcc -m32" \ CXX="$LFS_TGT-g++ -m32" \ ./configure --prefix=/usr \ --host=$LFS_TGT32 \ --build=$(./config.guess) \ --libdir=/usr/lib32 \ --mandir=/usr/share/man \ --with-shared \ --without-normal \ --with-cxx-shared \ --without-debug \ --without-ada \ --disable-stripping \ --enable-widec Compile the package: make Install the package: make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install ln -s libncursesw.so DESTDIR/usr/lib32/libcursesw.so cp -Rv DESTDIR/usr/lib32/* $LFS/usr/lib32 rm -rf DESTDIR Building Ncurses - x32bit Clean previous build: make distclean Prepare Ncurses for compilation: CC="$LFS_TGT-gcc -mx32" \ CXX="$LFS_TGT-g++ -mx32" \ ./configure --prefix=/usr \ --host=$LFS_TGTX32 \ --build=$(./config.guess) \ --libdir=/usr/libx32 \ --mandir=/usr/share/man \ --with-shared \ --without-normal \ --with-cxx-shared \ --without-debug \ --without-ada \ --disable-stripping \ --enable-widec Compile the package: make Install the package: make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install ln -s libncursesw.so DESTDIR/usr/libx32/libcursesw.so cp -Rv DESTDIR/usr/libx32/* $LFS/usr/libx32 rm -rf DESTDIR <para>Details on this package are located in <xref linkend="contents-ncurses" role="."/></para> </sect2> </sect1>