[lfs-support] LFS 7.10 toolchain problem WAS LFS 7.10 - libreadline.so.6 not found error - when running make in 6.40 Perl-5.24.0

Thanos Baloukas baloukasthan at sch.gr
Thu Apr 5 09:12:39 PDT 2018


On 05/04/2018 12:38 μμ, Νίκος Λαμπόβας wrote:
> On 25 February 2018 at 11:35, Thanos Baloukas <baloukasthan at sch.gr 
> 
>     On 02/25/2018 10:58 AM, Νίκος Λαμπόβας wrote:
> 
>         Thank you for the quick answer.
>         As said in the email subject the book is LFS, the version is
>         7.10 and the Host is a virtual machine with Ubuntu 12.04 LTS.
>         The Oracle VM Virtualbox is running on Windows 10.
> 
...
snip
...
> 
>                  when running make in 6.40 in Perl i get the following
>         error a
>                  lot of times:
> 
>                  sh: error while loading shared libraries: libreadline.so.6:
>                  cannot open shared object file: No such file or directory
> 
>                  Before running make for 6.33 Bash this was the output
>         of ldconfig:
> 
>                  ldconfig -p | grep libreadline
>                        libreadline.so.6 (libc6) => /lib/libreadline.so.6
>                        libreadline.so (libc6) => /usr/lib/libreadline.so
> 
>                  After running make of 6.33 Bash i executed "exec /bin/bash
>                  --login +h" as the doc says the new bash with readline
>         was in place.
> 
>                  root:/# echo $0
>                  /bin/bash
>                  root:/# ldd /bin/bash
>                        linux-gate.so.1 (0xb77c7000)
>                        libreadline.so.6 => /lib/libreadline.so.6
>         (0xb7783000)
>                        libhistory.so.6 => /lib/libhistory.so.6 (0xb7778000)
>                        libncursesw.so.6 => /lib/libncursesw.so.6
>         (0xb770d000)
>                        libdl.so.2 => /lib/libdl.so.2 (0xb7708000)
>                        libc.so.6 => /lib/libc.so.6 (0xb7551000)
>                        /tools/lib/ld-linux.so.2 (0xb77c8000)
> 
> 
>     At that point the loader should be the one from /lib and not from
>     /tools/lib . Perhaps you did not do
>     mv -vf /usr/bin/bash /bin
>     on bash installation and /bin/bash is still a link to /tools/bin/bash
>     which was created on 'Creating Essential Files and Symlinks'.
>     In chroot do
>     ls -l /bin/bash /bin/sh
> 

> 
> Hi thanos,  "xronia polla" (greek wishes for easter holidays)
> 
Hi Nikos, "xronia polla"

Firstly, is there a reason you are installing the outdated LFS 7.10
and not the latest 8.2? Did you check carefully with version-check.sh
if your ubuntu host fulfills the host system requirements?

> I have built lfs all over again until "6.40 perl" for watching all 
> warnings and possible package errors.
> The commands you mentioned on 'Creating Essential Files and Symlinks' 
> were executed successfully.
> Also there is no reference of 'tools' in gcc specs file on ' Adjusting 
> the toolchain' and all debug messages
> for program interpreter are mention /lib/ld-linux.so.2 and not 
> /tools/lib/ld-linux.so.2.
> A strange thing i have noticed is that all binaries of the packages 
> before 6.17 GCC-6.2.0, have correct paths
> on ldd command. For example:
> 
>    ldd /usr/bin/file
>      linux-gate.so.1 (0xb773a000)
>      libmagic.so.1 => /usr/lib/libmagic.so.1 (0xb7710000)
>      libz.so.1 => /lib/libz.so.1 (0xb76f5000)
>      libc.so.6 => /lib/libc.so.6 (0xb753e000)
>      /lib/ld-linux.so.2 (0xb773b000)
> 
> But after GCC-6.2.0 all the libraries point to 'tools'. For example:
> 
>    ldd /bin/bzip2
>      linux-gate.so.1 (0xb7747000)
>      libbz2.so.1.0 => not found
>      libc.so.6 => /tools/lib/libc.so.6 (0xb758e000)
>      /tools/lib/ld-linux.so.2 (0xb7748000)
> 
> When i execute "LD_DEBUG=libs ldd /usr/bin/file" a binary compiled 
> before GCC-6.2.0 i find that it searches
> in the beginning the system path that refers to a directory relative to 
> "tools".
> 
> LD_DEBUG=libs ldd /usr/bin/file
>       11241:    find library=libdl.so.2 [0]; searching
>       11241:     search cache=/tools/etc/ld.so.cache
>       11241:     search 
> path=/tools/lib/tls/i686/sse2:/tools/lib/tls/i686:/tools/lib/tls/sse2:/tools/lib/tls:/tools/lib/i686/sse2:/tools/lib/i686:/tools/lib/sse2:/tools/lib    
>      (system search path)
>       11241:      trying file=/tools/lib/tls/i686/sse2/libdl.so.2
>       11241:      trying file=/tools/lib/tls/i686/libdl.so.2
>       11241:      trying file=/tools/lib/tls/sse2/libdl.so.2
>       11241:      trying file=/tools/lib/tls/libdl.so.2
>       11241:      trying file=/tools/lib/i686/sse2/libdl.so.2
>       11241:      trying file=/tools/lib/i686/libdl.so.2
>       11241:      trying file=/tools/lib/sse2/libdl.so.2
>       11241:      trying file=/tools/lib/libdl.so.2
>       11241:
>       11241:    find library=libc.so.6 [0]; searching
>       11241:     search cache=/tools/etc/ld.so.cache
>       11241:     search path=/tools/lib        (system search path)
>       11241:      trying file=/tools/lib/libc.so.6
>       11241:
>       11241:    calling init: /tools/lib/libc.so.6
>       11241:    calling init: /tools/lib/libdl.so.2
>       11241:    initialize program: /bin/bash
>       11241:    transferring control: /bin/bash
>       11241:
>       11241:    find library=libnss_files.so.2 [0]; searching
>       11241:     search cache=/tools/etc/ld.so.cache
>       11241:     search path=/tools/lib        (system search path)
>       11241:      trying file=/tools/lib/libnss_files.so.2
>       11241:
>       11241:    calling init: /tools/lib/libnss_files.so.2
>       11244:    calling fini: /bin/bash [0]
>       11244:    calling fini: /tools/lib/libdl.so.2 [0]
>       11244:    calling fini: /tools/lib/libnss_files.so.2 [0]
>       11244:
>       11245:    find library=libmagic.so.1 [0]; searching
>       11245:     search cache=/etc/ld.so.cache
>       11245:      trying file=/usr/lib/libmagic.so.1
>       .
>       .
>       .
> 
> How can i fix this?
>  
What is the output of
ls -l /usr/bin/ldd
and
echo $PATH
in chroot? If /tools/bin precedes /usr/bin you are executing
/tools/bin/ldd

If the  above are ok and you are absolutely sure that ALL the sanity
checks on 6.10 Adjusting the Toolchain and 6.17 GCC-6.2.0 were/are
as the book says, then maybe you missed something when rebooted and
restarted the installation. The critical points are listed in
2.3 Building LFS in Stages. It may be related to installing on a virtual
machine, I have never done that.

-- 
Thanos


More information about the lfs-support mailing list