[lfs-support] Chroot failure: bash not found

2012-12-14 Thread Alexander Spitzer
Hello all,

I am on section 6.4, entering the chroot environment, in LFS Book 7.2 and
when i attempt to chroot I get the following error:
/tools/bin/env: /tools/bin/bash: No such file or directory

This seems to be not too rarely encountered problem but all
the diagnostic checks that I've found seem to be okay:

The sanity check gives the following:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]

Running readelf -e /tools/bin/env | grep interpreter gives the following:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]

I read about a specs patch for gcc that is related to this problem, but I
could not find it in this version of the book. I could not find a specs
file in the host directory either.

This problem is very bizarre to me because there is definitely a bash
binary in /tools/bin.

If anyone can point me in the right direction or try to help me understand
what is going on, that would be great.

Thanks,
Alex
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Michael E. Maher
Hello Alex,

Could you send the output of:
  $ ls -l /tools/bin/bash
  $ /tools/bin/bash --version
Might be a permissions problem.

Also are you running the 'chroot' command as the root user?


Thanks,
Michael


On Fri, 2012-12-14 at 19:22 -0500, Alexander Spitzer wrote:
 Hello all,
 
 
 I am on section 6.4, entering the chroot environment, in LFS Book 7.2
 and when i attempt to chroot I get the following error:
 /tools/bin/env: /tools/bin/bash: No such file or directory
 
 
 This seems to be not too rarely encountered problem but all
 the diagnostic checks that I've found seem to be okay:
 
 
 The sanity check gives the following:
 [Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
 
 
 Running readelf -e /tools/bin/env | grep interpreter gives the
 following:
 [Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
 
 
 I read about a specs patch for gcc that is related to this problem,
 but I could not find it in this version of the book. I could not find
 a specs file in the host directory either.
 
 
 This problem is very bizarre to me because there is definitely a bash
 binary in /tools/bin.
 
 
 If anyone can point me in the right direction or try to help me
 understand what is going on, that would be great.
 
 
 Thanks,
 Alex

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Alexander Spitzer
Hello Michael,

Thanks for your reply.
Here is the output:
-rwxr-xr-x 1 root root 930472 Dec 13 22:58 /tools/bin/bash

and:
GNU bash, version 4.2.39(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html


This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I am running it as root but I am not sure if I entered root the correct
way. From my daily user I typed sudo -i and entered my root password. The
command su - didn't work for me because I do not know the root user
password (which should be different from MY root/sudo password).

In addition, if it may pertain in any way, the LFS partition is on a 4GB
USB flash drive.

On Fri, Dec 14, 2012 at 7:46 PM, Michael E. Maher mich...@maheronline.co.uk
 wrote:

 Hello Alex,

 Could you send the output of:
   $ ls -l /tools/bin/bash
   $ /tools/bin/bash --version
 Might be a permissions problem.

 Also are you running the 'chroot' command as the root user?


 Thanks,
 Michael


 On Fri, 2012-12-14 at 19:22 -0500, Alexander Spitzer wrote:
  Hello all,
 
 
  I am on section 6.4, entering the chroot environment, in LFS Book 7.2
  and when i attempt to chroot I get the following error:
  /tools/bin/env: /tools/bin/bash: No such file or directory
 
 
  This seems to be not too rarely encountered problem but all
  the diagnostic checks that I've found seem to be okay:
 
 
  The sanity check gives the following:
  [Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
 
 
  Running readelf -e /tools/bin/env | grep interpreter gives the
  following:
  [Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
 
 
  I read about a specs patch for gcc that is related to this problem,
  but I could not find it in this version of the book. I could not find
  a specs file in the host directory either.
 
 
  This problem is very bizarre to me because there is definitely a bash
  binary in /tools/bin.
 
 
  If anyone can point me in the right direction or try to help me
  understand what is going on, that would be great.
 
 
  Thanks,
  Alex


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Ken Moffat
On Fri, Dec 14, 2012 at 07:22:42PM -0500, Alexander Spitzer wrote:
 Hello all,
 
 I am on section 6.4, entering the chroot environment, in LFS Book 7.2 and
 when i attempt to chroot I get the following error:
 /tools/bin/env: /tools/bin/bash: No such file or directory
 
 It's somewhere in the FAQ : /tools/bin/bash is linked to a library
in /usr. 'ldd /tools/bin/bash' will show that, I guess.

 Did you maybe stop your chapter 5 build, shut down, and then resume
later ?  If so, you need to check an executable from each of the
packages that you built after resuming.

 Your sanity check shows everything was fine at that stage, but I
think that some of the later packages (well, bash at a minimum) have
been linked to a host library.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Michael E. Maher
Hello Alex,


On Fri, 2012-12-14 at 19:55 -0500, Alexander Spitzer wrote:
 Hello Michael,
 
 Thanks for your reply.
 Here is the output:
 -rwxr-xr-x 1 root root 930472 Dec 13 22:58 /tools/bin/bash

Permissions look good.

 
 
 and:
 GNU bash, version 4.2.39(1)-release (x86_64-unknown-linux-gnu)
 Copyright (C) 2011 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later
 http://gnu.org/licenses/gpl.html
 
 
 This is free software; you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
 

The executable is runnable and fully patched up.

 
 I am running it as root but I am not sure if I entered root the
 correct way. From my daily user I typed sudo -i and entered my root
 password. The command su - didn't work for me because I do not know
 the root user password (which should be different from MY root/sudo
 password).
 

I use 'sudo' rather than 'su' myself and don't recall seeing this error,
so I'm guessing that's not the issue. Maybe try without the '-i' switch,
so just 'sudo chroot ...' or use 'sudo -s' to open a root shell and try
there.

 
 In addition, if it may pertain in any way, the LFS partition is on a
 4GB USB flash drive.
 

That should be fine, as long as it's not FAT formatted.


Thanks,
Michael

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Alexander Spitzer
Hi Ken,

Running ldd /tools/bin/bash gives:
linux-vdso.so.1 =  (0x7fff3d955000)
libtinfo.so.5 = /lib/x86_64-linux-gnu/libtinfo.so.5 (0x7f39676b7000)
libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7f39674b3000)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f39670f3000)
/lib64/ld-linux-x86-64.so.2 (0x7f39678ff000)

which is bad because /tools/lib is nowhere to be found.

However, checking a later package such as grep gives:
linux-vdso.so.1 =  (0x7fffe7bff000)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f7eb0a62000)
/tools/lib64/ld-linux-x86-64.so.2 = /lib64/ld-linux-x86-64.so.2
(0x7f7eb0e42000)

which I'm assuming is good. The result for the other packages is similar to
the one for grep. Is bash the only package with a problem?
Or should the ONLY libraries listed from a ldd check be in /tools/bin (this
would mean that EVERY package is improperly installed)


On Fri, Dec 14, 2012 at 8:09 PM, Michael E. Maher mich...@maheronline.co.uk
 wrote:


 That should be fine, as long as it's not FAT formatted.

 The partition is ext3.

I'm almost positive I only took a break after finishing chapter 5. Thought
it seems that bash is the problem, is it possible that I didn't resume the
environment properly for chapter 6?

Thanks for the help.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Simon Geard
On Fri, 2012-12-14 at 19:22 -0500, Alexander Spitzer wrote:
 Hello all,
 
 
 I am on section 6.4, entering the chroot environment, in LFS Book 7.2
 and when i attempt to chroot I get the following error:
 /tools/bin/env: /tools/bin/bash: No such file or directory

No such file or directory doesn't always refer to the actual program
you ran (/tools/bin/bash) - it sometimes means the interpreter for the
program can't be found. If you use the same readelf command
on /tools/bin/bash, what does it tell you the interpreter is for that
program? And does it exist?

Also, what happens if you try running /tools/bin/bash from outside the
chroot, instead of inside it? Does it work there?


Not quite the same as your case, but I've trying to adapt my LFS scripts
to be a pure-64 system (i.e no need for a lib64 symlink to lib), and was
seeing this kind of error from stuff linked to an interpreter in the
non-existent /lib64.




signature.asc
Description: This is a digitally signed message part
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Alexander Spitzer
Hi Simon,

I think that's exactly the problem.
On Fri, Dec 14, 2012 at 8:45 PM, Simon Geard delga...@ihug.co.nz wrote:


 No such file or directory doesn't always refer to the actual program
 you ran (/tools/bin/bash) - it sometimes means the interpreter for the
 program can't be found. If you use the same readelf command
 on /tools/bin/bash, what does it tell you the interpreter is for that
 program? And does it exist?


readelf -l /tools/bin/bash | grep interpreter gives:
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

which is NOT what we want (/tools/lib64/...)
Other binaries give the correct:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]


 Also, what happens if you try running /tools/bin/bash from outside the
 chroot, instead of inside it? Does it work there?

 It works from the outside because there IS a /lib64/ld-linux-x86-64.so.2.
I'm assuming it doesn't work from the inside (i.e. chroot command gives an
error) because it can't get to the interpreter requested:
/lib64/ld-linux-x86-64.so.2

Now I have to try and figure out how to fix the bash binary to look for the
correct interpreter.
If there's anything wrong with my reasoning please don't hesitate to
correct me.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Ken Moffat
On Fri, Dec 14, 2012 at 08:36:08PM -0500, Alexander Spitzer wrote:
 Hi Ken,
 
 Running ldd /tools/bin/bash gives:
 linux-vdso.so.1 =  (0x7fff3d955000)
 libtinfo.so.5 = /lib/x86_64-linux-gnu/libtinfo.so.5 (0x7f39676b7000)
 libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7f39674b3000)
 libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f39670f3000)
 /lib64/ld-linux-x86-64.so.2 (0x7f39678ff000)
 
 which is bad because /tools/lib is nowhere to be found.
 
 I'm not familiar with libtinfo, but I'm currently on my netbook
