LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 4686|回复: 19

请问多台计算机怎样并行编译gentoo?

[复制链接]
发表于 2003-3-20 09:23:46 | 显示全部楼层 |阅读模式
有兄弟用过吗?能否详细说明一下.
发表于 2003-3-20 12:39:59 | 显示全部楼层
If you want to use distcc with the great Portage, simply edit your /etc/make.conf and add this lines:

CC="distcc"
CXX="distcc g++"
MAKEOPTS="-j4"
DISTCC_HOSTS="host1 host2 localhost"
 楼主| 发表于 2003-3-20 13:32:07 | 显示全部楼层
好,谢谢!我正在装gentoo,正好去试试!
发表于 2003-3-20 14:53:58 | 显示全部楼层
等你的好消息了,我最近也正准备用并行计算改写我们的lfs安装时间的记录呢,哈哈
 楼主| 发表于 2003-3-20 16:06:48 | 显示全部楼层
我用stage3编译gentoo,
修改了/etc/hosts文件,加入了
192.168.0.123 host1
修改了/etc/make.conf, 在CFLAGS=....下加上了

CC="distcc"
CXX="distcc g++"
MAKEOPTS="-j4"
DISTCC_HOSTS="localhost host1"

可是好像没有用,那台准备参与编译的计算机的CPU资源使用率一直非常低.
发表于 2003-3-20 17:36:11 | 显示全部楼层
ping host1 可以桶吧,应该是可以通。
然后你自己解压一个源码,configure 然后make一下,看看是不是在编译的信息里面有提到“waiting for other hosts result...."类似的东西,这样就是说明你的distcc正常工作了。
发表于 2003-3-21 17:04:54 | 显示全部楼层
如果你的机配置都一样的,那么你无必要每台机都去编译一次吧???
 楼主| 发表于 2003-3-21 21:34:41 | 显示全部楼层
这是我第一次安装gentoo,明天再试试看行不行。
发表于 2003-3-23 01:27:55 | 显示全部楼层
前面2个参数是设置编译程序
MAKEOPTS="-j4"
这个是优化什么的?
发表于 2003-3-23 02:36:44 | 显示全部楼层
-j jobs

            Specifies the number of jobs (commands) to run simultaneously.  If
            there  is  more than one -j option, the last one is effective.  If
            the -j option is given without an argument, make  will  not  limit
            the number of jobs that can run simultaneously.

一般这个参数设置在总共的cpu数量的两倍为宜
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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