本文主要是介绍Using Distcc between Ubuntu Gentoo,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
distcc 是linux分布式编译工具,可以大大提高编译速度。
下面就是在两台机子上进行的distcc的配置,一台是gentoo,另一台是ubuntu
Section 1 - Setting up Distcc on gentoo.
a) Install distcc and distcc-config
Code:
emerge distcc emerge distcc-config
Code:
echo "sys-devel/distcc-config ~x86" >> /etc/portage/package.keywords
Code:
vi /etc/conf.d/distccd DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24"
Code:
distcc-config --set-hosts "192.168.0.77 192.168.0.36 192.168.0.10"
c) Configure gentoo
Code:
vi /etc/make.conf FEATURES="distcc"
Code:
/etc/init.d/distccd start
Code:
gcc -v
a) Install distcc
Code:
sudo apt-get install distcc
Code:
vi /etc/defaults/distcc STARTDISTCC="false" ALLOWEDNETS="192.168.0.0/24"
to
STARTDISTCC="true"
Change the allowednets network id to correspond with your local lan.
c) Check which version of gcc you are running
gcc -v
If you have the same version of gcc as your gentoo install, then you can simply run:
Code:
/etc/init.d/distcc start
d) Install required gcc and g++
Example, to install gcc 3.3
Code:
sudo apt-get install gcc-3.3 g++-3.3
From here on in, the version will be refered to $version, please substitute this with your version number of gcc
Code:
mkdir -p /usr/lib/distcc/$version <-------Make this ther version cd /usr/lib/distcc/$version ln -s /usr/bin/gcc-$version gcc ln -s /usr/bin/g++-$version g++ ln -s /usr/bin/cc cc ln -s /usr/bin/c++ c++
Code:
PATH="/usr/lib/distcc/$version:$PATH" export PATH
Code:
/etc/init.d/distcc start
这篇关于Using Distcc between Ubuntu Gentoo的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!