[Clfs-support] Cross compilation fixes for diffutils-3.6, texinfo-6.5 and util-linux-2.31.1 (Part IV Chapter 6)

Daniel G. audobra at gmail.com
Mon Apr 9 13:23:13 PDT 2018


During the building of the basic tools (part IV), chapter 6 “Constructing a
Temporary System”, I have found some difficulties when trying to compile
the updated versions of some packages. In particular: diffutils-3.6,
texinfo-6.5 and util-linux-2.31.1

I would like to share with you the fixes I have prepared for the
compilation of these programs.

- Book information: 3.0.0-SYSVINIT
- System information: Linux 4.13.0-36-generic 16.04.1-Ubuntu x86_64
- Other information: gcc-7.3.0, glibc-2.27

* diffutils-3.6
The error during make was something like, recipe for target
'xstrtol-error.o' failed and some __GETOPT_PREFIX warnings

As you told me in other thread, the solution is adding, to the ./configure:

* texinfo-6.5

patch -Np1 -i ../texinfo-6.5-install_docs-1.patch

PERL=/usr/bin/perl \
./configure \
--prefix=/tools \
--build=${CLFS_HOST} \
--host=${CLFS_TARGET} \

Being the patch, texinfo-6.5-install_docs-1.patch:

diff -Naur texinfo-6.5.orig/Makefile.am texinfo-6.5/Makefile.am
--- texinfo-6.5.orig/Makefile.am        2017-07-16 20:51:01.000000000 +0200
+++ texinfo-6.5/Makefile.am     2018-03-18 18:52:26.318649542 +0100
@@ -57,7 +57,7 @@
   # Do libs first since the C programs depend on it.
   # Do doc and man last so things will be built when we get there.
   # Others are alphabetical.
-  SUBDIRS += $(native_tools) gnulib/lib
+  SUBDIRS += $(native_tools) gnulib/lib info
   SUBDIRS += info

* util-linux-2.31.1
As there is a problem with ncurses, the solution consists in changing the
path to ncurses in the Makefile: 
cp -v Makefile{,.orig}
sed -e 's/-ltinfo//' \
-e 's at -I/usr/include/ncursesw at -I/tools/include@' Makefile.orig > Makefile

I hope it helps.
Daniel Gutiérrez

More information about the Clfs-support mailing list