wiki:cross-chap5

Version 1 (modified by thomas, 18 months ago) ( diff )

--

Cross-Chapter 5

This (temporary) page is meant to collect notes, ideas and even issues in regard to the new "Cross-Chapter 5" (CC5). This page might be used in the very early stage of developing the CC5 to avoid mixing issues into the "classic" ticket system which might be seen as kind of pollution. Later on, if CC5 goes live, this page should be deleted and resume normal operation as usual.

What is Cross-Chapter5

The modified build uses the cross compiler to cross compile packages that need themselves to be rebuilt, thus insulating them automatically from the host, without the need for a non standard directory layout. Chroot is entered as soon as possible, and the remaining chapter 5 packages are built in chroot.

pros
no /tools symlink, no need to tweak gcc sources, no need to build twice ld in binutils-pass2, no need to readjust the toolchain after chapter 6 glibc, no need to tweak the gcc specs, no need to reinstall kernel headers in chapter 6.
cons
chroot is entered in the middle of chapter 5 (maybe chapter 5 should be split), the debug sections of several packages reference x86_64-lfs-linux-gnu instead of x86_64-pc-linux-gnu, binutils-pass2 needs "enable-shared".

ToDos

  • Topic 1
  • Topic 2
  • ...

Notes

  • Note 1
  • Note 2
  • ...

Discussion topics

Book layout

Since

Issues

This is a collection issues which has been seen so far with CC5.

Phenomenon on ArchLinux

  • Moody, 04.05.2020: While it has been reported (in IRC) that others have build CC5 successfully on Arch, here is what happens when compiling glibc in Chap6 after installing man-pages:
    make  subdir=intl -C intl ..=../ subdir_lib
    make[2]: Entering directory '/sources/glibc-2.31/intl'
    .././scripts/mkinstalldirs /sources/glibc-2.31/build/intl
    .././scripts/mkinstalldirs /sources/glibc-2.31/build/intl
    mkdir -p -- /sources/glibc-2.31/build/intl
    .././scripts/mkinstalldirs /sources/glibc-2.31/build/intl
    mkdir -p -- /sources/glibc-2.31/build/intl
    LC_ALL=C gawk '!/^"POT-Creation-Date: [0-9-]+ [0-9:+-]+\\n"$/' ../po/de.po > /sources/glibc-2.31/build/intl/tst-gettext-de.po
    bison --yacc --name-prefix=__gettext --output /sources/glibc-2.31/build/intl/plural.c plural.y
    echo '' > /sources/glibc-2.31/build/intl/stamp.oST
    plural.y:46.1-7: warning: POSIX Yacc does not support %define [-Wyacc]
       46 | %define api.pure full
          | ^~~~~~~
    plural.y:47.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
       47 | %expect 7
          | ^~~~~~~
    mv -f /sources/glibc-2.31/build/intl/stamp.oST /sources/glibc-2.31/build/intl/stamp.oS
    bison: m4 subprocess failed: No such file or directory
    make[2]: *** [Makefile:46: /sources/glibc-2.31/build/intl/plural.c] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: Leaving directory '/sources/glibc-2.31/intl'
    make[1]: *** [Makefile:470: intl/subdir_lib] Error 2
    make[1]: Leaving directory '/sources/glibc-2.31'
    make: *** [Makefile:9: all] Error 2
    

Also, when in chroot, tar reports tar: write error just like this one discussed ten years ago: https://www.mail-archive.com/lfs-support@linuxfromscratch.org/msg13073.html

This all does not happen when running the build on a LFS-SVN host.

Note: See TracWiki for help on using the wiki.