Discussion:
[lfs-support] Chapter 6.7.1 | /tools/bin/gcc: No such file or directory
Кирилл
2018-03-19 21:06:08 UTC
Permalink
At the chapter 6.7.1 when i do 'make mrproper' it says, that gcc not
found. But before i passed all tests successfully. And already was
trying starting from beginning 2 times(!), but it doesn't help. I was
making all directly, as written in the book. I was also watching
through the mailing list and tried to find the sollution it, but also
did not help.
I was trying to do so: ln -sv /tools/lib/ld-linux-x86-64.so.2
/lib/ld-linux-x86-64.so.2
But also did not help.
--
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/P
Ken Moffat
2018-03-19 22:58:10 UTC
Permalink
Post by Кирилл
At the chapter 6.7.1 when i do 'make mrproper' it says, that gcc not
found. But before i passed all tests successfully. And already was
trying starting from beginning 2 times(!), but it doesn't help. I was
making all directly, as written in the book. I was also watching
through the mailing list and tried to find the sollution it, but also
did not help.
I was trying to do so: ln -sv /tools/lib/ld-linux-x86-64.so.2
/lib/ld-linux-x86-64.so.2
But also did not help.
You are right at the start of doing things in chroot. This suggests
that something is either missing from the build of chapter 5, or
else linked to a library on the host system.

You have not said what the exact error message was when you tried to
run 'make mrproper' but -

Did you use fresh source for each build (the multiple builds of gcc,
and g++, and binutils in chapter 5, and now building the linux
headers) ?

For gcc -

type -pa gcc

In chroot, and on a minimalist LFS system, 'which' does not exist,
so I'm really saying 'which gcc'. It should say /tools/bin/gcc.
Assuming that it does,

ldd /tools/bin/gcc

One or more of these libs is not found ? If so, think about how you
built the system. You did not say why you thought that symlinking
ld-linux would help, but if you followed everything in the book
(including the host system requirements) things should just work.

We need more information, repeatedly starting again is not the
answer.

ĸen
--
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
--
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-mai
James
2018-03-20 14:13:16 UTC
Permalink
Post by Ken Moffat
Post by Кирилл
At the chapter 6.7.1 when i do 'make mrproper' it says, that gcc not
found. But before i passed all tests successfully. And already was
trying starting from beginning 2 times(!), but it doesn't help. I was
making all directly, as written in the book. I was also watching
through the mailing list and tried to find the sollution it, but also
did not help.
I was trying to do so: ln -sv /tools/lib/ld-linux-x86-64.so.2
/lib/ld-linux-x86-64.so.2
But also did not help.
You are right at the start of doing things in chroot. This suggests
that something is either missing from the build of chapter 5, or
else linked to a library on the host system.
You have not said what the exact error message was when you tried to
run 'make mrproper' but -
Did you use fresh source for each build (the multiple builds of gcc,
and g++, and binutils in chapter 5, and now building the linux
headers) ?
For gcc -
type -pa gcc
In chroot, and on a minimalist LFS system, 'which' does not exist,
so I'm really saying 'which gcc'. It should say /tools/bin/gcc.
Assuming that it does,
ldd /tools/bin/gcc
One or more of these libs is not found ? If so, think about how you
built the system. You did not say why you thought that symlinking
ld-linux would help, but if you followed everything in the book
(including the host system requirements) things should just work.
We need more information, repeatedly starting again is not the
answer.
ĸen
--
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
--
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
Thank you very much for your answer.

First of all, when I do 'make mrproper' I get this output:

(lfs) root:/sources/linux-4.15.10# make mrproper
./scripts/gcc-version.sh: line 26: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 26: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /tools/bin/gcc: No such file or directory
make[2]: gcc: Command not found
CLEAN arch/x86/include/generated

2) Yes, I made fresh source for each build

3) type -pa gcc

gives me:

/tools/bin/gcc

4) ldd /tools/bin/gcc

gives me this:

linux-vdso.so.1 (0x00007fff111a3000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007f4985200000)
/lib64/ld-linux-x86-64.so.2 => /tools/lib64/ld-linux-x86-64.so.2
(0x00007f49855b4000)
--
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://e
Ken Moffat
2018-03-20 15:08:50 UTC
Permalink
Post by James
Post by Ken Moffat
Post by Кирилл
At the chapter 6.7.1 when i do 'make mrproper' it says, that gcc not
found. But before i passed all tests successfully. And already was
trying starting from beginning 2 times(!), but it doesn't help. I was
making all directly, as written in the book. I was also watching
through the mailing list and tried to find the sollution it, but also
did not help.
I was trying to do so: ln -sv /tools/lib/ld-linux-x86-64.so.2
/lib/ld-linux-x86-64.so.2
But also did not help.
You are right at the start of doing things in chroot. This suggests
that something is either missing from the build of chapter 5, or
else linked to a library on the host system.
You have not said what the exact error message was when you tried to
run 'make mrproper' but -
[...]
Post by James
Post by Ken Moffat
We need more information, repeatedly starting again is not the
answer.
Thank you very much for your answer.
(lfs) root:/sources/linux-4.15.10# make mrproper
./scripts/gcc-version.sh: line 26: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 26: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /tools/bin/gcc: No such file or directory
make[2]: gcc: Command not found
CLEAN arch/x86/include/generated
OK. There are various reports of this on google over the years.
I think something went wrong in pass 2 of binutils or pass 2 gcc.

In particular, the sanity check at the end of pass 2 gcc.
Post by James
2) Yes, I made fresh source for each build
3) type -pa gcc
/tools/bin/gcc
4) ldd /tools/bin/gcc
linux-vdso.so.1 (0x00007fff111a3000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007f4985200000)
/lib64/ld-linux-x86-64.so.2 => /tools/lib64/ld-linux-x86-64.so.2
(0x00007f49855b4000)
I think you said you had made a symlink for lid-linux, but that it
did not help. That suggests the sanity check at the end of pass 2
gcc did not give the right answer.

ĸen
--
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
--
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
James
2018-03-20 15:17:35 UTC
Permalink
Post by Ken Moffat
Post by James
Post by Ken Moffat
Post by Кирилл
At the chapter 6.7.1 when i do 'make mrproper' it says, that gcc not
found. But before i passed all tests successfully. And already was
trying starting from beginning 2 times(!), but it doesn't help. I was
making all directly, as written in the book. I was also watching
through the mailing list and tried to find the sollution it, but also
did not help.
I was trying to do so: ln -sv /tools/lib/ld-linux-x86-64.so.2
/lib/ld-linux-x86-64.so.2
But also did not help.
You are right at the start of doing things in chroot. This suggests
that something is either missing from the build of chapter 5, or
else linked to a library on the host system.
You have not said what the exact error message was when you tried to
run 'make mrproper' but -
[...]
Post by James
Post by Ken Moffat
We need more information, repeatedly starting again is not the
answer.
Thank you very much for your answer.
(lfs) root:/sources/linux-4.15.10# make mrproper
./scripts/gcc-version.sh: line 26: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 26: /tools/bin/gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /tools/bin/gcc: No such file or directory
make[2]: gcc: Command not found
CLEAN arch/x86/include/generated
OK. There are various reports of this on google over the years.
I think something went wrong in pass 2 of binutils or pass 2 gcc.
In particular, the sanity check at the end of pass 2 gcc.
Post by James
2) Yes, I made fresh source for each build
3) type -pa gcc
/tools/bin/gcc
4) ldd /tools/bin/gcc
linux-vdso.so.1 (0x00007fff111a3000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007f4985200000)
/lib64/ld-linux-x86-64.so.2 => /tools/lib64/ld-linux-x86-64.so.2
(0x00007f49855b4000)
I think you said you had made a symlink for lid-linux, but that it
did not help. That suggests the sanity check at the end of pass 2
gcc did not give the right answer.
ĸen
--
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
--
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
No, sanity check was ok everywhere. Gcc stop working only when I enter
chroot environment. If I'm using 'lfs' user, everything works fine.
--
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.wik
Ken Moffat
2018-03-20 16:08:15 UTC
Permalink
Post by James
Post by Ken Moffat
I think you said you had made a symlink for lid-linux, but that it
did not help. That suggests the sanity check at the end of pass 2
gcc did not give the right answer.
No, sanity check was ok everywhere. Gcc stop working only when I enter
chroot environment. If I'm using 'lfs' user, everything works fine.
That still sounds as if it is using *something* from the host which
is no-longer available when you enter chroot.

I've long-ago forgotten most of what I learned about how to debug
things like this, so all I can suggest is that you run ldd on gcc as
user lfs and compare it to what you see in chroot.

Also, just to confirm it is a problem with gcc itself, not something
triggered by the kernel build infrastructure, please try to run
gcc --version
in chroot (I assume it will report the same error).

ĸen
--
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
--
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?
Loading...