Discussion:
[lfs-support] LFS 7.10 - libreadline.so.6 not found error - when running make in 6.40 Perl-5.24.0
Νίκος Λαμπόβας
2018-02-24 20:37:41 UTC
Permalink
Hello,

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)

I dont know why i am getting this error. Any help?

Thanks a lot
Nikos
Thanos Baloukas
2018-02-24 21:36:02 UTC
Permalink
Post by Νίκος Λαμπόβας
Hello,
sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory
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)
I dont know why i am getting this error. Any help?
Thanks a lot
Nikos
Which book? Which version? Which host?
--
Thanos
--
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.o
Νίκος Λαμπόβας
2018-02-25 08:58:18 UTC
Permalink
Hello Thano,

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.

In Perl when running make i get the following error which occurs a lot of
times (more than 50); right after when make runs miniperl:

cc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall
-Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings
time64.c
cc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall
-Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings
miniperlmain.c
cc -fstack-protector-strong -L/usr/local/lib -o miniperl \
opmini.o perlmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o
mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o
scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o
pp_pack.o pp_sort.o caretx.o dquote.o time64.o miniperlmain.o -lm
/tools/lib/libcrypt.a
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo
&2 Failed to build miniperl. Please run make minitest; exit 1'
*sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory*
./miniperl -Ilib -f write_buildcustomize.pl
./miniperl -Ilib configpm
written lib/Config.pod
updated lib/Config.pm
updated lib/Config_heavy.pl
./miniperl -Ilib make_ext.pl cpan/Archive-Tar/pm_to_blib MAKE="make"
LIBPERL_A=libperl.a
make[1]: Entering directory '/sources/perl-5.24.0/cpan/Archive-Tar'
Makefile out-of-date with respect to ../../lib/Config.pm ../../config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
"../../miniperl" "-I../../lib" "-I../../lib" Makefile.PL "INSTALLDIRS=perl"
"INSTALLMAN1DIR=none" "INSTALLMAN3DIR=none" "PERL_CORE=1"
"LIBPERL_A=libperl.a"


*sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directorysh: error while loading shared
libraries: libreadline.so.6: cannot open shared object file: No such file
or directory*

Thank you
Post by Νίκος Λαμπόβας
Hello,
sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory
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)
I dont know why i am getting this error. Any help?
Thanks a lot
Nikos
Which book? Which version? Which host?
--
Thanos
--
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
Thanos Baloukas
2018-02-25 09:35:57 UTC
Permalink
On 02/25/2018 10:58 AM, Νίκος Λαμπόβας wrote:
Please don't top post
Post by Νίκος Λαμπόβας
Hello Thano,
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.
In Perl when running make i get the following error which occurs a lot
cc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall
-Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings
time64.c
cc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall
-Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings
miniperlmain.c
cc -fstack-protector-strong -L/usr/local/lib -o miniperl \
    opmini.o perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o
