Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

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, 21 April 2020, 23:25 GMT
Task Type Bug Report
Category General
Status Assigned
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 0%
Votes 0
Private No


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 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

Comment by DDoug (themilkrat) - Tuesday, 01 December 2020, 01:29 GMT
Can confirm this behavior.