LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 10-09-2015, 10:19 PM   #1
worsel
Member
 
Registered: Feb 2008
Location: Washington State, USA
Distribution: Slackware 14.2, Slackware-from-Scratch
Posts: 241

Rep: Reputation: 45
LFS-7.8 Ch5 glibc error


When trying to compile glibc-2.22 in ch. 5, I get the errors below.
Base system Slackware64-14.1, all patches up to date.
Computer: Linux nadrek 3.10.17 #2 SMP Fri Feb 14 16:45:28 CST 2014 x86_64 AMD Athlon(tm) II X2 \
245 Processor AuthenticAMD GNU/Linux


Quote:
x86_64-lfs-linux-gnu-gcc -shared -static-libgcc -Wl,-O1
-Wl,-z,defs -Wl,-dynamic-linker=/tools/lib/ld-linux-x86-64.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/mathvec -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/mathvec:/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
-Wl,--start-group /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 -Wl,--end-group
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os):
In function `getanswer':
/mnt/lfs/sources/glibc-2.22/resolv/gethnamaddr.c:185: undefined reference
to `__stack_chk_guard'
/mnt/lfs/sources/glibc-2.22/resolv/gethnamaddr.c:483: 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.22/resolv/gethnamaddr.c:510: undefined reference
to `__stack_chk_guard'
/mnt/lfs/sources/glibc-2.22/resolv/gethnamaddr.c:636: 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.22/resolv/gethnamaddr.c:644: undefined reference
to `__stack_chk_guard'
/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a(gethnamaddr.os):/mnt/lfs/sources/glibc-2.22/resolv/gethnamaddr.c:783:
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.22/resolv'
make[1]: *** [resolv/others] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.22'
make: *** [all] Error 2
Perhaps I'm reading it wrong but none of the files in the resolve directory seem to
reference __stack_chk_guard. A google search turned up nothing, but ch 5 cannot be
built until I get past this. As a consequence of this error gcc does not build.

Oh, and I did run the version-chk.sh script from the preface. It came said my system
should be adequate.

I would appreciate any help.

TIA,

Nadrek
 
Old 10-10-2015, 05:58 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Nice to see a E.E.Doc Smith fan, we are few and far between these days
 
Old 10-14-2015, 07:56 AM   #3
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
Doing a search on that error, someone else who was going through LFS appears to have forgotten to run some of the commands required when configuring gcc earlier in the chapter, I would look into this being your potential problem; seeing if you did miss any commands during a copy/paste.
 
Old 10-15-2015, 10:40 PM   #4
worsel
Member
 
Registered: Feb 2008
Location: Washington State, USA
Distribution: Slackware 14.2, Slackware-from-Scratch
Posts: 241

Original Poster
Rep: Reputation: 45
LFS-7.8 Ch5 glibc error

Well, I admit to some skepticism, Basica. I had been over the scripts until
I was going blind. But I went back to the book and cut and paste everything
again and now it compiles. Thanks!

Nadrek
 
Old 10-15-2015, 10:45 PM   #5
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
Glad it's working for you now. It's very easy to do by the way, on one occasion I had an issue because when I was copying and pasting text, I missed the first letter of the bunch of commands I copied and paste. This is something easy to miss when you get a wall of text pop up after you've hit enter. Now whenever I do a build, I am far more paranoid with checking and rechecking what I've pasted in
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] error while compiling glibc-2.20 - LFS 7.6 vitorcarvalhoml Linux From Scratch 4 12-11-2014 08:01 PM
Error compiling Glibc-2.12.1 in LFS 6.7 poisoning Linux From Scratch 1 05-22-2011 05:11 AM
LFS 6 ch5.9 adjusting the toolchain failed sanity check totty79 Linux From Scratch 1 03-21-2005 02:58 PM
glibc-2.3.3-lfs-5.1 error Zamochit Linux From Scratch 8 01-13-2005 06:00 AM
gcc make error in ch5.5 of LFS 6.0 Barnette Linux From Scratch 5 01-03-2005 11:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration