LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
123
返回列表 发新帖
楼主: why_not

关于 live cd 求助

[复制链接]
发表于 2007-3-28 12:43:27 | 显示全部楼层
首先,在临时系统里做的(第一次) glibc 没有必要 check

第二,在目的系统里做的(第二次) glibc 就算有错也不一定有问题

。。。手册都有说明的,youbest 的《手把手 》是速成精读,但你不能不看手册!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-28 17:15:22 | 显示全部楼层
我遇到个问题

在5.7 调整工具炼时

我使用 lfs 账号 创建 specs 文件,提示我没有 权限

我切换到 root 用户创建的

不知道这样有没有问题

创建后生成的 specs 文件所在路径 为

/usr/lib/gcc/i486.../4.0.3/specs

我又切换会 lfs 账户, echo'main90{}' > test.c

我通过 readelf -l a.out

察看确定 已经使用 /mnt/lfs/tools/lib/ld-linux.so.2
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-28 17:46:02 | 显示全部楼层
第 2 遍 gcc 过不去了

checking whether the c compile works ... configure:error :can not run c compiled programs

if you meant to cross compile ,use '--host'

see 'config.log'  for details

Make : [configure-target-libstdc++-v3] Error 1

根据提示 ,让我察看 conif.log

里面有几个错误

configure:1976: checking whether gcc accepts -g
configure:2043: checking for gnatbind
configure:2108: checking whether compiler driver understands Ada
configure:2141: checking how to compare bootstrapped objects
configure:2214: checking for correct version of gmp.h
configure:2227: gcc -c -g -O2 conftest.c 1>&5
configure:2217:17: gmp.h: No such file or directory
configure: In function `main':
configure:2221: error: `choke' undeclared (first use in this function)
configure:2221: error: (Each undeclared identifier is reported only once
configure:2221: error: for each function it appears in.)
configure:2221: error: parse error before "me"
configure: failed program was:
#line 2216 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {

#if __GNU_MP_VERSION < 3
choke me
#endif

; return 0; }


我打算吧哪个代码注释掉
回复 支持 反对

使用道具 举报

发表于 2007-3-28 20:31:29 | 显示全部楼层
多数是调整工具链的问题了,建议你重来
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-29 10:16:30 | 显示全部楼层
en

重做问提到是不大

我发现 6.2 的手册好像有问题
5.3.1

安装软件包:

make install接下来为后面"调整工具链"步骤准备连接器:

make -C ld clean
make -C ld LIB_PATH=/tools/lib
cp -v ld/ld-new /tools/bin

make 参数的含义:

-C ld clean

告诉 make 程序删除所有 ld 子目录中编译生成的文件。

-C ld LIB_PATH=/tools/lib
----------------------------------
问题是
make -C ld clean

已经将  ld 子目录中编译生成的文件 删除

后面的 cp -v ld/ld-new /tools/bin

会失败,因为 ld-new 已经被删除了

是不是应该先 cp 然后再 make -C ld clean
回复 支持 反对

使用道具 举报

发表于 2007-3-29 10:46:18 | 显示全部楼层
Post by why_not
en

重做问提到是不大

我发现 6.2 的手册好像有问题
5.3.1

安装软件包:

make install接下来为后面"调整工具链"步骤准备连接器:

make -C ld clean
make -C ld LIB_PATH=/tools/lib
cp -v ld/ld-new /tools/bin

make 参数的含义:

-C ld clean

告诉 make 程序删除所有 ld 子目录中编译生成的文件。

-C ld LIB_PATH=/tools/lib
----------------------------------
问题是
make -C ld clean

已经将  ld 子目录中编译生成的文件 删除

后面的 cp -v ld/ld-new /tools/bin

会失败,因为 ld-new 已经被删除了

是不是应该先 cp 然后再 make -C ld clean


make -C ld clean     *清理ld目录下所有编译生成的文件
make -C ld LIB_PATH=/tools/lib        *以LIB_PATH=/tools/lib为参数重新编译
cp -v ld/ld-new /tools/bin    *将重新编译的文件复制至/tools/bin
没有什么问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-29 11:26:44 | 显示全部楼层
make -C ld clean *清理ld目录下所有编译生成的文件
make -C ld LIB_PATH=/tools/lib *以LIB_PATH=/tools/lib为参数重新编译
cp -v ld/ld-new /tools/bin *将重新编译的文件复制至/tools/bin
没有什么问题

-------------------
o

是这样啊,谢谢

那我
cp -v ld/ld-new /tools/bin
make -C ld clean
make -C ld LIB_PATH=/tools/lib

然后继续后面的动作,会不会有什么影响
回复 支持 反对

使用道具 举报

发表于 2007-3-29 11:47:32 | 显示全部楼层
有影响,如果先行复制,那么
make -C ld clean
make -C ld LIB_PATH=/tools/lib
这两条语句的执行就没有意义了,并且复制过去的工具链也是未经调整的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-29 18:27:48 | 显示全部楼层
恩,谢谢

又有新的问题

我在 t41 上的 虚拟击上跑

cpu 为 驯驰

是不是要调整 libc-header 为 i686 阿

我在6.9. Glibc-2.3.6

configure 就出错了

checking for suffix of object files ...  configure : error : can not compute suffix of object files: can not compile

察看 config.log
gcc : installation problem,can not exec 'tools/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/as' : no such file or directiory

但是我跟进 “/tools/...../bin/as” 看到as 存在, 而且我敲击的 也是 config.log 中的路径,是存在的,as 也有可执行权限
回复 支持 反对

使用道具 举报

发表于 2007-3-29 19:08:50 | 显示全部楼层
手册没有教人去动 libc-headers 吧!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表