On Sat, 2020-07-11 at 11:28 +0000, John Frankish via lfs-dev wrote:
> A couple of errors found:
> 
> Chapter 6. Cross Compiling Temporary Tools
> 6.7. File-5.39
> 
> Building gives the error:
> 
> Cannot use the installed version of file (5.37) to
> cross-compile file 5.39
> Please install file 5.39 locally first
> 
> ..fixed by updating file on the host.

When faking cross compilation, and using the instructions in the book
(that is, not passing --build=$(./config.guess)), the build system is
aware that it can use the just built file to compile the "magic" file,
and so it does... If doing a true cross compilation, this error will
occur; two solutions:
- as you did, update file on host
- first compile a local "file" executable, similarly to what is done
  with ncurses

(see Also what Xi Ruoyao has said about that, his mail arrived while I
was writing this one)

Note that we cannot change Makefile.am and use autoreconf, because we
do not require autotools on the host.

> 
> Chapter 6. Cross Compiling Temporary Tools
> 6.10. Grep-3.4
> 
> Building pulls in a dep on libpcre from the host, which causes
> problems later, but can be fixed with "--disable-perl-regexp"

Normally, this shouldn't happen: configure makes two tests, one is
using pkg-config to find libpcre, the second is testing whether some
function from the library can be called. The second one should fail in
a cross-compiling environment, if sysroot is correctly set.

(creating a fake pkg-config as suggested by Xi Ruoyao shouldn't be
needed, at least if compiling on x86 for x86)

> 
> Also, but probably out of scope,
> 
> Chapter 5. Compiling a Cross-Toolchain
> 5.5. Glibc-2.31
> 
> Fails for arm (RPi) with a long double error fixed with an upstream
> patch:
> 
> https://sourceware.org/pipermail/glibc-cvs/2020q1/069150.html

We may want to make chapter 5/6 more compatible with a general cross-
compilation environment (at least x86->arm). I cannot look at that ATM.

Pierre

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to