util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o
pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o
deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o
locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o  miniperlmain.o
-lm /tools/lib/libcrypt.a
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c
'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
*sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory*
./miniperl -Ilib -f write_buildcustomize.pl <http://write_buildcustomize.pl>
./miniperl -Ilib configpm
written lib/Config.pod
updated lib/Config.pm
updated lib/Config_heavy.pl
./miniperl -Ilib make_ext.pl <http://make_ext.pl>
cpan/Archive-Tar/pm_to_blib  MAKE="make" LIBPERL_A=libperl.a
make[1]: Entering directory '/sources/perl-5.24.0/cpan/Archive-Tar'
Makefile out-of-date with respect to ../../lib/Config.pm ../../config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
"../../miniperl" "-I../../lib" "-I../../lib" Makefile.PL
"INSTALLDIRS=perl" "INSTALLMAN1DIR=none" "INSTALLMAN3DIR=none"
"PERL_CORE=1" "LIBPERL_A=libperl.a"
*sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory
sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory
*
Thank you
Hello,
cannot open shared object file: No such file or directory
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
Post by Νίκος Λαμπόβας
I dont know why i am getting this error. Any help?
Thanks a lot
Nikos
Which book? Which version? Which host?
--
Thanos
--
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
Νίκος Λαμπόβας
2018-04-05 09:38:38 UTC
Permalink
Post by Thanos Baloukas
Please don't top post
Post by Νίκος Λαμπόβας
Hello Thano,
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.
In Perl when running make i get the following error which occurs a lot of
cc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall -Werror=declaration-after-statement
-Wextra -Wc++-compat -Wwrite-strings time64.c
cc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall -Werror=declaration-after-statement
-Wextra -Wc++-compat -Wwrite-strings miniperlmain.c
cc -fstack-protector-strong -L/usr/local/lib -o miniperl \
opmini.o perlmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o
util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o
pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o
pp_pack.o pp_sort.o caretx.o dquote.o time64.o miniperlmain.o -lm
/tools/lib/libcrypt.a
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c
'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
*sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory*
./miniperl -Ilib -f write_buildcustomize.pl <
http://write_buildcustomize.pl>
./miniperl -Ilib configpm
written lib/Config.pod
updated lib/Config.pm
updated lib/Config_heavy.pl
./miniperl -Ilib make_ext.pl <http://make_ext.pl>
cpan/Archive-Tar/pm_to_blib MAKE="make" LIBPERL_A=libperl.a
make[1]: Entering directory '/sources/perl-5.24.0/cpan/Archive-Tar'
Makefile out-of-date with respect to ../../lib/Config.pm ../../config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
"../../miniperl" "-I../../lib" "-I../../lib" Makefile.PL
"INSTALLDIRS=perl" "INSTALLMAN1DIR=none" "INSTALLMAN3DIR=none"
"PERL_CORE=1" "LIBPERL_A=libperl.a"
*sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory
sh: error while loading shared libraries: libreadline.so.6: cannot open
shared object file: No such file or directory
*
Thank you
Hello,
when running make in 6.40 in Perl i get the following error a
cannot open shared object file: No such file or directory
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
I dont know why i am getting this error. Any help?
Post by Νίκος Λαμπόβας
Thanks a lot
Nikos
Which book? Which version? Which host?
--
Thanos
--
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
Hi thanos, "xronia polla" (greek wishes for easter holidays)

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?
Thanos Baloukas
2018-04-05 16:12:39 UTC
Permalink
Post by Νίκος Λαμπόβας
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
...
Post by Νίκος Λαμπόβας
        when running make in 6.40 in Perl i get the following
error a
        cannot open shared object file: No such file or directory
        Before running make for 6.33 Bash this was the output
        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?
Post by Νίκος Λαμπόβας
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
  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)
  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:    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:    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:    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:    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]
     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
--
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/
Νίκος Λαμπόβας
2018-04-06 07:51:07 UTC
Permalink
Post by Thanos Baloukas
Post by Νίκος Λαμπόβας
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
...
Post by Νίκος Λαμπόβας
when running make in 6.40 in Perl i get the following error a
cannot open shared object file: No such file or directory
Before running make for 6.33 Bash this was the output
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?
i started lfs when lfs 7.10 was the new version but i postponed it in
order to build it parallel to my OS course of NTUA

Did you check carefully with version-check.sh
bash, version 4.2.25(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.0-p3, GNU MP 5.0.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3
g++ (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3
(Ubuntu EGLIBC 2.15-0ubuntu10.6) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.13.0-32-generic
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
Post by Thanos Baloukas
if your ubuntu host fulfills the host system requirements?
I have built lfs all over again until "6.40 perl" for watching all
Post by Νίκος Λαμπόβας
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
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)
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
/tools/lib/tls/i686:/tools/lib/tls/sse2:/tools/lib/tls:/tool
s/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: 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: 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: 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: 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]
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
This is the output:
root:/build_lfs_scripts# ls -l /usr/bin/ldd
-rwxr-xr-x 1 root root 5858 Mar 9 16:50 /usr/bin/ldd

root:/build_lfs_scripts# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
Post by Thanos Baloukas
If the above are ok and you are absolutely sure that ALL the sanity
checks on 6.10 Adjusting the Toolchain
this is the output:
'/tools/bin/ld' -> '/tools/bin/ld-old'
'/tools/i686-pc-linux-gnu/bin/ld' -> '/tools/i686-pc-linux-gnu/bin/ld-old'
'/tools/bin/ld-new' -> '/tools/bin/ld'
'/tools/i686-pc-linux-gnu/bin/ld' -> '/tools/bin/ld'
[Requesting program interpreter: /lib/ld-linux.so.2]
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded
#include <...> search starts here:
/usr/include
SEARCH_DIR("=/tools/i686-pc-linux-gnu/lib32")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("=/tools/i686-pc-linux-gnu/lib");
attempt to open /lib/libc.so.6 succeeded
found ld-linux.so.2 at /lib/ld-linux.so.2
removed 'dummy.c'
removed 'a.out'
removed 'dummy.log'

there is a reference of tools here but is accepted according to this
log

