Skip to content

Instantly share code, notes, and snippets.

@awesomekling
Last active March 15, 2023 19:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awesomekling/356a482827f63849e2de187ac23fb49e to your computer and use it in GitHub Desktop.
Save awesomekling/356a482827f63849e2de187ac23fb49e to your computer and use it in GitHub Desktop.

My icecream setup

This is a description of how I run icecc/icecream at home.

I'm using Ubuntu with the icecc and icecc-monitor packages installed. The latter is an optional GUI monitor application.

My "cluster" is currently two machines on a wired LAN:

192.168.10.1 qncvs
192.168.10.2 solaire

qncvs runs the icecc-scheduler service. Only one scheduler is needed, as long as others can find it via network broadcast.

Both qncvs and solaire run the iceccd service. This allows other machines to connect and submit compile jobs.

Here's my /etc/icecc/icecc.conf from both machines. It's basically the default:

ICECC_NICE_LEVEL="1"
ICECC_LOG_FILE="/var/log/iceccd.log"
ICECC_NETNAME=""
ICECC_MAX_JOBS="16"
ICECC_ALLOW_REMOTE="yes"
ICECC_BASEDIR="/var/cache/icecc"
ICECC_SCHEDULER_LOG_FILE="/var/log/icecc_scheduler.log"
ICECC_SCHEDULER_HOST=""
ICECC_CACHE_LIMIT=""

In order to build SerenityOS over icecream, an "environment" is required. This is basically a chroot tarball that is sent over to other iceccd hosts and allows them to run the exact same compiler as you have.

To create an environment for my SerenityOS toolchain:

$ export PATH_TO_SERENITY=~/src/serenity
$ icecc-create-env --gcc $PATH_TO_SERENITY/Toolchain/Local/x86_64/bin/x86_64-pc-serenity-gcc $PATH_TO_SERENITY/Toolchain/Local/x86_64/bin/x86_64-pc-serenity-g++

One step remains. When building SerenityOS, you need to export two new variables in your environment. I have these in my ~/.bashrc:

export ICECC_VERSION=/home/kling/my-icecc-environment.tar.gz
export CCACHE_PREFIX=icecc

Troubleshooting

You can run iceccd -vvv manually in the terminal if you want to see debug logging. This can help you figure out why a machine is not compiling jobs successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment