LFS 7.2 glibc-2.16.0产生错误 [英] LFS 7.2 glibc-2.16.0 make error

查看:122
本文介绍了LFS 7.2 glibc-2.16.0产生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个LFS系统(请参阅LFS 7.2)

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

在构建glibc-2.16.0时出现此错误:

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$ 

我将libgcc_s文件放在三个不同的位置:

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

我尝试覆盖LDFLAGS变量,但没有成功. 谁能帮我解决这个问题.还是我错过了什么?我不知道. 请帮助大家,

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,

我的主机系统是Fedora 17.

My host system is Fedora 17.

推荐答案

您需要设置LD_LIBRARY_PATH变量. LD_LIBRARY_PATH是用冒号分隔的一组目录,应在标准目录集之前首先搜索库. LDFLAGS将包含传递给链接器的选项.

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.

可能的问题是LD_LIBRARY_PATH中没有/usr/lib/gcc/i686-redhat-linux/4.7.0.除非您在LD_LIBRARY_PATH中有指向其中之一的符号链接libgcc_s.so,否则不得选择/usr/lib/中提到的其他两个库.

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.

这篇关于LFS 7.2 glibc-2.16.0产生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