http://lfs.phayoune.org/lfs/build-logs/8.1-rc1/pentium4/logs/077-adjusting
(on version 7.10 there is no log for 6.10 section)

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}}}
which is correct but for the gcc in 6.17 there's no such modification
and no specs file.



and 6.17 GCC-6.2.0 were/are
Post by Thanos Baloukas
as the book says,
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crt1.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crti.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crtn.o succeeded
#include <...> search starts here:
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/include
/usr/local/include
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/include-fixed
/usr/include
SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
SEARCH_DIR("/usr/local/lib32")
SEARCH_DIR("/lib32")
SEARCH_DIR("/usr/lib32")
SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");
attempt to open /lib/libc.so.6 succeeded
found ld-linux.so.2 at /lib/ld-linux.so.2
removed 'dummy.c'
removed 'a.out'
removed 'dummy.log'
Post by Thanos Baloukas
then maybe you missed something when rebooted and
restarted the installation.
I have never rebooted because i always revert to the snapshot i want
in the virtual machine
Post by Thanos Baloukas
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
--
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
Thanos Baloukas
2018-04-06 11:25:03 UTC
Permalink
On 25 February 2018 at 11:35, Thanos Baloukas
        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
...
Firstly, is there a reason you are installing the outdated LFS 7.10
and not the latest 8.2?
    i started lfs when lfs 7.10 was the new version but i postponed it
in order to build it parallel to my OS course of NTUA
Did you check carefully with version-check.sh
            bash, version 4.2.25(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.0-p3, GNU MP 5.0.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3
g++ (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3
(Ubuntu EGLIBC 2.15-0ubuntu10.6) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.13.0-32-generic
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
Not sure about EGLIBC, the rest look good.
LFS-7.10 had library-check.sh too.
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
   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)
   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:    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:    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:    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:    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]
      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
root:/build_lfs_scripts# ls -l /usr/bin/ldd
-rwxr-xr-x 1 root root 5858 Mar  9 16:50 /usr/bin/ldd
root:/build_lfs_scripts# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
If the  above are ok and you are absolutely sure that ALL the sanity
checks on 6.10 Adjusting the Toolchain
           '/tools/bin/ld' -> '/tools/bin/ld-old'
'/tools/i686-pc-linux-gnu/bin/ld' -> '/tools/i686-pc-linux-gnu/bin/ld-old'
'/tools/bin/ld-new' -> '/tools/bin/ld'
'/tools/i686-pc-linux-gnu/bin/ld' -> '/tools/bin/ld'
      [Requesting program interpreter: /lib/ld-linux.so.2]
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded
 /usr/include
SEARCH_DIR("=/tools/i686-pc-linux-gnu/lib32")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("=/tools/i686-pc-linux-gnu/lib");
attempt to open /lib/libc.so.6 succeeded
found ld-linux.so.2 at /lib/ld-linux.so.2
removed 'dummy.c'
removed 'a.out'
removed 'dummy.log'
     there is a reference of tools here but is accepted according to
this log
http://lfs.phayoune.org/lfs/build-logs/8.1-rc1/pentium4/logs/077-adjusting
      (on version 7.10 there is no log for 6.10 section)
     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}}}
     which is correct but for the gcc in 6.17 there's no such
modification and no specs file.
Not sure about that. As I wrote above I'm not even sure your host's libc
meets the requirements.
and 6.17 GCC-6.2.0 were/are
as the book says,
           /usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crt1.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crti.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../crtn.o succeeded
 /usr/lib/gcc/i686-pc-linux-gnu/6.2.0/include
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/6.2.0/include-fixed
 /usr/include
SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
SEARCH_DIR("/usr/local/lib32")
SEARCH_DIR("/lib32")
SEARCH_DIR("/usr/lib32")
SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");
attempt to open /lib/libc.so.6 succeeded
found ld-linux.so.2 at /lib/ld-linux.so.2
removed 'dummy.c'
removed 'a.out'
removed 'dummy.log'
Seems good.

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.

I'm sorry I can't help you more to debug this.
I didn't install LFS-7.10 and haven't build on x86 for a long time.
Good luck with your course.

Καλή Ανάσταση! Happy Easter!

PS: Sorry for the quoting mess.
--
Thanos
--
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 i
Ken Moffat
2018-04-06 19:08:18 UTC
Permalink
Post by Thanos Baloukas
Post by Νίκος Λαμπόβας
(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).
Post by Thanos Baloukas
Post by Νίκος Λαμπόβας
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
   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)
   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.
Post by Thanos Baloukas
Post by Νίκος Λαμπόβας
     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.
