User Tools

Site Tools


system:distcc:cross

Cross Compiling With ''distcc''

Troubleshooting

The original guide seems not to work anymore. The problem is that the requested cross compiler is not found by distccd. The following workaround solves this issue: in /etc/init.d/distccd the PATH environment variable is altered before starting the daemon. This is the full command:

TMPDIR="${TMPDIR}" \
PATH="$(gcc-config --get-bin-path):${PATH}" \
/sbin/start-stop-daemon --start --quiet --startas ${DISTCCD_EXEC} \
--pidfile ${DISTCCD_PIDFILE} -- \
--pid-file ${DISTCCD_PIDFILE} -N
${DISTCCD_NICE} --user distcc \
${DISTCCD_OPTS}

the problem here is that gcc-config –get-bin-path only returns the search path for the currently active profile, not all available profiles (the cross compiler is a profile on it's own). So for every installed cross compiler gcc-config has to be called again given the correct profile number:

TMPDIR="${TMPDIR}" \
PATH="$(gcc-config --get-bin-path):$(gcc-config --get-bin-path 1):${PATH}" \
/sbin/start-stop-daemon --start --quiet --startas ${DISTCCD_EXEC} \
--pidfile ${DISTCCD_PIDFILE} -- \
--pid-file ${DISTCCD_PIDFILE} -N
${DISTCCD_NICE} --user distcc \
${DISTCCD_OPTS}
system/distcc/cross.txt · Last modified: 2008/05/25 11:00 by 127.0.0.1