LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   complete glibc compilation error (http://www.linuxquestions.org/questions/linux-from-scratch-13/complete-glibc-compilation-error-416786/)

newcomer4 02-18-2006 07:03 AM

complete glibc compilation error
 
I have successfully built binutils,static gcc,glibc headers.
Now when I am building complete glibc , I am getting an error.
I searched google and other linux sites., but I couldn't get any solutions for this...help me

To build
BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" ../glibc-2.3.5/configure --prefix=/tools --host=${LFS_TARGET} --build=${LFS_HOST} --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.11.3 --with-__thread --with-binutils=/cross-tools/bin --with-headers=/tools/include --cache-file=config.cache

To compile
make

Here is the error:
.......
......
.......
i686-pc-linux-gnu-gcc ../sysdeps/unix/sysv/linux/stack_protector.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mpreferred-stack-boundary=4 -I../include -I. -I/mnt/lfs/sources/glibc-build/csu -I.. -I../libio -I../nptl -I/mnt/lfs/sources/glibc-build -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../nptl/sysdeps/i386/i686 -I../nptl/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -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 -nostdinc -isystem /mnt/lfs/cross-tools/bin/../lib/gcc/i686-pc-linux-gnu/4.0.0/include -isystem /tools/include -D_LIBC_REENTRANT -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -o /mnt/lfs/sources/glibc-build/csu/stack_protector.o -MD -MP -MF /mnt/lfs/sources/glibc-build/csu/stack_protector.o.dt -MT /mnt/lfs/sources/glibc-build/csu/stack_protector.o
../sysdeps/unix/sysv/linux/stack_protector.c:50:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:51:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:52:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:53:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:54:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:55:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:56:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:58:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:59:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c:60:10: error: #include expects "FILENAME" or <FILENAME>
../sysdeps/unix/sysv/linux/stack_protector.c: In function '__guard_setup':
../sysdeps/unix/sysv/linux/stack_protector.c:76: error: 'size_t' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:76: error: (Each undeclared identifier is reported only once
../sysdeps/unix/sysv/linux/stack_protector.c:76: error: for each function it appears in.)
../sysdeps/unix/sysv/linux/stack_protector.c:76: error: parse error before 'size'
../sysdeps/unix/sysv/linux/stack_protector.c:77: error: storage size of 'tv' isn't known
../sysdeps/unix/sysv/linux/stack_protector.c:84: warning: implicit declaration of function 'gettimeofday'
../sysdeps/unix/sysv/linux/stack_protector.c:84: error: 'amp' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:84: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:94: error: 'lt' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:94: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:97: error: 'size' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:97: warning: implicit declaration of function 'read'../sysdeps/unix/sysv/linux/stack_protector.c:97: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:97: warning: left-hand operand of comma expression has no effect
../sysdeps/unix/sysv/linux/stack_protector.c:97: error: parse error before ')' token
../sysdeps/unix/sysv/linux/stack_protector.c:98: warning: implicit declaration of function 'close'
../sysdeps/unix/sysv/linux/stack_protector.c: At top level:
../sysdeps/unix/sysv/linux/stack_protector.c:104: error: parse error before '}' token
../sysdeps/unix/sysv/linux/stack_protector.c: In function '__stack_smash_handler':
../sysdeps/unix/sysv/linux/stack_protector.c:111: error: storage size of 'sa' isn't known
../sysdeps/unix/sysv/linux/stack_protector.c:112: error: 'sigset_t' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:112: error: parse error before 'mask'
../sysdeps/unix/sysv/linux/stack_protector.c:114: warning: implicit declaration of function 'sigfillset'
../sysdeps/unix/sysv/linux/stack_protector.c:114: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:116: warning: implicit declaration of function 'sigdelset'
../sysdeps/unix/sysv/linux/stack_protector.c:116: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:117: warning: implicit declaration of function 'sigprocmask'
../sysdeps/unix/sysv/linux/stack_protector.c:117: error: 'SIG_BLOCK' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:117: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:120: warning: implicit declaration of function 'fprintf'
../sysdeps/unix/sysv/linux/stack_protector.c:120: warning: incompatible implicit declaration of built-in function 'fprintf'
../sysdeps/unix/sysv/linux/stack_protector.c:120: error: 'stderr' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:121: warning: implicit declaration of function 'syslog'
../sysdeps/unix/sysv/linux/stack_protector.c:121: error: 'LOG_INFO' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:124: warning: implicit declaration of function 'memset'
../sysdeps/unix/sysv/linux/stack_protector.c:124: warning: incompatible implicit declaration of built-in function 'memset'
../sysdeps/unix/sysv/linux/stack_protector.c:124: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:125: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:127: error: 'SIG_DFL' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:128: warning: implicit declaration of function 'sigaction'
../sysdeps/unix/sysv/linux/stack_protector.c:128: error: 'SIGABRT' undeclared (first use in this function)
../sysdeps/unix/sysv/linux/stack_protector.c:128: error: parse error before ';' token
../sysdeps/unix/sysv/linux/stack_protector.c:129: warning: implicit declaration of function 'kill'
../sysdeps/unix/sysv/linux/stack_protector.c:129: warning: implicit declaration of function 'getpid'
../sysdeps/unix/sysv/linux/stack_protector.c:130: warning: implicit declaration of function '_exit'
../sysdeps/unix/sysv/linux/stack_protector.c:130: warning: incompatible implicit declaration of built-in function '_exit'
../sysdeps/unix/sysv/linux/stack_protector.c:111: warning: unused variable 'sa'
../sysdeps/unix/sysv/linux/stack_protector.c: At top level:
../sysdeps/unix/sysv/linux/stack_protector.c:77: warning: unused variable 'tv'
make[2]: *** [/mnt/lfs/sources/glibc-build/csu/stack_protector.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.3.5/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.3.5'
make: *** [all] Error 2

shotokan 02-23-2006 02:29 AM

It looks like your not using the "Stable LFS" book that uses
Glibc-2.3.4 instead of Glibc-2.3.5 (which your using).
In fact I can't find any version of LFS or CLFS that uses it.

(I'd suggest using a stable version of LFS.)

FinalFantasy 02-23-2006 01:20 PM

Are you using Gentoo as the host? Or are you using HLFS book?

The host glibc has the Stack Smashing Protector patched, and your cross complier cannot find files for it as it is not installed. Use LiveCD instead or a distro which do not have glibc/gcc patched.


All times are GMT -5. The time now is 03:14 PM.