Post by Thanos Baloukas
One last thing I noted is your bash prompt
Post by Νίκος Λαμπόβας
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.

ĸ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
Νίκος Λαμπόβας
2018-04-09 08:34:51 UTC
Permalink
Post by Ken Moffat
Post by Thanos Baloukas
Post by Νίκος Λαμπόβας
(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).
Post by Thanos Baloukas
Post by Νίκος Λαμπόβας
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
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
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.
Post by Thanos Baloukas
Post by Νίκος Λαμπόβας
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.
Post by Thanos Baloukas
One last thing I noted is your bash prompt
Post by Νίκος Λαμπόβας
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 :)
Post by Ken Moffat
Äž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
Ag, D.E Chatzimanikas
2018-04-05 17:36:59 UTC
Permalink
This post might be inappropriate. Click to display it.
Ag, D.E Chatzimanikas
2018-04-05 17:47:21 UTC
Permalink
That is what happens when you are not having proper concentration.

(here is the link anyway)

http://lists.linuxfromscratch.org/pipermail/lfs-dev/2018-April/072190.html
Post by Ag, D.E Chatzimanikas
(but i offered my help (did you read the link above?) (no?)
--
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/Posti
Paul Rogers
2018-04-08 18:34:33 UTC
Permalink
This post might be inappropriate. Click to display it.
Νίκος Λαμπόβας
2018-04-09 08:45:40 UTC
Permalink
Post by Paul Rogers
@Nikos, I am currently running 7.10 (albeit an x86-64 build), and still
build/maintain my 32-bit (B)LFS systems. I hadn't been paying attention to
your thread, currently distracted setting up the 400+ scripts of my 8.1
build. I'm going through your thread "with gun and camera". I don't have
any of the logs from that build, they're only for debugging a package's
build. Let's see what shows up.
Thanks a lot :)
But first, IF it's necessary to start over again, I think it may be worth
the effort to upgrade gcc in Ch-5.5, -5.10, & -6.17 to 7.3 to get retpoline
and hope there's no breakage. Then I'd also patch the kernel up to get the
KPTI patches. I've patched up to 4.9.75 to get some early patches, and
plan to keep up with the latest 4.9 patches for now. I followed Ken's
approach of a separate gcc-7.3 in /opt for compiling the kernel.
Now to your thread...
- I have some reservations about using Virtual Box, and Ubuntu though
others say that works (I can't. I've been using LFS hosts since 4.1). One
must be certain of the image VB is presenting your build environment. In
particular for a 32-bit build, there's the problem of building gmp for
32-bits on a 64-bit system. I find I must be "forensic" about
cross-building like that. I use --target quite a lot, just to make sure
gcc knows what it will run on.
Sorry for not understanding, when u mean 64-bit system u refer to the VM
host which is Ubuntu 12.04 32-bit? Or my laptops OS which is windows 10
64-bit? i don't get it why is it a problem, since my VM runs on 32-bit.

- I agree with Thanos that the "ldd /bin/bash" is a major problem, and
Post by Paul Rogers
means you must backtrack at least as far as 6.33, and with your diagnosis
that there was already a problem at 6.17. "ldd /usr/bin/file" shouldn't
still be looking at /tools, which strongly implicates 6.10, "Adjusting the
toolchain".
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.
Post by Paul Rogers
(And in the absence of a good package manager watching your build and able
to selectively remove everything since, I hope you tarballed Ch5 at
completion, and can start over with a clean "partition" at the start of
Ch6. I always do that and keep it until the build is running reasonably
well,)
i keep snapshots for every group of packages been built (i split section
in 8 groups of packages), i revert them and i dont reboot.
Post by Paul Rogers
Post by Νίκος Λαμπόβας
there is a reference of tools here but is accepted according
to this log
http://lfs.phayoune.org/lfs/build-logs/8.1-rc1/pentium4/
logs/077-adjusting
That is NOT authoritative. The book is!
Your SEARCH_DIR still references /tools. Stop there. Until that is
fixed, everything else is a waste of time and effort.
You need to get back to the end of 6.9 with everything "squeaky
clean"--which may not be easy, but you must be able to prove it--and redo
6.10 exactly as the book says. If it doesn't work, then something has
already departed from the book's path--and that's why I used the word
"forensic" above. No deviations are allowed. And yes, from time to time
I've had problems there myself.
- I start all my build scripts "#!/bin/bash -e" so they "drop out" on
errors. Of course 6.10 relies on visual inspection. I intersperse "echo
"Continue?"; read dummy" at each check, and ^C if it doesn't match.
--
Paul Rogers
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL :-)
--
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
Loading...