LFS-6.6, Stage2, glibc, nscd.c:442

2010-05-31 Thread x2164


  Hi Paul,


  You got a lot more out of them on this problem then i did.

  I think it just boils down to the fact that they've put all this
  time and effort into producing the, always, latest version of the
  book AND it works for them.  Bringing the book to usability must
  be time consuming enough, doing the support work just sucks the
  remaining life out of them.

  Most of the posters with problems do seem to have,
  for whatever reason, strayed from the path of righteousness
  and not followed the book closely enough.  After hearing
  their confessions the priests, i'm sorry i meant support staff,
  tell the sinner, oops, i meant poster with the problem, to
  utter the prayer "rm -rf /mnt/lfs/*" at their command prompt
  and that their penance is to start the book from the beginning.
  And for some, who return to the beginning, the error resolves
  itself and they compile their way to the end of the book and
  the booting of their spanking new lfs Bk.6.6 system.

  But you sir are not of that "some".

  You are of the "undefined reference to '__stack_chk_guard'".  Souls
  who exist in the darkness at the edge of the circle of light cast
  by the book.  What chain of bonds in the darkness keep us from
  entering the light? We cannot see.  We call, post actually, for help
  but the priests say our build environments are not worthy of the book.

  So you wait, without a saving answer.  You hear faint whispers on the
  wind, (threads for the last three months inclusive), of
  "libc_cv_ssp='no'", shout out to Szabolcs there, and "-lssp".

  Well, sir, i was like you.  "undefined reference to'__stack_chk_guard'"
  was the mark of my sin, and the priests
  also said unto me that my build environment was not worthy of
  the book.
  
  But i read the book and took comfort in its words and knew that in it
  lay the true path to its meaning.  And no truer words then "My distro,
  my rules" did i need to see.

  So i uttered the prayer "-lssp" on the link line for 'nscd' and it
  was brought forth and with it its mother, Glibc-2.11.1 sprang fully
  formed.  I told the priests what i had done.  They're cries of
  blasphemy rang on my monitor, how dare i stray from the book.
  I pleaded that 'make check' had generated only the expected
  error but all they could say was that hence forth my code could
  not be trusted.  A truly crushing blow.

  Again i turned to the book for comfort, and, step by step, package
  by package i moved toward the light till that day that all
  readers of the book seek.

  Yes, the day i booted my new LFS Bk.6.6 system with its
  Linux-2.6.32.8 kernel.

  And yes, it wears the mark of my "-lssp" prayer that it might exist
  but it wears that mark as a badge of honor.

  But of course there is the rub.  Maybe its true that we shouldn't
  get all that we pray for.

  In my arrogance i drank of the ALFS.

  Like a siren's song the jhalfs scripts drew me in.  Only teasing me
  with a few trials to test my love before providing, with barely a
  touch of the keyboard, a new bootable LFS system with a
  blfs_root directory.

  And BLFS hell is where i now reside.  If only i'd known.

  Damn you XOrg_7 package and your infinite loop segfault!

  So Paul, what i really need to say is "that if it breaks, you get to
  keep the pieces" but maybe, more important, "if it doesn't break,
  you still get to keep the pieces".

  If you need help let me know.


  pete
  x2164

  P.S.
  I would like to express my
  sincerest thanks to all those
  who have contributed to the
  development of linuxfromscratch
  project/community.
 
  It is evident from the overall
  thread that everyones efforts are
  directed at trying to 
  make linuxfromscratch more
  perfect.

  And that is the goal.

  My hope is that i too, someday,
  can contribute in someway, that
  will be worthy of inclusion. 


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: Bk6.6Ch6.9 glibc `__stack_chk_guard' work around.

2010-03-29 Thread x2164

- Original Message -
From: Bruce Dubbs 
To: LFS Support List 
Sent: Tue, 30 Mar 2010 00:25:37 -0400 (EDT)
Subject: Re: Bk6.6Ch6.9 glibc  `__stack_chk_guard' work around.

x2...@lycos.com wrote:
>  Hi,
> 
>  This is the work around i'm using.
> 
   .
   .
   .
> 
>  At this point i resumed compiling at Bk.6.6_Ch.6.17, Sed,
>  and have so far completed through Ch.6.59, Vim, without
>  errors.

>This indicates to me that you made an error in Chapter 5.  The error was 
>probably in either gcc or glibc.
>
>When we prepare for a LFS release, we have automated scripts that 
>extract the instructions from the book and build the entire system. 
>Your work around is not necessary if all the instructions are followed 
>properly.
>
>Your comment is that you "pretty much" followed the book.  Either you 
>made purposeful changes or missed an instruction.   If you made *any* 
>intentional deviations, please elaborate them.
>
>In either case, I wouldn't trust your system.  I recommend starting 
>over.  Of course, it's your distro, so you make the rules for your system.

