LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-18-2006, 06:03 AM   #1
newcomer4
LQ Newbie
 
Registered: Jan 2006
Posts: 21

Rep: Reputation: 15
Unhappy 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
 
Old 02-23-2006, 01:29 AM   #2
shotokan
Member
 
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204

Rep: Reputation: 30
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.)
 
Old 02-23-2006, 12:20 PM   #3
FinalFantasy
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 49

Rep: Reputation: Disabled
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.
 
  


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
libc.so error in glibc compilation newcomer4 Linux From Scratch 3 02-18-2006 04:23 AM
glibc compilation error newcomer4 Linux - Newbie 1 02-03-2006 02:53 PM
glibc compilation error newcomer4 Linux From Scratch 1 02-03-2006 05:02 AM
Glibc compilation error Krappy Linux From Scratch 0 05-03-2005 12:24 AM

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

All times are GMT -5. The time now is 11:16 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