Difference between revisions of "Distcc"
From Bashlinux
(Created page with "=== Install distcc === In both Target(ARM) and Cross-Compiler(i686,x86_64) node setup distcc * Install distcc dependencies apt-get -y install subversion autoconf automake py...") |
(No difference)
|
Latest revision as of 08:15, 28 May 2016
Install distcc
In both Target(ARM) and Cross-Compiler(i686,x86_64) node setup distcc
- Install distcc dependencies
apt-get -y install subversion autoconf automake python python-dev binutils-dev libgtk2.0-dev
- Install libiberty
- Raspberry Pi (ARMv6l)
cd /usr/local/src wget http://archive.raspbian.org/raspbian/pool/main/libi/libiberty/libiberty-dev_20141014-1_armhf.deb dpkg -i libiberty-dev_20141014-1_armhf.deb
- Cubox-i (ARMv7l)
apt-get -y install libiberty-dev
- Configure distcc
cd /usr/src svn checkout http://distcc.googlecode.com/svn/trunk/ distcc cd distcc ./autogen.sh ./configure --with-gtk
- Remove warning for unused varieables
sed -i -e '/^WERROR_CFLAGS/s/=/= -Wno-unused-variable/' Makefile
- Build and install distcc from sources
make && sudo make install
On the Target (ARM)
- Masquerade the proper compilers
ln -s /usr/local/bin/distcc /usr/local/bin/gcc ln -s /usr/local/bin/distcc /usr/local/bin/cc ln -s /usr/local/bin/distcc /usr/local/bin/g++ ln -s /usr/local/bin/distcc /usr/local/bin/c++ ln -s /usr/local/bin/distcc /usr/local/bin/cpp
- Fix the path to search on /usr/local before anything else, usually this could be done in /etc/profile
- Setup distcc parameters at /etc/profile.d/distcc.sh
# The remote machines that will build things for you. # Don't put the ip of the Pi unless you want the Pi to take part to the build process. # The syntax is : "IP_ADDRESS/NUMBER_OF_JOBS IP_ADDRESS/NUMBER_OF_JOBS" ... # The documentation states that your should set the number of jobs per machine to # its number of processors. # jeremy-nicola.info advises to set it to twice as much. export DISTCC_HOSTS="192.168.0.5/4"
# When a job fails, distcc backs off the machine that failed for some time. # We want distcc to retry immediately export DISTCC_BACKOFF_PERIOD=0
# Time, in seconds, before distcc throws a DISTCC_IO_TIMEOUT error and tries to build the file # locally ( default hardcoded to 300 in version prior to 3.2 ) export DISTCC_IO_TIMEOUT=3000
# Don't try to build the file locally when a remote job failed export DISTCC_SKIP_LOCAL_RETRY=1
On the Cross-Compiler system (i686,x86_64)
- Start distccd service
export DISTCCD_PATH=/opt/crosstool-ng/tools/arm-bashlinux-linux-gnueabihf/arm-bashlinux-linux-gnueabihf/bin distccd --daemon --jobs 4 --allow 192.168.0.4 --verbose --log-stderr --no-detach