[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)

Νίκος Λαμπόβας lampovas at gmail.com
Mon Apr 9 01:34:51 PDT 2018


On 6 April 2018 at 22:08, Ken Moffat <zarniwhoop at ntlworld.com> wrote:

> On Fri, Apr 06, 2018 at 02:25:03PM +0300, Thanos Baloukas wrote:
> > On 06/04/2018 10:51 πμ, Νίκος Λαμπόβας wrote:
> > > (Ubuntu EGLIBC 2.15-0ubuntu10.6) 2.15
> >
> > Not sure about EGLIBC, the rest look good.
> > LFS-7.10 had library-check.sh too.
> >
> Eglibc was a fork of glibc, back in the days when glibc upstream
> could be unploeasant.  The 7.10 book needed glibc-2.11, so 2.15
> should be ok (although like Thanos I don't know why you are building
> such an old version).
> > >         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)
> > >
>
> Nasty. Nikos, you didn't need to go all the way to perl, if things
> are wrong like this then they won't magically get better.
>
> But like most other people I've stopped building on 32-bit and I
> don't have a clue what went wrong.
> > >
> > >       Also the specs file for 6.10 section in the dir (
> > > /tools/lib/gcc/i686-pc-linux-gnu/6.2.0/specs) has this entry for the
> > > linker
> > > %{muclibc:/lib/ld-uClibc.so.0;:%{mbionic:/system/bin/linker;
> :%{mmusl:/lib/ld-musl-i386.so.1;:/lib/ld-linux.so.2}}}
>
> You should ignore the linkers for uClibc and musl - those are
> alternative (small) versions of libc mostly intended for embedded
> systems.
>
> > One last thing I noted is your bash prompt
> > > root:/build_lfs_scripts#
> > which indicates that you scripted the build. That has benefits, but
> > did you ensure that your scripts exit when a command fails, putting
> > 'set -e' (without quotes) after #!/bin/bash? If using pipes,
> > 'set -o pipefail' is needed too.
>
> Yes, runaway scripts that continue after errors can give very
> strange rsults.  But usually a package fails to install.
>
>  i keep logs when running the scripts and everything that goes to stderr
is kept in a separate log with a prefix ****Error .
when a script has finished i review the logs for any errors.

   ./install-packages1.sh 1 >> logs/installPackages1.log 2> >(while read
line;do echo -e "****Error---$line\n" >&1;echo -e "$line">>
logs/installPackages1Errors.log;done)

A strange thing that i have not noticed is this.
Binaries 6.12 - 6.16 compiled with the old gcc have the correct paths on
shared libraries on ldd.
Thus because i keep vm snapshots, i skipped building 6.17 gcc and moved to
6.18.
Then 6.18 Bzip2 without having build the 6.17 gcc, had the correct paths
for shared libraries on ldd.
Thus the problem lies on 6.17 gcc.

Then I reverted the snapshot with the 6.17 gcc been build and i inspected
the dummy.log.
I found these references with 'tools' that i didnt like that much..

LIBRARY_PATH=/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/:/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../:/tools/lib/

COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
 /usr/libexec/gcc/i686-pc-linux-gnu/6.2.0/collect2 -plugin
/usr/libexec/gcc/i686-pc-linux-gnu/6.2.0/liblto_plugin.so
-plugin-opt=/usr/libexec/gcc/i686-pc-linux-gnu/6.2.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccZrO4rT.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--eh-frame-hdr -m elf_i386 -dynamic-linker /tools/lib/ld-linux.so.2
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crt1.o
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crti.o
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/crtbegin.o
-L/usr/lib/gcc/i686-pc-linux-gnu/6.2.0
-L/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../.. -L/tools/lib
/tmp/cc5hD6yA.o --verbose -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/crtend.o
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crtn.o

And then another strange thing is that when i inspected the dummy.log of
6.10 i found that in
COLLECT_GCC_OPTIONS
the option -dynamic-linker is pointing to /lib/ld-linux.so.2 and not
-dynamic-linker /tools/lib/ld-linux.so.2 as it is in 6.17 gcc.

Thanks a lot for your support, this mailing list is great :)


> ĸen
> --
> Before the universe began, there was a sound. It went: "One, two, ONE,
> two, three, four" [...] The cataclysmic power chord that followed was
> the creation of time and space and matter and it does Not Fade Away.
>  - wiki.lspace.org/mediawiki/Music_With_Rocks_In
>
>
> --
> http://lists.linuxfromscratch.org/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>
> Do not top post on this list.
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> http://en.wikipedia.org/wiki/Posting_style
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20180409/c0039130/attachment.html>


More information about the lfs-support mailing list