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

Bruce Dubbs bruce.dubbs at gmail.com
Thu May 27 12:37:53 PDT 2010

Paul Rogers wrote:

> OK, I did that. It paused about one
> second, then returned a command prompt.  No console messages at all.
> Ummm, waita minute!  (I don't compile anything unless I'm installing
> a package--I finished being a programmer over 25 years ago.)  I guess
> that means it worked, eh?  


> So now go back to my build script and
> pick it up again with make and see if it will complete?  


> Meaning my glibc will have this one stack busting flaw forever?

No, not a flaw, but without a feature.  It means that there is a 
mismatch in your system between the kernel and the (upstream) glibc 
build system.   Something is being detected when it shouldn't be (or 
vice versa).

Since you are using a fairly old kernel, the problem is really yours. 
The only way we would be able to get anyone to pay attention is is we 
were using a recent system to do the build.

On my reference build I have

gcc nscd.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline 
-Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes 
-DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector 
-I../include -I/sources/glibc-build/nscd -I/sources/glibc-build 
-I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread 
-I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu 
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet 
-I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv 
-I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../sysdeps/unix 
-I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 
-I../sysdeps/x86_64 -I../sysdeps/wordsize-64 
-I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 
-I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio 
-I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h 
-DNOT_IN_libc=1    -o /sources/glibc-build/nscd/nscd.o -MD -MP -MF 
/sources/glibc-build/nscd/nscd.o.dt -MT /sources/glibc-build/nscd/nscd.o

Without error.

As I said earlier, I don't know why this problem appears to be triggered 
on some systems and not others.

Another suggestion would be to download jhalfs and build LFS using that.
http://www.linuxfromscratch.org/alfs/.  Failure at the same point that 
you are getting now would rule out errors earlier in the build.

   -- Bruce

More information about the lfs-support mailing list