>   -- Bruce
-- 

 Bruce,

 I threw in the "pretty much" this time as a freebie given the
 controversy it caused last time.

 Started Bk.6.5 just as Bk.6.6 was released.  Had gotten to Bk.6.5Ch.6.9
 and had to stop because of the `__stack_chk_guard' error.  Thought i
 could have made an error so i 'rm -rf /mnt/lfs/*' and re-started using
 then newly released Bk.6.6 being especially careful to follow the 
 instructions to the letter.  Of course as you know from my previous post
 i encountered the `__stack_chk_guard' error again in Bk.6.6Ch.6.9.

 I think your right about the error being in gcc.  The libssp and gcc
 were both installed at the same time, both have same time stamp.  Why
 gcc couldn't find it, well, i don't know.  The -fstack-portector option
 was so suppose to pull in libssp, at least that was my understanding,
 so that -lssp wasn't needed for final linking line.

 Since i don't have the scripts to automate the complete build but instead
 have to do it manually from the beginning, which is kinda time consuming,
 re-starting to find the source of the error isn't feasible for me.

 Given that this error, `__stack_chk_guard', only cropped up for the
 production of the 'nscd' executable with the 2nd pass gcc, and, not
 at all with the Ch.6.16 gcc, i feel confident enough, especially with
 both resulting glibcs' passing their test suites, to use the system
 as it is now.

 And if it falls apart and bites me on the a** then i'll have afforded
 you one of the supreme pleasures in life.  The right to tell me
 you told me so. :-)

 I don't mean this to be critical, but, since your using automating 
 scripts to generate your version of LFS it comes across as being
 kinda of hypocritical to say to we who do this manually that we
 must suffer from the beginning to obtain our pure and worthy distro
 of LFS.  I'm not even going to try and point out that the scripts
 are adding their own unknown variability to difference between manual
 and automated production.

 Time to sleep.  Won't be able to check for responses till after 9 EDT.

 Night.


 pete x2164



-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Bk6.6Ch6.9 glibc `__stack_chk_guard' work around.

2010-03-29 Thread x2164

 Hi,

 This is the work around i'm using.

 I don't know if it will help on x86_64.

 Assuming your compilation stopped at the line 'linking'
 object files to produce 'nscd':

  Paste up the 'linking' line that failed but
  include -lssp as an option.  I'll add the line
  i used at end of this letter. Its editor
  friendly, you'll probably need to adjust the
  directory paths to coincide with your build
  directory.  I put it in a file and executed
  it as a script in the glibc-build/nscd directory.

  For me, this executed correctly and left 'nscd'
  executable in glibc-build/nscd.

  Move up to glibc-build and re-started 'make'
  which finished compilation with no errors.

  Ran "make -k check 2>&1 | tee glibc-check-log"
  which produced only the 'posix/annexc' error.

  Dropped out of chroot and re-booted. While
  /mnt/lfs was still just a normal partition i
  backed it up.

  Performed mountings and re-entered chroot and
  installed the glibc-2.11.1 from Bk.6.6_Ch.6.9.


 After completing all the steps in Ch.6.9 i continued on.

 I followed the book pretty much to the letter.

 Once i completed Ch.6.16 with the install of Gcc-4.4.3
 i returned to Ch.6.9 to re-compile Glibc-2.11.1.

 This time Glibc-2.11.1 compiled to completion with no
 errors and check'ing resulted in only the 'posix/annexc'
 error.

 After again backing up /mnt/lfs i returned to chroot
 and installed this latest compilation of Glibc-2.11.1.

 At this point i resumed compiling at Bk.6.6_Ch.6.17, Sed,
 and have so far completed through Ch.6.59, Vim, without
 errors.

 Of course YMMV.


 pete x2164



 The linking line follows.***


gcc -pie -Wl,-O1 -nostdlib -nostartfiles  -lssp \
-o /scratch/glibc-build/nscd/nscd \
 -Wl,-dynamic-linker=/lib/ld-linux.so.2 \
  -Wl,-z,combreloc -Wl,-z,relro \
 -Wl,-z,now -Wl,--hash-style=both \
/scratch/glibc-build/csu/Scrt1.o \
 /scratch/glibc-build/csu/crti.o \
`gcc --print-file-name=crtbeginS.o` \
/scratch/glibc-build/nscd/nscd.o \
/scratch/glibc-build/nscd/connections.o \
/scratch/glibc-build/nscd/pwdcache.o \
 /scratch/glibc-build/nscd/getpwnam_r.o \
/scratch/glibc-build/nscd/getpwuid_r.o \
/scratch/glibc-build/nscd/grpcache.o \
/scratch/glibc-build/nscd/getgrnam_r.o \
/scratch/glibc-build/nscd/getgrgid_r.o \
/scratch/glibc-build/nscd/hstcache.o \
 /scratch/glibc-build/nscd/gethstbyad_r.o \
/scratch/glibc-build/nscd/gethstbynm3_r.o \
 /scratch/glibc-build/nscd/getsrvbynm_r.o \
/scratch/glibc-build/nscd/getsrvbypt_r.o \
 /scratch/glibc-build/nscd/servicescache.o \
/scratch/glibc-build/nscd/dbg_log.o \
 /scratch/glibc-build/nscd/nscd_conf.o \
