Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
excuse me, Im from indonesia so I apologize coz my english very bad.
so when I install glibc 2.17 on my ubuntu, I haved make and the error come.
this is notification on my terminal
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).
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).
-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
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.
.
.
/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.
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
now I want continue the LFS. I hope don't meet error again hahahaha
thanks a lot again druuna.
Quote:
Originally Posted by spiky0011
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.