which runs ubuntu and does indeed link bash to it.  On my most
recent LFS-7.2 desktop I see *from my backups* that /tools/bin/bash
was linked to a libncurses.so.5 in /tools.  So, your /tools/bin/bash
is only using host libraries.

 However, checking a later package such as grep gives:
 linux-vdso.so.1 =  (0x7fffe7bff000)
 libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f7eb0a62000)
 /tools/lib64/ld-linux-x86-64.so.2 = /lib64/ld-linux-x86-64.so.2
 (0x7f7eb0e42000)

 That looks odd, libc in /lib instead of /tools, and the loader
linked from /tools/lib64 to /lib64.  On my backups, everything is in
/tools/lib except for the loader which is in /tools/lib64.
 
 which I'm assuming is good. The result for the other packages is similar to
 the one for grep. Is bash the only package with a problem?
 Or should the ONLY libraries listed from a ldd check be in /tools/bin (this
 would mean that EVERY package is improperly installed)
 
/tools/lib (apart from the amd64 loader
/tools/lib64/ld-linux-x86-64.so.2 which should NOT use /lib64)
 
 I'm almost positive I only took a break after finishing chapter 5. Thought
 it seems that bash is the problem, is it possible that I didn't resume the
 environment properly for chapter 6?
 
 Thanks for the help.

 At the moment, I don't recognize your results.  Usually, people who
