User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/distributed_compilation.meta failed
Unable to save metadata file. Hint: disk full; file permissions; safe_mode setting.
tutorials:distributed_compilation

This is an old revision of the document!


Distributed compilation using distcc ccache

  • Install distcc and ccache in all computers
sudo apt-get install distcc ccache
  • Put the following in your .bashrc:
export CCACHE_PREFIX=distcc
export DISTCC_HOSTS='username@computer1/5:/usr/bin/distccd username@computer2/5:/usr/bin/distccd'
export ROS_PARALLEL_JOBS="-j10"
export PATH=${HOME}/local/bin:${PATH}
  • Create some files in a ccache program in your xstow directory (~/local/DIR/ccache):
cd ~/local/DIR
mkdir -p ccache/bin
cd ccache/bin
ln -s /usr/bin/ccache cc
ln -s /usr/bin/ccache c++
ln -s /usr/bin/ccache gcc
ln -s /usr/bin/ccache g++
cd ../../
xstow ccache
  • Activate connection caching. Edit ~/.ssh/config with:
Host *
  ControlMaster auto
  ControlPath ~/.ssh_tmp/master-%r@%h:%p
  • Create temp dir:
mkdir ~/.ssh_tmp
  • Make sure you can log in without password
  • Try to compile something!
  • If something doesn't work try: export DISTCC_VERBOSE=1
  • To compile PCL with distcc you have to disable the CMAKE flag -march=native in cmake/pcl_find_sse.cmake

Refs: http://toychest.in.tum.de/wiki/robots:rosie_distcc

~~DISCUSSION~~

tutorials/distributed_compilation.1456509163.txt.gz · Last modified: 2022/09/20 00:08 (external edit)