Raspberry Pi Gentoo Distcc Setup

From JMK Wiki
Jump to navigation Jump to search

server

get distcc

emerge -av sys-devel/distcc

/etc/conf.d/distccd

DISTCCD_OPTS="${DISTCCD_OPTS} --log-level info --log-file /var/log/distccd/distcc.log"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24"

create log dir

mkdir /var/log/distccd
chown -R distcc:daemon /var/log/distccd
rc-update add distccd
rc-config start distccd

monitor process

tail -f /var/log/distccd/distcc.log

client

emerge -av sys-devel/distcc

/etc/distcc/hosts

192.168.0.20

/etc/portage/make.conf

FEATURES="distcc"

/usr/lib/distcc/bin/armv6j-hardfloat-linux-gnueabi-wrapper

#!/bin/bash
exec /usr/lib/distcc/bin/armv6j-hardfloat-linux-gnueabi-g${0:$[-2]} "$@"

make it executable

chmod a+x /usr/lib/distcc/bin/armv6j-hardfloat-linux-gnueabi-wrapper

check symlink

cd /usr/lib/distcc/bin
ls -l

result

lrwxrwxrwx 1 root root 15 Nov 28 23:36 armv6j-hardfloat-linux-gnueabi-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Nov 28 23:36 armv6j-hardfloat-linux-gnueabi-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Nov 28 23:36 armv6j-hardfloat-linux-gnueabi-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 86 Nov 29 00:37 armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 15 Nov 28 23:36 c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Nov 28 23:36 cc -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Nov 28 23:36 g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Nov 28 23:36 gcc -> /usr/bin/distcc

recreate symlinks

rm c++ cc g++ gcc
ln -s armv6j-hardfloat-linux-gnueabi-wrapper cc
ln -s armv6j-hardfloat-linux-gnueabi-wrapper gcc
ln -s armv6j-hardfloat-linux-gnueabi-wrapper c++
ln -s armv6j-hardfloat-linux-gnueabi-wrapper g++
ls -l

result

lrwxrwxrwx 1 root root 15 Nov 28 23:36 armv6j-hardfloat-linux-gnueabi-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Nov 28 23:36 armv6j-hardfloat-linux-gnueabi-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Nov 28 23:36 armv6j-hardfloat-linux-gnueabi-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 86 Nov 29 00:37 armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Nov 29 00:39 c++ -> armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Nov 29 00:39 cc -> armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Nov 29 00:39 g++ -> armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Nov 29 00:39 gcc -> armv6j-hardfloat-linux-gnueabi-wrapper

distcc log

distcc-config --set-log /var/log/portage/distcc.log
source /etc/profile

emerge something

check the log

tail -f /var/log/portage/distcc.log