/scratch/glibc-build/nscd/nscd_stat.o \
 /scratch/glibc-build/nscd/cache.o \
/scratch/glibc-build/nscd/mem.o \
 /scratch/glibc-build/nscd/nscd_setup_thread.o \
/scratch/glibc-build/nscd/xmalloc.o \
 /scratch/glibc-build/nscd/xstrdup.o \
/scratch/glibc-build/nscd/aicache.o \
 /scratch/glibc-build/nscd/initgrcache.o \
/scratch/glibc-build/nscd/gai.o \
 /scratch/glibc-build/nscd/res_hconf.o \
 /scratch/glibc-build/rt/librt.so \
 /scratch/glibc-build/nptl/libpthread_nonshared.a \
 /scratch/glibc-build/nptl/libpthread.so \
 /scratch/glibc-build/nis/libnsl.so \
-Wl,-rpath-link=/scratch/glibc-build:\
/scratch/glibc-build/math:/scratch/glibc-build/elf:\
/scratch/glibc-build/dlfcn:/scratch/glibc-build/nss:\
/scratch/glibc-build/nis:/scratch/glibc-build/rt:\
/scratch/glibc-build/resolv:\
/scratch/glibc-build/crypt:/scratch/glibc-build/nptl \
 /scratch/glibc-build/libc.so.6 \
 /scratch/glibc-build/libc_nonshared.a \
 -lgcc -Wl,--as-needed -lgcc_s \
 -Wl,--no-as-needed \
 `gcc --print-file-name=crtendS.o` \
 /scratch/glibc-build/csu/crtn.o



-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Bk6.6Ch6.9 glibc compile stopped with `__stack_chk_guard'

2010-03-25 Thread x2164

 Hi All,

 I've reached LFS Bk6.6 Ch6.9 "Glibc-2.11.1".

 I've followed the book pretty much to the letter.
 

 My variance from book 6.6 consist of:

  /mnt/lfs/source  -  source files downloaded into this directory.

  /mnt/lfs/scratch -  source files un-tar'ed and built in this
  directory.

  script files -  to reduce opps's while cutting and pasting
  lines to execute i placed them in script
  files in order to ensure correct transcription
  from the book.  I would then execute the
  script and verify that it did what it was
  suppose to.


 Compilation is on/for an Intel Pentium 4.


 Jerry's pastbin.com link is almost identical to the output
 i have of the error:

http://linuxfromscratch.pastebin.com/nyYhgsMq

  

 pete



-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Bk6.6Ch6.9 glibc compile stopped with `__stack_chk_guard'

2010-03-24 Thread x2164

 Hi All,

 I've reached LFS Bk6.6 Ch6.9 "Glibc-2.11.1".

 I've followed the book pretty much to the letter.

 When trying to compile Glibc-2.11.1, compilation stopped
 at the link line outputting 'nscd'.
 'make' was in the glibc-build/nscd directory.
 The error was:

  undefined reference to '__stack_chk_guard'

 'Jerry' posted a virtually identical output of 'make'
 at pastebin.com to the error output from 'make'
 that i am seeing when compilation stops.  His
 link at pastebin is:

 http://linuxfromscratch.pastebin.com/nyYhgsMq .

 Googling '__stack_chk_guard' led me to Jerry's
 pastebin post, above, and to two other links
 concerning compilation failures in the
 nscd code:

 http://sources.redhat.com/ml/libc-alpha/2005-07/msg00046.html

 and

 http://sources.redhat.com/ml/libc-alpha/2005-07/msg00048.html .


 From the above two links it seems that '__stack_chk_guard'
 is found in libssp.

 It seems that libssp is suppose to be pulled in by
 the gcc option '-fstack-protector' so that '-lssp'
 shouldn't be necessary on the link line.

 Following the procedure in link for msg00046.html above
 i too was able to link 'nscd' to production of executable 'nscd'
 by cutting and pasting-up of the failed linking line into
 a script file and adding '-lssp' to the line and executing
 the script in the glibc-build/nscd directory.  

 With 'nscd' now produced i returned to the glibc-build
 directory and re-executed 'make'.  The package
 compiled to completion.

 With compilation complete i ran 'make -k check...' which
 ran to completion with only one error. The error was
 expected.

 I have installed the tested glibc.

 Running 'ldd' on the installed 'nscd' executable:

 ldd /usr/sbin/nscd

linux-gate.so.1 =>  (0xb7fd2000)
libssp.so.0 => not found
librt.so.1 => /lib/librt.so.1 (0xb7fc8000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7faf000)
libnsl.so.1 => /lib/libnsl.so.1 (0xb7f97000)
libc.so.6 => /lib/libc.so.6 (0xb7e42000)
/lib/ld-linux.so.2 (0xb7fd3000)

 'libssp.so.0' is installed in  /tools/lib/libssp.so.0 and
 has the same installation time as /tools/bin/gcc.  All of
 the libssp* libs are installed in /tools/lib with the same
 installation time.

 Anyone got a grasp on this problem?



 pete x2164


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page