Discussion:
[lfs-support] Failure while building libstdc++
norman
2018-08-10 07:04:44 UTC
Permalink
Hi All,

I'm a newbie in the lfs, I want to build a new distro, and I did as LFS
v8.2 told me,

but I met a problem while build libstdc++(Chapter 5.8).

hecking whether the x86_64-lfs-linux-gnu-gcc linker
(/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.

my version check results:

bash, version 4.4.19(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.30
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.28
diff (GNU diffutils) 3.6
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
g++ (Ubuntu 7.3.0-16ubuntu3) 7.3.0
(GNU libc) 2.27
grep (GNU grep) 3.1
gzip 1.6
Linux version 4.15.0-29-generic (***@lgw01-amd64-057) (gcc version
7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018
m4 (GNU M4) 1.4.18
GNU Make 4.1
GNU patch 2.7.6
Perl version='5.26.1';
sed (GNU sed) 4.4
tar (GNU tar) 1.29
texi2any (GNU texinfo) 6.5
xz (XZ Utils) 5.2.2
g++ compilation OK

Can anyone tell what's wrong with this?
--
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
Xi Ruoyao
2018-08-10 07:40:01 UTC
Permalink
Post by norman
Hi All,
I'm a newbie in the lfs, I want to build a new distro, and I did as LFS
v8.2 told me,
but I met a problem while build libstdc++(Chapter 5.8).
hecking whether the x86_64-lfs-linux-gnu-gcc linker
(/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.
Can anyone tell what's wrong with this?
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
succeed? Can you run the generated "a.out" file (issue `./a.out`)?
--
Xi Ruoyao <***@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
--
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.or
norman
2018-08-10 07:57:13 UTC
Permalink
No, it's failed,

***@home:/mnt/lfs/build/tmp$ $LFS_TGT-gcc dummy.c
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/7.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/7.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
cannot find crti.o: No such file or directory
Do you know which step is wrong? I think I did as the book told me.
Post by Xi Ruoyao
Post by norman
Hi All,
I'm a newbie in the lfs, I want to build a new distro, and I did as LFS
v8.2 told me,
but I met a problem while build libstdc++(Chapter 5.8).
hecking whether the x86_64-lfs-linux-gnu-gcc linker
(/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.
Can anyone tell what's wrong with this?
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
succeed? Can you run the generated "a.out" file (issue `./a.out`)?
--
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/Post
Thomas Trepl
2018-08-10 08:41:44 UTC
Permalink
Post by norman
No, it's failed,
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crti.o: No such file or directory
Do you know which step is wrong? I think I did as the book told me.
Post by Xi Ruoyao
Post by norman
Hi All,
I'm a newbie in the lfs, I want to build a new distro, and I did as LFS
v8.2 told me,
but I met a problem while build libstdc++(Chapter 5.8).
hecking whether the x86_64-lfs-linux-gnu-gcc linker
(/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64)
supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.
Can anyone tell what's wrong with this?
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
succeed? Can you run the generated "a.out" file (issue `./a.out`)?
When the gcc-test failes, something seriously went wrong. But its not
that dramatic as this is one of the first steps, so if you need to
redo, not that much time is wasted.

Check that your system setup (expecially $LFS and friends) is correct.
Review chapter 2 and 4. Make sure that all is setup proper whenever
you start building a package.
Did you logout/login between building one of the first packages so some
environment vars got lost?

(Btw, when posting to LFS mailing lists, its appreciated if you do not
"top-post" - just add answers *below* the mail history, not on top. If
a thread gets longer, its easier to follow by reading from top to
bottom.)

--
Thomas
--
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/Po
norman
2018-08-13 03:28:37 UTC
Permalink
Post by Thomas Trepl
Post by norman
No, it's failed,
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crti.o: No such file or directory
Do you know which step is wrong? I think I did as the book told me.
Post by Xi Ruoyao
Post by norman
Hi All,
I'm a newbie in the lfs, I want to build a new distro, and I did as LFS
v8.2 told me,
but I met a problem while build libstdc++(Chapter 5.8).
hecking whether the x86_64-lfs-linux-gnu-gcc linker
(/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64)
supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.
Can anyone tell what's wrong with this?
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
succeed? Can you run the generated "a.out" file (issue `./a.out`)?
When the gcc-test failes, something seriously went wrong. But its not
that dramatic as this is one of the first steps, so if you need to
redo, not that much time is wasted.
Check that your system setup (expecially $LFS and friends) is correct.
Review chapter 2 and 4. Make sure that all is setup proper whenever
you start building a package.
Did you logout/login between building one of the first packages so some
environment vars got lost?
(Btw, when posting to LFS mailing lists, its appreciated if you do not
"top-post" - just add answers *below* the mail history, not on top. If
a thread gets longer, its easier to follow by reading from top to
bottom.)
--
Thomas
Thanks for you help,
I rebuild all, and I find I make a mistake on building gcc(5.10.
GCC-7.3.0 - Pass 2), and  now it's fine.
But I find a another problem in the chapter  6.9. Glibc-2.27, and
resolve it following the solution:
http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064956.html
I wonder why the instruction book update?
--
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/w
Thomas Trepl
2018-08-13 07:14:43 UTC
Permalink
Post by norman
Post by Thomas Trepl
Post by norman
No, it's failed,
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crti.o: No such file or directory
Do you know which step is wrong? I think I did as the book told me.
Post by Xi Ruoyao
Post by norman
Hi All,
I'm a newbie in the lfs, I want to build a new distro, and I
did
as LFS
v8.2 told me,
but I met a problem while build libstdc++(Chapter 5.8).
hecking whether the x86_64-lfs-linux-gnu-gcc linker
(/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
Link
tests
are not allowed after GCC_NO_EXECUTABLES.
Can anyone tell what's wrong with this?
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
succeed? Can you run the generated "a.out" file (issue
`./a.out`)?
When the gcc-test failes, something seriously went wrong. But its not
that dramatic as this is one of the first steps, so if you need to
redo, not that much time is wasted.
Check that your system setup (expecially $LFS and friends) is correct.
Review chapter 2 and 4. Make sure that all is setup proper
whenever
you start building a package.
Did you logout/login between building one of the first packages so some
environment vars got lost?
(Btw, when posting to LFS mailing lists, its appreciated if you do not
"top-post" - just add answers *below* the mail history, not on top. If
a thread gets longer, its easier to follow by reading from top to
bottom.)
--
Thomas
Thanks for you help,
I rebuild all, and I find I make a mistake on building gcc(5.10.
GCC-7.3.0 - Pass 2), and now it's fine.
But I find a another problem in the chapter 6.9. Glibc-2.27, and
http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064956.html
Post by norman
I wonder why the instruction book update?
How does the problem look like? Is that a compilation error or
something else? Could you also specify on which kind of machine you are
building?

--
Thomas
--
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
norman
2018-08-13 07:26:08 UTC
Permalink
Post by norman
Post by norman
Post by Thomas Trepl
Post by norman
No, it's failed,
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-
cannot find crti.o: No such file or directory
Do you know which step is wrong? I think I did as the book told me.
Post by Xi Ruoyao
Post by norman
Hi All,
I'm a newbie in the lfs, I want to build a new distro, and I
did
as LFS
v8.2 told me,
but I met a problem while build libstdc++(Chapter 5.8).
hecking whether the x86_64-lfs-linux-gnu-gcc linker
(/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
Link
tests
are not allowed after GCC_NO_EXECUTABLES.
Can anyone tell what's wrong with this?
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
succeed? Can you run the generated "a.out" file (issue
`./a.out`)?
When the gcc-test failes, something seriously went wrong. But its not
that dramatic as this is one of the first steps, so if you need to
redo, not that much time is wasted.
Check that your system setup (expecially $LFS and friends) is correct.
Review chapter 2 and 4. Make sure that all is setup proper
whenever
you start building a package.
Did you logout/login between building one of the first packages so some
environment vars got lost?
(Btw, when posting to LFS mailing lists, its appreciated if you do not
"top-post" - just add answers *below* the mail history, not on top. If
a thread gets longer, its easier to follow by reading from top to
bottom.)
--
Thomas
Thanks for you help,
I rebuild all, and I find I make a mistake on building gcc(5.10.
GCC-7.3.0 - Pass 2), and now it's fine.
But I find a another problem in the chapter 6.9. Glibc-2.27, and
http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064956.html
Post by norman
I wonder why the instruction book update?
How does the problem look like? Is that a compilation error or
something else? Could you also specify on which kind of machine you are
building?
--
Thomas
It reports a  config error while running ./configure:
error: missing __attribute__ ((constructor)) support??

my host  is ubuntu 18.04, uname -a:

4.15.0-30-generic #32-Ubuntu SMP Thu Jul 26 17:42:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
--
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
Xi Ruoyao
2018-08-13 07:51:04 UTC
Permalink
Post by norman
Post by norman
Post by norman
Thanks for you help,
I rebuild all, and I find I make a mistake on building gcc(5.10.
GCC-7.3.0 - Pass 2), and now it's fine.
But I find a another problem in the chapter 6.9. Glibc-2.27, and
http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064956.html
Post by norman
I wonder why the instruction book update?
How does the problem look like? Is that a compilation error or
something else? Could you also specify on which kind of machine you are
building?
--
Thomas
error: missing __attribute__ ((constructor)) support??
Notice that this is Chapter 6, not Chapter 5.

In Chapter 6 we are in a chroot environment which does NOT rely on host system
(except the kernel). So we should NEVER use these "workarounds" in Chapter 6,
except for a kernel bug.

Glibc autoconf test failure suggests something in the toolchain is wrong. If
you just workaround it, you may leave a timebomb in the final system.
--
Xi Ruoyao <***@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
--
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.w
norman
2018-08-13 08:07:33 UTC
Permalink
Post by Xi Ruoyao
Post by norman
Post by norman
Post by norman
Thanks for you help,
I rebuild all, and I find I make a mistake on building gcc(5.10.
GCC-7.3.0 - Pass 2), and now it's fine.
But I find a another problem in the chapter 6.9. Glibc-2.27, and
http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064956.html
Post by norman
I wonder why the instruction book update?
How does the problem look like? Is that a compilation error or
something else? Could you also specify on which kind of machine you are
building?
--
Thomas
error: missing __attribute__ ((constructor)) support??
Notice that this is Chapter 6, not Chapter 5.
In Chapter 6 we are in a chroot environment which does NOT rely on host system
(except the kernel). So we should NEVER use these "workarounds" in Chapter 6,
except for a kernel bug.
Glibc autoconf test failure suggests something in the toolchain is wrong. If
you just workaround it, you may leave a timebomb in the final system.
Yes,  it's in the chroot environment,  Is the solution wrong? Ok, I'll
do some check again.
--
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
Xi Ruoyao
2018-08-10 09:42:38 UTC
Permalink
Post by norman
No, it's failed,
Then you should troubleshoot and resolve this issue, instead of continuing
blindly.
Post by norman
cannot find crt1.o: No such file or directory
cannot find crti.o: No such file or directory
Do you know which step is wrong? I think I did as the book told me.
No I don't. Now you can check if /tools/lib/crt1.o exists. If it exists,
it's likely you forgot to modify "STANDARD_STARTFILE_PREFIX_1" in GCC Pass 1
(5.5). If not, your Glibc (5.7) installation is broken.
--
Xi Ruoyao <***@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
--
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.wikipe
Loading...