LinuxQuestions.org
Help answer threads with 0 replies.
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 01-30-2007, 08:31 AM   #1
betatoy
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
gcc problems in chapter 5


Hi all:

I finished chapter 5, after chroot I 'm trying use gcc compiles binutils but configure's result is 'gcc not works' then I use dummy.c test gcc, I got this:

/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crt1.o(.text+0xc): In function `_start':
init.c: undefined reference to `__libc_csu_fini'
/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crt1.o(.text+0x11):init.c: undefined reference to `__libc_csu_init'
collect2: ld returned 1 exit status

My host is suse 10.1(gcc 4.1.0 glibc-2.4)
basic programs in chaintools is gcc 4.1.1 glibc-2.4

Thank you for help

Last edited by betatoy; 01-30-2007 at 08:35 AM.
 
Old 01-30-2007, 01:47 PM   #2
Angeliqe
LQ Newbie
 
Registered: Jan 2007
Posts: 22

Rep: Reputation: 15
Make sure your linking is set up right.

cc dummy.c -Wl,--verbose &> dummy.log
grep 'SEARCH' dummy.log |sed 's|; |\n|g'

You should see something like...(directories are where your libraries are)

SEARCH_DIR("/tools/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")

If you don't see anything, do more dummy.log and see if there are errors in there.
__libc_csu_init points to glibc not being found most likely. Your SEARCH_DIR needs either /tools/lib or /tools/i686-pc-linux-gnu/lib.
 
  


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
gcc check error (in chapter 6) alinsoar Linux From Scratch 0 05-23-2005 04:58 AM
gcc chapter 6 time_dot_h problem vmlinuz101 Linux From Scratch 3 03-23-2005 03:44 PM
Chapter 5.13 GCC and C++ RobbieB Linux From Scratch 1 02-07-2005 07:29 PM
Building Gcc-core-3.3.1 Chapter 5 mullog Linux From Scratch 8 05-27-2004 12:49 PM
Chapter 5 - Installing GCC... Grim Reaper Linux From Scratch 22 12-31-2002 12:58 AM

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

All times are GMT -5. The time now is 09:50 PM.

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