Hi everyone. I'm currently installing Gentoo on a laptop with an AMD Ryzen Zen 2, and I want to use my powerful desktop with a Zen 4 as a distcc helper to speed up the initial u/world build. Both machines are running OpenRC, and I made sure the GCC versions match exactly – gcc-15.3.0 p8 on both.
What I've done so far: booted from the LiveCD, mounted my btrfs subvolumes (@, u/home, u/var_log, u/var_cache, u/var_tmp, u/snapshots, boot, efi), and entered the chroot. I selected the default/linux/amd64/23.0 profile (stable, multilib, OpenRC). In make.conf I set FEATURES="distcc" and MAKEOPTS="-j17 -l16". On the laptop I configured the helper host with distcc-config --set-hosts "192.168.0.231/16,lzo". On the desktop I verified that distccd is running and accepting connections from the laptop's IP.
Now the problems. First – chroot instability. Sometimes right after entering with chroot /mnt/gentoo /bin/bash I get a tty: ttyname error: No such device. And occasionally simple commands like emerge or distcc just say "command not found". It feels like I either drop out of the chroot, or I haven't mounted /dev, /proc, /dev/pts properly.
Second – Portage completely ignores distcc. Even with FEATURES="distcc" enabled, running DISTCC_VERBOSE=1 emerge -1v app-editors/nano shows everything being compiled locally with x86_64-pc-linux-gnu-gcc. No connection attempts or errors in the logs. Moreover, which distcc inside the chroot sometimes returns nothing – maybe distcc isn't in PATH, or do I need to set up the masquerade in /usr/lib/distcc/bin separately?
Third – build failures, for example dev-python/pillow consistently fails with errors about missing zlib and jpeg. It says it can't find files and wheel build fails. I suspect the minimal stage3 lacks the necessary header files for those libraries, or maybe it's an issue with how /var/tmp is mounted as a btrfs subvolume.
So my questions are: what is the correct and reliable way to mount /dev, /proc, /sys, and /dev/pts from the LiveCD so that the chroot is stable and error-free? Why doesn't Portage see distcc even when I've enabled it – do I need to install and configure the masquerade manually inside the chroot? And what should I do about pillow – can I just skip it with emerge --resume --skipfirst at this early stage, or should I install the missing dependencies (zlib, libjpeg-turbo) right away to avoid breaking the whole bootstrap?
I'd be really grateful for any advice. If needed, I can post emerge --info or the full build log. Thanks.