LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-22-2008, 08:39 PM   #1
binzyw
LQ Newbie
 
Registered: Jun 2006
Location: Wisconsin
Posts: 1

Rep: Reputation: 0
Glibc 2.7 Build Error "ld: cannot find -lgcc"


Hello,

I'm taking my first stab at Linux from scratch and trying to ease into cross compiling by using the same platform (x86_64) for both my target and host. I have been able to configure the 2.6.25.6 kernel headers, build binutils 2.18, and get a "boot" version of the gcc c compiler. I'm now trying to build glibc 2.7 and getting the following error:

a - login/setutxent.os
a - login/getutxent.os
a - login/endutxent.os
a - login/getutxid.os
a - login/getutxline.os
a - login/pututxline.os
a - login/utmpxname.os
a - login/updwtmpx.os
a - login/getutmpx.os
a - login/getutmp.os
a - elf/dl-iteratephdr.os
a - elf/dl-addr.os
a - elf/dl-profstub.os
a - elf/dl-libc.os
a - elf/dl-sym.os
a - elf/dl-tsd.os
a - elf/dl-vdso.os
: /home/alex/mythtv-project/build-tools/build-glibc/libc_pic.a
x86_64-linux-gcc -nostdlib -nostartfiles -r -o /home/alex/mythtv-project/build-tools/build-glibc/elf/librtld.map.o '-Wl,-(' /home/alex/mythtv-project/build-tools/build-glibc/elf/dl-allobjs.os /home/alex/mythtv-project/build-tools/build-glibc/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/home/alex/mythtv-project/build-tools/build-glibc/elf/librtld.mapT
/home/alex/mythtv-project/tools/lib/gcc/x86_64-linux/4.3.0/../../../../x86_64-linux/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
make[2]: *** [/home/alex/mythtv-project/build-tools/build-glibc/elf/librtld.map] Error 1
make[2]: Leaving directory `/home/alex/mythtv-project/build-tools/glibc-2.7/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/home/alex/mythtv-project/build-tools/glibc-2.7'
make: *** [all] Error 2

-Thanks

Last edited by binzyw; 07-22-2008 at 08:43 PM. Reason: changing notifications
 
Old 07-22-2008, 10:16 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,721
Blog Entries: 1

Rep: Reputation: 222Reputation: 222Reputation: 222
If you're building on or for an x86_64 platform, I would recommend Cross Linux from Scratch (multilib) --> http://trac.cross-lfs.org/. The development version of the book is stable for x86_64 right now; other architectures aren't yet.

Since you're not following the instructions as written in the LFS book, it's difficult to say what your actual problem is. How have you deviated from the instructions other than what is obvious from what you have posted?
 
Old 03-18-2009, 12:45 PM   #3
srsblue
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Glibc 2.7 Build Error "ld: cannot find -lgcc

Hi,
Did you get solution for this problem? Kindly share the information
Regards
Ram
 
Old 04-10-2009, 09:46 AM   #4
daniel zhao
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
hi,

Have you solved this problem? I got the same issue when I build glibc. Appreciate for any suggestions.

Thanks,
Daniel
 
Old 12-24-2011, 01:33 PM   #5
ubuntudude12
LQ Newbie
 
Registered: Dec 2011
Posts: 20

Rep: Reputation: Disabled
Hi,

I am having the same problem with Glibc, only I am using i686, not x86_64.
-Aaron
 
Old 12-24-2011, 01:47 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
@ubuntudude12:

This thread is 3.5 years old and LFS has changed a lot since back then.

Please start a new thread and give us your specific information:
- LFS version you are trying to build,
- the host you are using (is it compliant?),
- the chapter you have trouble building,
- the error shown (and at least 5 to 10 lines before the error),
- anything that you might think is relevant.

Hope this helps.
 
Old 06-24-2012, 10:40 PM   #7
manoj7410
Member
 
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40

Rep: Reputation: Disabled
Question getting same error.

Quote:
Originally Posted by ubuntudude12 View Post
Hi,

I am having the same problem with Glibc, only I am using i686, not x86_64.
-Aaron
hi...

I am facing the same problem in different forms, Forms are:
1. -lgcc not found
2. -lgcc_s not found
3. -lc not found
4. linker is not configured to reach sysroot.

All the time I execute a file.. one of the following errors will occur.

.
.
Please, let me know if you have got the solution to this..

Thanks

Manoj
 
Old 06-25-2012, 02:39 AM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi as mentioned above, can you start a new thread and details of host and the ouput of version-check, Also more details on what you are following which book
 
Old 06-25-2012, 02:51 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by manoj7410 View Post
Please, let me know if you have got the solution to this..
Yes, s/he did: http://www.linuxquestions.org/questi...-error-920382/
 
  


Reply

Tags
crosscompile, glibc, ld


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Ubuntu can't build, I get "cannot find -lGL" error xmrkite Linux - Software 6 05-18-2008 03:26 PM
/tools/bin/ld: cannot find -lstdc++ -- Error in " make check " of Glibc lfs_rocks Linux From Scratch 1 02-15-2008 09:23 AM
initial build of gcc: "cannot find -lc" xlq Linux From Scratch 5 06-03-2007 08:40 AM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 01:57 PM
LFS 6.0 error: glibc fails check with "g++: command not found" peristaltic Linux From Scratch 1 03-15-2005 07:52 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration