Hi Prabhu,

Looks like your compiler (linker actually) cannot find the 'gcc_eh'
library:
  > cannot find -lgcc_eh collect2:error: ld returned 1 exit status

This library isn't set up when doing the GCC build, so it needs to be
linked up, with:
  ln -sv libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name |  \
     sed 's/libgcc/&_eh/'`

In the book this is the last step of building GCC, to quote:

Using --disable-shared means that the libgcc_eh.a file isn't created and
installed. The Glibc package depends on this library as it uses -lgcc_eh
within its build system. This dependency can be satisfied by creating a
symlink to libgcc.a, since that file will end up containing the objects
normally contained in libgcc_eh.a: 


Hope that helps,
Michael


On Fri, 2012-12-14 at 16:58 +0530, Prabhu wrote:
> Hi 
> 
> 
> I successfully compiled Binutils, GCC and LINUX API, while doing
> "make" for Glibc I'm getting this error 
> 
> 
> /mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.7.2/../../../../i686-lfs-linux-gnu/bin/ld:
> cannot find -lgcc_eh collect2:error: ld returned 1 exit status 
> make[2]: *** [/mnt/lfs/sources/glibc-build/elf/sln] Error 1
> make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0/elf' 
> make[1]: *** [elf/others] Error 2
> make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0'
> make: *** [all] Error 2 
> 
> Could someone assist me to resolve this, 
> 
> 
> With Regards...
>         PRABHU :)
> 
> 

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to