get the correct results from the sanity checks get a good build.
Perhaps there is something different about _how_ you built this.
What host distro are you using ?  Did you check all the host system
requirements ?

 But, in the absence of any other information (your loader in
/tools/lib64 apparently using a loader in /lib64 really perplexes
me!), I don't think I know what is wrong.  Maybe someone else will
recognize the symptoms.

 Did you run the sanity check after gcc in chapter 5 ?

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Alexander Spitzer
On Fri, Dec 14, 2012 at 9:45 PM, Ken Moffat zarniwh...@ntlworld.com wrote:

  At the moment, I don't recognize your results.  Usually, people who
 get the correct results from the sanity checks get a good build.
 Perhaps there is something different about _how_ you built this.
 What host distro are you using ?  Did you check all the host system
 requirements ?

  But, in the absence of any other information (your loader in
 /tools/lib64 apparently using a loader in /lib64 really perplexes
 me!), I don't think I know what is wrong.  Maybe someone else will
 recognize the symptoms.

  Did you run the sanity check after gcc in chapter 5 ?

 ĸen
 --
 das eine Mal als Tragödie, das andere Mal als Farce
 --
 http://linuxfromscratch.org/mailman/listinfo/lfs-support
 FAQ: http://www.linuxfromscratch.org/lfs/faq.html
 Unsubscribe: See the above information page


