LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   install glibc 2.17 error help me :( (https://www.linuxquestions.org/questions/linux-from-scratch-13/install-glibc-2-17-error-help-me-4175460557/)

potterius 05-03-2013 06:26 AM

install glibc 2.17 error help me :(
 
excuse me, Im from indonesia so I apologize coz my english very bad. :D
so when I install glibc 2.17 on my ubuntu, I haved make and the error come.
this is notification on my terminal
Quote:

collect2: error: ld returned 1 exit status
make[2]: *** [/mnt/lfs/sources/glibc-build/resolv/libresolv.so] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.17/resolv'
make[1]: *** [resolv/others] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.17'
make: *** [all] Error 2
what should I do master??? :(
thank before :D

druuna 05-03-2013 06:51 AM

Is this LFS related?

If so:
- Which LFS version?
- Is your host made compliant (post output of script mentioned here: version-check.sh)?
- Which chapter? I'm assuming 5.7.
- Did you have any problems before this chapter?
- Did you exactly follow the previous steps shown in 5.7 and did you have any problems?
- You need to post more of the output (at least 15 lines before the make: *** [all] Error 2 line).

In general, have a look here: 1.5. Help.

potterius 05-03-2013 07:49 AM

Quote:

Originally Posted by druuna (Post 4944060)
Is this LFS related?

If so:
- Which LFS version?
- Is your host made compliant (post output of script mentioned here: version-check.sh)?
- Which chapter? I'm assuming 5.7.
- Did you have any problems before this chapter?
- Did you exactly follow the previous steps shown in 5.7 and did you have any problems?
- You need to post more of the output (at least 15 lines before the make: *** [all] Error 2 line).

In general, have a look here: 1.5. Help.

-which LFS version? LFS 7.3 sir.

-Is your host made compliant (post output of script mentioned here: version-check.sh)?
Quote:

bash, version 4.2.37(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
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.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
(Ubuntu EGLIBC 2.15-0ubuntu20.1) 2.15
grep (GNU grep) 2.12
gzip 1.5
Linux version 3.5.0-28-generic (buildd@aatxe) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #48-Ubuntu SMP Tue Apr 23 23:05:48 UTC 2013
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
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
gcc compilation OK
sir

-Which chapter? I'm assuming 5.7.
correct sir.

-Did you have any problems before this chapter? no sir.

-Did you exactly follow the previous steps shown in 5.7 and did you have any problems? yes sir, I do follow the previous steps and I don't have problem sir.

-You need to post more of the output (at least 15 lines before the make: *** [all] Error 2 line).
Quote:

ns_netint.os ns_ttl.os ns_print.os ns_samedomain.os ns_date.os
a - gethnamaddr.os
a - res_comp.os
a - res_debug.os
a - res_data.os
a - res_mkquery.os
a - res_query.os
a - res_send.os
a - inet_net_ntop.os
a - inet_net_pton.os
a - inet_neta.os
a - base64.os
a - ns_parse.os
a - ns_name.os
a - ns_netint.os
a - ns_ttl.os
a - ns_print.os
a - ns_samedomain.os
a - ns_date.os
i686-lfs-linux-gnu-gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/tools/lib/ld-linux.so.2 -B/mnt/lfs/sources/glibc-build/csu/ -Wl,--version-script=/mnt/lfs/sources/glibc-build/libresolv.map -Wl,-soname=libresolv.so.2 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -L/mnt/lfs/sources/glibc-build -L/mnt/lfs/sources/glibc-build/math -L/mnt/lfs/sources/glibc-build/elf -L/mnt/lfs/sources/glibc-build/dlfcn -L/mnt/lfs/sources/glibc-build/nss -L/mnt/lfs/sources/glibc-build/nis -L/mnt/lfs/sources/glibc-build/rt -L/mnt/lfs/sources/glibc-build/resolv -L/mnt/lfs/sources/glibc-build/crypt -L/mnt/lfs/sources/glibc-build/nptl -Wl,-rpath-link=/mnt/lfs/sources/glibc-build:/mnt/lfs/sources/glibc-build/math:/mnt/lfs/sources/glibc-build/elf:/mnt/lfs/sources/glibc-build/dlfcn:/mnt/lfs/sources/glibc-build/nss:/mnt/lfs/sources/glibc-build/nis:/mnt/lfs/sources/glibc-build/rt:/mnt/lfs/sources/glibc-build/resolv:/mnt/lfs/sources/glibc-build/crypt:/mnt/lfs/sources/glibc-build/nptl -o /mnt/lfs/sources/glibc-build/resolv/libresolv.so -T /mnt/lfs/sources/glibc-build/shlib.lds /mnt/lfs/sources/glibc-build/csu/abi-note.o -Wl,--whole-archive /mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a -Wl,--no-whole-archive /mnt/lfs/sources/glibc-build/elf/interp.os /mnt/lfs/sources/glibc-build/libc.so /mnt/lfs/sources/glibc-build/libc_nonshared.a -Wl,--as-needed /mnt/lfs/sources/glibc-build/elf/ld.so -Wl,--no-as-needed
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os): In function `getanswer':
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:180: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:483: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os): In function `res_gethostbyaddr':
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:644: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:783: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os): In function `__GI_res_gethostbyname2':
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:510: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os):/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:636: more undefined references to `__stack_chk_guard' follow
collect2: error: ld returned 1 exit status
make[2]: *** [/mnt/lfs/sources/glibc-build/resolv/libresolv.so] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.17/resolv'
make[1]: *** [resolv/others] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.17'
make: *** [all] Error 2
please help me sir :(

druuna 05-03-2013 08:06 AM

Quote:

Originally Posted by potterius (Post 4944092)
bash, version 4.2.37(1)-release
/bin/sh -> /bin/dash <-- should be /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.13
.
.

You need to fix the red one.

I would remove what you have done so far and start again once the dash->bash problem is fixed.

potterius 05-03-2013 08:17 AM

Quote:

Originally Posted by druuna (Post 4944102)
You need to fix the red one.

I would remove what you have done so far and start again once the dash->bash problem is fixed.

wow nice sir. but how can I change /bin/dash to /bin/bash sir?
sorry sir, Im very very newbie about LFS :(
but thanks to help me sir :D

druuna 05-03-2013 08:23 AM

Quote:

Originally Posted by potterius (Post 4944114)
wow nice sir. but how can I change /bin/dash to /bin/bash sir?
sorry sir, Im very very newbie about LFS :(
but thanks to help me sir :D

First of all: No need for calling me sir, I'm just an average-joe that knows a bit about linux/unix ;)

As root user do the following to change the dash link:
Code:

root@ubuntu-vm:~# rm /bin/sh
root@ubuntu-vm:~# ln -s /bin/bash /bin/sh

BTW: If you really are very new at linux then building LFS will be a very difficult task! Do have a look at this LFS chapter: vi. Prerequisites

potterius 05-03-2013 08:53 AM

Quote:

Originally Posted by druuna (Post 4944128)
First of all: No need for calling me sir, I'm just an average-joe that knows a bit about linux/unix ;)

As root user do the following to change the dash link:
Code:

root@ubuntu-vm:~# rm /bin/sh
root@ubuntu-vm:~# ln -s /bin/bash /bin/sh

BTW: If you really are very new at linux then building LFS will be a very difficult task! Do have a look at this LFS chapter: vi. Prerequisites

oke masbroh (masbroh is call name brother in indonesia :D )
/bin/dash changed to /bin/bash

I building LFS coz this is a task from my lecture masbroh. :D
oke masbroh thank a lot.

potterius 05-03-2013 10:35 AM

Quote:

Originally Posted by druuna (Post 4944102)
You need to fix the red one.

I would remove what you have done so far and start again once the dash->bash problem is fixed.

masbroh, the instalation glibc 2.17 still error. I have do change bin/dash to bin/bash and I do again instal LFS from begining but still error like before.

spiky0011 05-03-2013 10:38 AM

Hi

What error are you getting now and as advised did you start again from the begining

potterius 05-03-2013 10:42 AM

Quote:

Originally Posted by spiky0011 (Post 4944225)
Hi

What error are you getting now and as advised did you start again from the begining

this is notification error on my terminal.
Code:

ns_netint.os ns_ttl.os ns_print.os ns_samedomain.os ns_date.os
a - gethnamaddr.os
a - res_comp.os
a - res_debug.os
a - res_data.os
a - res_mkquery.os
a - res_query.os
a - res_send.os
a - inet_net_ntop.os
a - inet_net_pton.os
a - inet_neta.os
a - base64.os
a - ns_parse.os
a - ns_name.os
a - ns_netint.os
a - ns_ttl.os
a - ns_print.os
a - ns_samedomain.os
a - ns_date.os
i686-lfs-linux-gnu-gcc  -shared -static-libgcc -Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/tools/lib/ld-linux.so.2  -B/mnt/lfs/sources/glibc-build/csu/  -Wl,--version-script=/mnt/lfs/sources/glibc-build/libresolv.map -Wl,-soname=libresolv.so.2 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both  -L/mnt/lfs/sources/glibc-build -L/mnt/lfs/sources/glibc-build/math -L/mnt/lfs/sources/glibc-build/elf -L/mnt/lfs/sources/glibc-build/dlfcn -L/mnt/lfs/sources/glibc-build/nss -L/mnt/lfs/sources/glibc-build/nis -L/mnt/lfs/sources/glibc-build/rt -L/mnt/lfs/sources/glibc-build/resolv -L/mnt/lfs/sources/glibc-build/crypt -L/mnt/lfs/sources/glibc-build/nptl -Wl,-rpath-link=/mnt/lfs/sources/glibc-build:/mnt/lfs/sources/glibc-build/math:/mnt/lfs/sources/glibc-build/elf:/mnt/lfs/sources/glibc-build/dlfcn:/mnt/lfs/sources/glibc-build/nss:/mnt/lfs/sources/glibc-build/nis:/mnt/lfs/sources/glibc-build/rt:/mnt/lfs/sources/glibc-build/resolv:/mnt/lfs/sources/glibc-build/crypt:/mnt/lfs/sources/glibc-build/nptl -o /mnt/lfs/sources/glibc-build/resolv/libresolv.so -T /mnt/lfs/sources/glibc-build/shlib.lds /mnt/lfs/sources/glibc-build/csu/abi-note.o -Wl,--whole-archive /mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a -Wl,--no-whole-archive /mnt/lfs/sources/glibc-build/elf/interp.os /mnt/lfs/sources/glibc-build/libc.so /mnt/lfs/sources/glibc-build/libc_nonshared.a -Wl,--as-needed /mnt/lfs/sources/glibc-build/elf/ld.so -Wl,--no-as-needed
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os): In function `getanswer':
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:180: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:483: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os): In function `res_gethostbyaddr':
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:644: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:783: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os): In function `__GI_res_gethostbyname2':
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:510: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os):/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:636: more undefined references to `__stack_chk_guard' follow
collect2: error: ld returned 1 exit status
make[2]: *** [/mnt/lfs/sources/glibc-build/resolv/libresolv.so] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.17/resolv'
make[1]: *** [resolv/others] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.17'
make: *** [all] Error 2

this is my version-check.sh
Code:

bash, version 4.2.37(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
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.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
(Ubuntu EGLIBC 2.15-0ubuntu20.1) 2.15
grep (GNU grep) 2.12
gzip 1.5
Linux version 3.5.0-28-generic (buildd@aatxe) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #48-Ubuntu SMP Tue Apr 23 23:05:48 UTC 2013
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
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
gcc compilation OK

please tutor me from begining masbroh :D

druuna 05-03-2013 11:06 AM

Quote:

Originally Posted by potterius
oke masbroh

druuna will do just fine.

Quote:

Originally Posted by potterius
this is notification error on my terminal.
Code:

.
.
/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:510: undefined reference to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os):/mnt/lfs/sources/glibc-2.17/resolv/gethnamaddr.c:636: more undefined references to `__stack_chk_guard' follow
collect2: error: ld returned 1 exit status
.
.


You might have made a mistake in chapter 5.5. (GCC-4.7.2 - Pass 1).

The above mentioned error seems to relate to __stack_chk_guard. This quote from chapter 5.5:
Quote:

GCC doesn't detect stack protection correctly, which causes problems for the build of Glibc-2.17, so fix that by issuing the following command:
Code:

sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure

You haven't answered the question about really starting from scratch (you should!). Although all the chapters are important, the first few (binutils, gcc and glibc) especially so. Don't ignore errors or use workarounds that are not mentioned in the book. If you need to deviate from the book to make "it" work then something is wrong and this needs to be fixed immediately. Not doing so will get you into trouble.

spiky0011 05-03-2013 11:50 AM

Hi

Can you verifi that you have started from the begining again, It would be a good idea to start witha clean slate since fixing bash

potterius 05-03-2013 05:11 PM

Quote:

Originally Posted by druuna (Post 4944248)
druuna will do just fine.


You might have made a mistake in chapter 5.5. (GCC-4.7.2 - Pass 1).

The above mentioned error seems to relate to __stack_chk_guard. This quote from chapter 5.5:

You haven't answered the question about really starting from scratch (you should!). Although all the chapters are important, the first few (binutils, gcc and glibc) especially so. Don't ignore errors or use workarounds that are not mentioned in the book. If you need to deviate from the book to make "it" work then something is wrong and this needs to be fixed immediately. Not doing so will get you into trouble.

oke druuna, the problem is solved now. thanks a lot for tell me about my mistake :D
now I want continue the LFS. I hope don't meet error again hahahaha :D
thanks a lot again druuna.

Quote:

Originally Posted by spiky0011 (Post 4944284)
Hi

Can you verifi that you have started from the begining again, It would be a good idea to start witha clean slate since fixing bash

the problem is solved by druuna spiky. hehehe
thanks to your attention spiky :D


All times are GMT -5. The time now is 01:55 AM.