media-libs/mesa-23.1.3 fails to distribute compilation with distcc: >distcc[77] (dcc_build_somewhere) Warning: failed to distribute, running locally instead >distcc[77] (dcc_open_lockfile) ERROR: failed to create /var/tmp/portage/.distcc/lock/cpu_localhost_0: Permission denied >distcc[77] (dcc_lock_one) ERROR: failed to lock Even though file is created successfully: $ stat /var/tmp/portage/.distcc/lock/cpu_localhost_0 File: /var/tmp/portage/.distcc/lock/cpu_localhost_0 Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 8,10 Inode: 3145750 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 250/ portage) Access: 2023-06-28 19:43:08.082151546 +0300 Modify: 2023-06-28 19:43:08.082151546 +0300 Change: 2023-06-28 19:43:08.082151546 +0300 Birth: 2023-06-28 19:43:08.082151546 +0300
I doubt this is specific to mesa at all. You'll need to try debug it a bit more with a simpler package.
I tried to reproduce it with sys-devel/llvm-15.0.7-r3 and FEATURES=distcc works correctly there. Yet the lock-file was created there a bit differently: $ stat /var/tmp/portage/.distcc/lock/cpu_localhost_0 File: /var/tmp/portage/.distcc/lock/cpu_localhost_0 Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 8,10 Inode: 3185542 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 250/ portage) Gid: ( 250/ portage) Access: 2023-06-28 19:48:48.383839010 +0300 Modify: 2023-06-28 19:48:48.383839010 +0300 Change: 2023-06-28 19:48:48.383839010 +0300 Birth: 2023-06-28 19:48:48.383839010 +0300
So I wonder if it could be something with ebuild or a bug in portage.
Workaround: # chown -R portage:portage /var/tmp/portage/.distcc
Maybe distcc is being called as root in pkg_pretend or pkg_setup? Anyway, feel free to re-assign if this isn't a mesa ebuild issue.