LFS 7.2 glibc-2.16.0 make error

∥☆過路亽.° 提交于 2019-12-13 21:53:23

问题


I'm building an LFS system ( refering to LFS 7.2 )

I got this make error while building glibc-2.16.0:

/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
make[2]: *** [/mnt/lfs/sources/glibc-build/iconv/iconvconfig] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0/iconv'
make[1]: *** [iconv/others] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0'
make: *** [all] Error 2
lfs:/mnt/lfs/sources/glibc-build$ 

I located the libgcc_s file in three different places:

/usr/lib/libgcc_s-4.7.0-20120507.so.1
/usr/lib/libgcc_s.so.1
/usr/lib/gcc/i686-redhat-linux/4.7.0/libgcc_s.so

I tried overiding the LDFLAGS variable but no success. Can any one please help me with this problem. Or am I missing something? I don't know. Please help guys,

My host system is Fedora 17.


回答1:


You need to set the LD_LIBRARY_PATH variable. LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories. LDFLAGS would contain options to pass to the linker.

The likely problem is that you don't have /usr/lib/gcc/i686-redhat-linux/4.7.0 in the LD_LIBRARY_PATH. The other two libraries mentioned in /usr/lib/ shall not be picked unless you have a symlink libgcc_s.so in your LD_LIBRARY_PATH that points to one of those.



来源:https://stackoverflow.com/questions/15928925/lfs-7-2-glibc-2-16-0-make-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!