LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Glibc 2.7 Build Error "ld: cannot find -lgcc" (https://www.linuxquestions.org/questions/linux-from-scratch-13/glibc-2-7-build-error-ld-cannot-find-lgcc-657560/)

binzyw 07-22-2008 08:39 PM

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

weibullguy 07-22-2008 10:16 PM

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?

srsblue 03-18-2009 12:45 PM

Glibc 2.7 Build Error "ld: cannot find -lgcc
 
Hi,
Did you get solution for this problem? Kindly share the information
Regards
Ram

daniel zhao 04-10-2009 09:46 AM

hi,

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

Thanks,
Daniel

ubuntudude12 12-24-2011 01:33 PM

Hi,

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

druuna 12-24-2011 01:47 PM

@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.

manoj7410 06-24-2012 10:40 PM

getting same error.
 
Quote:

Originally Posted by ubuntudude12 (Post 4557722)
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

spiky0011 06-25-2012 02:39 AM

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

druuna 06-25-2012 02:51 AM

Quote:

Originally Posted by manoj7410 (Post 4710983)
Please, let me know if you have got the solution to this..

Yes, s/he did: http://www.linuxquestions.org/questi...-error-920382/


All times are GMT -5. The time now is 09:43 AM.