I ran the ldd command from my user, rather than the lfs user.
My apologies! Sorry if this caused confusion.

ldd /tools/bin/grep now gives:
linux-vdso.so.1 (0x7fff3658a000)
libc.so.6 = /tools/lib/libc.so.6 (0x7fbd657d4000)
/tools/lib64/ld-linux-x86-64.so.2 (0x7fbd65b79000)

and for bash (same thing as before):
linux-vdso.so.1 =  (0x7fff3148)
libtinfo.so.5 = /lib/x86_64-linux-gnu/libtinfo.so.5 (0x7f48f0234000)
libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7f48f003)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f48efc71000)
/lib64/ld-linux-x86-64.so.2 (0x7f48f045b000)

I did find another clue: when running make for the bash package I ran
into a Permission denied error for yacc and I somehow sudoed my way
around it. Perhaps this resulted in the wrong libraries being linked
because I was not the lfs user. Will try again and reply back.

Thanks for your help and sorry again for wasting your time with my silly
mistakes.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Simon Geard
On Fri, 2012-12-14 at 22:26 -0500, Alexander Spitzer wrote:

 I did find another clue: when running make for the bash package I
 ran into a Permission denied error for yacc and I somehow sudoed my
 way around it. Perhaps this resulted in the wrong libraries being
 linked because I was not the lfs user. Will try again and reply back.

Needing to use sudo in chapter 5 should be seen as a very strong warning
signal that you've done something wrong. And that's because by giving
the lfs user ownership of $LFS, that user should have the ability to
write to anything it *should* be writing to. As such, a permission error
is often a sign that it's trying to write to somewhere outside of $LFS -
i.e, somewhere in the host system.

Simon.


signature.asc
Description: This is a digitally signed message part
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Simon Geard
On Fri, 2012-12-14 at 21:32 -0500, Alexander Spitzer wrote:
 I'm assuming it doesn't work from the inside (i.e. chroot command
 gives an error) because it can't get to the interpreter requested:
 /lib64/ld-linux-x86-64.so.2

Yes, that'd be correct. That path *will* exist a little later (once you
install glibc in chapter 6), but is definitely wrong at this point in
time.

 Now I have to try and figure out how to fix the bash binary to look
 for the correct interpreter.

Does it work if you simply rebuild bash, according to the instructions
in the book? No need to actually install it - just run the steps up to
make, and run readelf on the resulting binary in order to see if it's
valid.

Also, someone else asked you to run ls -l /tools/bin/bash, but I don't
see the output of that command in any of your emails. Might be
important?

Simon.


signature.asc
Description: This is a digitally signed message part
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Bruce Dubbs
Simon Geard wrote:
 On Fri, 2012-12-14 at 22:26 -0500, Alexander Spitzer wrote:

 I did find another clue: when running make for the bash package I
 ran into a Permission denied error for yacc and I somehow sudoed my
 way around it. Perhaps this resulted in the wrong libraries being
 linked because I was not the lfs user. Will try again and reply back.

 Needing to use sudo in chapter 5 should be seen as a very strong warning
 signal that you've done something wrong. And that's because by giving
 the lfs user ownership of $LFS, that user should have the ability to
 write to anything it *should* be writing to. As such, a permission error
 is often a sign that it's trying to write to somewhere outside of $LFS -
 i.e, somewhere in the host system.

I agree.  Are your links correct as specified in host system requirements?

See 
http://www.linuxfromscratch.org/lfs/view/development/chapter05/generalinstructions.html

http://www.linuxfromscratch.org/lfs/view/development/prologue/hostreqs.html

If these links are wrong, the best thing to do is start over.

The first note in the general instructions has been rewritten, but the 
host requirements section is not new.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Alexander Spitzer
On Fri, Dec 14, 2012 at 11:14 PM, Simon Geard delga...@ihug.co.nz wrote:

 Does it work if you simply rebuild bash, according to the instructions
 in the book? No need to actually install it - just run the steps up to
 make, and run readelf on the resulting binary in order to see if it's
 valid.

 Also, someone else asked you to run ls -l /tools/bin/bash, but I don't
 see the output of that command in any of your emails. Might be
 important?

 Simon.

 --
 http://linuxfromscratch.org/mailman/listinfo/lfs-support
 FAQ: http://www.linuxfromscratch.org/lfs/faq.html
 Unsubscribe: See the above information page

 Make is the step that fails for me. Initially it gave an error like yacc:
Permission denied but now it gives the following error:
/bin/sh: bashbug: Permission denied
make: *** [bashbug] Error 1

ls -l /tools/bin/bash gives (run as user lfs):
-rwxr-xr-x 1 root root 3184266 Dec 15 03:52 /tools/bin/bash

I am suspicious about the links.
readlink -f /usr/bin/yacc gives /usr/bin/yacc BUT /usr/bin/yacc
contains:
#! /bin/sh
exec '/usr/bin/bison' -y $@

which LOOKS like a script executing bison. Is it executing the correct
bison?

readlink -f /bin/sh gave:
/bin/dash

until I changed it moments ago with sudo rm /bin/sh and sudo ln -s
/bin/bash /bin/sh
now readlink -f /bin/sh correctly gives:
/bin/bash

Does the fact that it pointed to dash mean big trouble for all packages
built during chapter 5?
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure: bash not found

2012-12-14 Thread Bruce Dubbs
Alexander Spitzer wrote:

 Does the fact that it pointed to dash mean big trouble for all packages
 built during chapter 5?

Not necessarily all packages, but glibc for sure.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure

2012-01-16 Thread Andrew Benton
On Sun, 15 Jan 2012 13:34:32 +0400
Дмитрий Шеховцов d...@transinf.ru wrote:

 
Hello.
 
 I follow LFS 7.0 book.
 After Glibc-2.14.1 has been installed (chapter 6.9) chroot fails with
 Segmentation fault error. 
 If I rename $LFS/lib to $LFS/lib_ just before chrooting then chroot is
 completed OK. 

Why does $LFS/lib exist before you chroot? In the book we create
$LFS/lib on the page after we chroot. What's in $LFS/lib that's causing
a segfault?

ls $LFS/lib

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure

2012-01-16 Thread Дмитрий Шеховцов
 
Hello.
 
 I follow LFS 7.0 book.
 After Glibc-2.14.1 has been installed (chapter 6.9) chroot fails with 
 Segmentation fault error.
 If I rename $LFS/lib to $LFS/lib_ just before chrooting then chroot 
 is completed OK.

Why does $LFS/lib exist before you chroot? In the book we create 
$LFS/lib on the page after we chroot. What's in $LFS/lib that's causing 
a segfault?



After I had installed Glibc (so $LFS/lib was filled with the libraries) I 
shutdown the host and went to sleep. On the next day I could not enter the 
chroot unless $LFS/lib is renamed. The chroot's exit code is 139. When I try to 
run toolchain's bash from the host's root:

# /tools/bin/bash

I get a segfault always regardless of the renaming.

  

ls $LFS/lib

cpp
ld-2.14.1.so
ld-linux.so.2
libanl-2.14.1.so
libanl.so.1
libBrokenLocale-2.14.1.so
libBrokenLocale.so.1
libc-2.14.1.so
libcidn-2.14.1.so
libcidn.so.1
libcrypt-2.14.1.so
libcrypt.so.1
libc.so.6
libdl-2.14.1.so
libdl.so.2
libm-2.14.1.so
libmemusage.so
libm.so.6
libnsl-2.14.1.so
libnsl.so.1
libnss_compat-2.14.1.so
libnss_compat.so.2
libnss_dns-2.14.1.so
libnss_dns.so.2
libnss_files-2.14.1.so
libnss_files.so.2
libnss_hesiod-2.14.1.so
libnss_hesiod.so.2
libnss_nis-2.14.1.so
libnss_nisplus-2.14.1.so
libnss_nisplus.so.2
libnss_nis.so.2
libpcprofile.so
libpthread-2.14.1.so
libpthread.so.0
libresolv-2.14.1.so
libresolv.so.2
librt-2.14.1.so
librt.so.1
libSegFault.so
libthread_db-1.0.so
libthread_db.so.1
libutil-2.14.1.so
libutil.so.1
libz.so.1
libz.so.1.2.5


--
Dmitry


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


[lfs-support] Chroot failure

2012-01-15 Thread Дмитрий Шеховцов

   Hello.

I follow LFS 7.0 book.
After Glibc-2.14.1 has been installed (chapter 6.9) chroot fails with
Segmentation fault error. 
If I rename $LFS/lib to $LFS/lib_ just before chrooting then chroot is
completed OK. 
Once chrooted I rename back from /lib_ to /lib being inside chroot
environment. 
All further tests on dummy.c (chapter 6.10 Re-adjusting the Toolchain)
pass OK exactlty 
they described in the book.

Does that mean I must suspend further building to achieve a normal chrooting
?

Thank you in advance.



P.S. About my host system: Puppy Linux 5.11

Hardware: Acer Aspire One 521: AMD Athlon II Neo K125 Processor 1.7GHz, 2Gb
RAM

The output of version-check.sh:

bash, version 3.00.16(1)-release
/bin/sh - /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.20.1-system.20100303
bison (GNU Bison) 2.4.1
/usr/bin/yacc - /usr/bin/yacc
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  7.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
GNU Awk 3.1.6
/usr/bin/awk - /usr/bin/awk
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
GNU C Library (Ubuntu EGLIBC 2.11.1-0ubuntu7) stable release version 2.11.1
GNU grep 2.5.4
gzip 1.3.12
Linux version 2.6.33.2 (root@puppypc) (gcc version 4.4.3 (Ubuntu
4.4.3-4ubuntu5) ) #1 SMP Thu May 27 10:56:32 EST 2010
m4 (GNU M4) 1.4.13
GNU Make 3.81
patch 2.6
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.22
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.3
Compilation OK


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


[lfs-support] Chroot failure

2011-12-29 Thread Austin Jones
I'm doing LFS 7.0 on an Ubuntu 11.10 system. My system rebooted and I need
to get back into the Chroot environment. I mounted all the virtual kernel
file systems, but when I ran the Chroot command in section 6.4, I received:

chroot: failed to run command `/tools/bin/env': No such file or directory

How to I chroot I to my new system?
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure

2011-12-29 Thread Andrew Benton
On Thu, 29 Dec 2011 06:47:39 -0500
Austin Jones austin.jones...@gmail.com wrote:

 I'm doing LFS 7.0 on an Ubuntu 11.10 system. My system rebooted and I need
 to get back into the Chroot environment. I mounted all the virtual kernel
 file systems, but when I ran the Chroot command in section 6.4, I received:
 
 chroot: failed to run command `/tools/bin/env': No such file or directory
 

What does this show?
ldd /tools/bin/env

If it mentions /usr/lib or /lib then you have compiled it linked to
libraries on your host system and it will not work in chroot. If so it
(and everything else that has been miscompiled) will need to be
recompiled properly.

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Chroot failure

2011-12-29 Thread Austin Jones
No, I had just forgotten to mount the partition that I had LFS on. Thanks
anyways!
On Dec 29, 2011 9:07 AM, Andrew Benton b3n...@gmail.com wrote:

 On Thu, 29 Dec 2011 06:47:39 -0500
 Austin Jones austin.jones...@gmail.com wrote:

  I'm doing LFS 7.0 on an Ubuntu 11.10 system. My system rebooted and I
 need
  to get back into the Chroot environment. I mounted all the virtual kernel
  file systems, but when I ran the Chroot command in section 6.4, I
 received:
 
  chroot: failed to run command `/tools/bin/env': No such file or directory
 

 What does this show?
 ldd /tools/bin/env

 If it mentions /usr/lib or /lib then you have compiled it linked to
 libraries on your host system and it will not work in chroot. If so it
 (and everything else that has been miscompiled) will need to be
 recompiled properly.

 Andy
 --
 http://linuxfromscratch.org/mailman/listinfo/lfs-support
 FAQ: http://www.linuxfromscratch.org/lfs/faq.html
 Unsubscribe: See the above information page

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page