[lfs-support] chapter 6, glibc compile error

Frans de Boer frans at fransdb.nl
Sun Jul 15 13:51:28 PDT 2018

On 07/15/2018 10:39 PM, Frans de Boer wrote:
> On 07/15/2018 10:09 PM, Ken Moffat wrote:
>> On Sun, Jul 15, 2018 at 09:19:22PM +0200, Frans de Boer wrote:
>>> LS,
>>> Below is a repeated piece of information, now being brought as a 
>>> separate
>>> issue from systemd.
>>> I get the following error when i try to compile glibc in chapter 6:
>>> ...
>>> bison --yacc --name-prefix=__gettext --output
>>> /sources-lfs/glibc-2.27/glibc-build/intl/plural.c plural.y
>>> bison: m4 subprocess failed: No such file or directory
>>> make[2]: *** [Makefile:46:
>>> /sources-lfs/glibc-2.27/glibc-build/intl/plural.c] Error 1
>>> make[2]: Leaving directory '/sources-lfs/glibc-2.27/intl'
>>> make[1]: *** [Makefile:215: intl/subdir_lib] Error 2
>>> make[1]: Leaving directory '/sources-lfs/glibc-2.27'
>>> make: *** [Makefile:9: all] Error 2
>>> If I include 'ln -sfv /tools/bin/m4 /usr/bin' as suggested some time 
>>> ago, I
>>> can compile glibc. In an effort to understand why systemd crashes 
>>> and having
>>> a message that there is a segfault in glibc while booting, i tried to
>>> recompile all again. Now I can't even compile glibc.
>>> Is this a result of some modification in the tool chain, or is the
>>> documentation not up to date?
>>> Regards,
>>> Frans.
>> I don't think the documentation is out of date.  My last running
>> system is from 15th June, although I built as far as the end of
>> chroot from the 26th June book to look at a possible perl issue.
>> And both were sysv.
>> This is an unusual problem.  I think your version of m4 in /tools is
>> linked to *host* libc and ld-linux.  By copying the prog into chroot
>> it can now find libc and the loader,
>> I suggest that, outside chroot, you run ldd on /tools/bin/m4. If I
>> am right, also check the links for an executable (prog, or lib, or
>> libexec) from every other package in chapter 5 after pass 2 gcc.
>> Some of the tools progs appear to be ok, maybe only m4 was wrong,
>> perhaps you built in stages and resumed without one of the envvars
>> set correctly, e.g. PATH ?
>> ĸen
> I build the toolchain first, - without interruption - and after that I 
> started with chapter 6.
> Within chroot, m4 can be found and executed.
> After starting chapter 6 up to and including the creation of links in 
> lib64 - prior to running configure for glibc - the result of ldd 
> /tools.bin/m4 is:
>   linux-vdso.so.1 (0x00007fff2bcca000)
>   libc.so.6 => /lib64/libc.so.6 (0x00007fb4fd3c7000)
>   /tools/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 
> (0x00007fb4fd781000)
> where ld-linux-x86_64.so.2 links to /lib.
> Note that /lib64/libc.so.6 does not exist. I think that should be 
> /tools/lib64/libc.so.6?
> I did not modified anything and any other program did worked before, 
> so I wait a little to check all other programs after gcc-2.
> --- Frans.
BTW: making the link /lib64/ldc.so.6 -> /tools/lib64/libc.so.6 is also 
no solution.

--- Frans

More information about the lfs-support mailing list