LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: why_not

关于 live cd 求助

[复制链接]
 楼主| 发表于 2007-3-22 14:44:43 | 显示全部楼层
大牛
用 linux 9.0 做基础做把,像我这样的初学者,一般都是线装红帽的

刚刚又在 论坛里找到  有人问 svn, sysroot 区别

我现在是明白一些了

那个手把手中使用的 应该就是 sysroot 的方法吧

我看了 sysroot -0313 的 包,里面的源码版本,基本上和你文档中说的差不多

在 9.0 升级了内核后,应该可以做了把

呵呵

支持在 9.0 下出手册
回复 支持 反对

使用道具 举报

发表于 2007-3-22 14:59:11 | 显示全部楼层
别用RedHat9了,老了点,非要做更新一下.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-22 18:07:53 | 显示全部楼层


9.0 上软件版本确实低

我的 gcc 3.2 的

glibc -2.0 的好像

编译 gcc-4.1.2 用了将近 1 个小时 ,现在还没编译完成

我就是

./configuer

make

make install

不知道能不能把 gcc 升上去

:(
回复 支持 反对

使用道具 举报

发表于 2007-3-22 19:28:40 | 显示全部楼层
Post by why_not


9.0 上软件版本确实低

我的 gcc 3.2 的

glibc -2.0 的好像

编译 gcc-4.1.2 用了将近 1 个小时 ,现在还没编译完成

我就是

./configuer

make

make install

不知道能不能把 gcc 升上去

:(
这样肯定不正确,由 configure 开始就不对了,就是能编译,由於没有 bootstrap,出来的 API 也不对,请不要继续了!

编译的方法及系统有关的要求及依赖应參考 LFS 手册或 gcc 的文档
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-23 10:02:10 | 显示全部楼层
bash, version 2.05b.0(1)-release
Binutils: 版本 2.17
bzip2,  Version 1.0.2, 30-Dec-2001.
Coreutils:  4.5.3
diff (GNU diffutils) 2.8.1
GNU find version 4.1.7
GNU Awk 3.1.1
gcc (GCC) 4.1.2
GNU C Library stable release version 2.3.2,
grep (GNU grep) 2.5.1
gzip 1.3.3
Linux version 2.6.20.3 (gcc version 3.2.2
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
patch 2.5.4
GNU sed version 4.0.5
tar (GNU tar) 1.13.25

----------------------
上面是我的版本检查

对照网上的手册
Bash-2.05a

Binutils-2.12 (Versions greater than 2.16.1 are not recommended as they have not been tested)

Bzip2-1.0.2

Coreutils-5.0 (or Sh-Utils-2.0, Textutils-2.0, and Fileutils-4.1)

Diffutils-2.8

Findutils-4.1.20

Gawk-3.0

Gcc-2.95.3 (Versions greater than 4.0.3 are not recommended as they have not been tested)

Glibc-2.2.5 (Versions greater than 2.3.6 are not recommended as they have not been tested)

Grep-2.5

Gzip-1.2.4

Linux Kernel-2.6.x (having been compiled with GCC-3.0 or greater)

The reason for the kernel version requirement is that thread-local storage support in Binutils will not be built and the Native POSIX Threading Library (NPTL) test suite will segfault if the host's kernel isn't at least a 2.6.x version compiled with a 3.0 or later release of GCC.

If the host kernel is either earlier than 2.6.x, or it was not compiled using a GCC-3.0 (or later) compiler, you will have to replace the kernel with one adhering to the specifications. There are two methods you can take to solve this. First, see if your Linux vendor provides a 2.6 kernel package. If so, you may wish to install it. If your vendor doesn't offer a 2.6 kernel package, or you would prefer not to install it, then you can compile a 2.6 kernel yourself. Instructions for compiling the kernel and configuring the boot loader (assuming the host uses GRUB) are located in Chapter 8.

Make-3.79.1

Patch-2.5.4

Sed-3.0.2

Tar-1.14

-------------------------------
tar
coreutils
findutils

上面的 3 个软件本 低一点,但应该不影响 lfs 吧

我的 gcc 我自己也不知道是不是升级成功了
但是 gcc-v 显示的是 4.1.2的

我就是想让宿主的 gcc 版本升上来,然后再制作

不知道我的宿主现在是不是已经满足要求了
回复 支持 反对

使用道具 举报

发表于 2007-3-23 22:18:08 | 显示全部楼层
tar,coreutils 及 findutils 都不重要,最重要的是 toolchain、即 binutils,glibc 及 gcc

前面已说过了,你的 gcc-4.1.2 就算能通过编译,其 ABI 也不对,用 gcc-3.2 编译出来的软件是第一版的 ABI,而 gcc-3.4 以上的 gcc 则采用第二版的 ABI,两者并非完全兼容,因此编译 gcc-4.x 一定要 make bootstrap 强制编译过程中再自我编译,这样目的 gcc 就不会受上一版 gcc 影响了

另外,新版 binutils 提供的 assembler 及 linker 跟旧版是不兼容的,如不升级恐怕连新版内核也编译不了

Glibc 则是 Linux 系统的重磅炸弹,这个最好找新的来做,以免日升级困难!

说了这麽多,建议你找张 LFS 的 LiveCD 来做 host 好了,否则你要把整个系统大改装了,还不如真的去 Linux From Scratch
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-25 23:02:26 | 显示全部楼层
非常感谢 doom3d 的热心帮助

我先查查 abi 的相关信息

再接着我的问题 :)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-27 10:19:00 | 显示全部楼层
找到一偏文章,关于 预处理,编译,汇编,连接 的文章

理解的也不是特别深刻

我又下载了 Fedora Core 6 的 iso

没装 x-window ,内核是 2.16.18

gcc 是的 .4.1.1

我想 基于 fedora core 6 这个 环境作宿主,应该够了吧
回复 支持 反对

使用道具 举报

发表于 2007-3-27 10:24:38 | 显示全部楼层
FC 系列偶有成功,机率偏低,除非做 SVN 版,但对没有经验的新手又不能推荐做 SVN

干嘛不用 LFS 的 LiveCD 作 host?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-28 12:04:04 | 显示全部楼层
doom3d
我采纳你的建议了

我用 livecd 6.2.3 制作 lfs 了

编译 glibc 的时候除了一个小问题

 ../glibc-2.3.6/configure --prefix=/tools --disable-profile --enable-add-ons --enable-kernel=2.6.0 --with-binutils=/tools/bin --without-gd --with-headers=/tools/include --without-selinux --enable-static-nss


 ../glibc-2.3.6/configure --prefix=/tools --disable-profile --enable-add-ons --enable-kernel=2.6.0 --with-binutils=/tools/bin --without-gd --with-headers=/tools/include --without-selinux


我用 youbest 大牛 《功能单一,体积小巧》 中的 glibc 配置 后面多了一个  --enable-static-nss

然后编译,在最后 好像是 退出 elf 目录的时候 ,有个什么错误

然后我就把 glibc 源码和编译目录都删除,重新编译 glibc ,这次使用的 是 ,《手把手 》中的glibc 配置

直到最后顺利通过

然后我用 make -k check .

发现有一个错误。
make[2]:[/mnt/lfs/sources/build-glibc/posix/annexc.out] Error 1 (ignored)


不知道这个错误是不是有很大影响

先不管了
继续往后了
回复 支持 反对

使用道具 举报

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

本版积分规则

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