FS#66340 - [pacman] distcc and ccache together break gcc in package()

Attached to Project: Pacman
Opened by Matti Niemenmaa (Deewiant) - Tuesday, 21 April 2020, 16:08 GMT
Last edited by Allan McRae (Allan) - Tuesday, 09 February 2021, 04:30 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 5.2.1
Due in Version 6.0.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
When using both distcc and ccache, PKGBUILDs that execute gcc in package() fail to build with an error from distcc like:

distcc[52016] (main) CRITICAL! distcc seems to have invoked itself recursively!

Additional info:
* The cause is that CCACHE_PREFIX is set to "distcc distcc" instead of just "distcc", which is because buildenv gets set once for build() and a second time for package() and each time it appends "distcc". So ccache invokes "distcc distcc gcc" and that causes distcc to have a fit.
* I posted a patch at https://lists.archlinux.org/pipermail/pacman-dev/2020-January/023949.html but it wasn't taken in. I ran into this again just now so I decided to file a bug.

Steps to reproduce:
* Enable both ccache and distcc in BUILDENV in /etc/makepkg.conf.
* makepkg any package that invokes the compiler in package(), for example ncurses.
* Observe the error during the "make install" command.
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 09 February 2021, 04:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit 9e425cd1ea4a5fe7e7d7f1daa225eed37650dafc
Comment by DDoug (themilkrat) - Tuesday, 01 December 2020, 01:29 GMT
Can confirm this behavior.

Loading...