malformed or corrupted AST file

After we moved our build machines to Xcode 7.1, every few successful builds, we get build failures that look like this:


2015-11-06T15:36:39.879Z: fatal error: malformed or corrupted AST file: 'Unable to load module "/var/folders/fl/2425y7yd61d628x14t5wnvyc0000gn/T/xctool_temp_OpNbQN/DerivedDat a/ModuleCache/3U0K7GAV7Q7Y9/UIKit-1V5UHAPTOD24G.pcm": module file out of date'

2015-11-06T15:36:39.879Z: note: after modifying system headers, please delete the module cache at '/var/folders/fl/2425y7yd61d628x14t5wnvyc0000gn/T/xctool_temp_OpNbQN/DerivedDat a/ModuleCache/3U0K7GAV7Q7Y9'


Before each build, we make sure to stop Xcode, simulators, xcode build, and xctool, and then search for and delete module caches like this:

find /var/folders -type d -iname '*xctool_temp_*' 2>/dev/null -exec rm -rf {} \;


But we still see the aforementioned error occasionally, haven't found any real solution besides the ocassional pressCommand+Shift+Option+K / Command+Shift+K to build clean.

Any clues?


Also, has anyone seen build reliability improve after moving build machines from OS X Yosemite to OS X El Capitan (we're still on Yosemite but considering move to El Capitan).


Thanks!

Claudio


Xcode 7.1, OS X Yosemite (10.10.5)

malformed or corrupted AST file
 
 
Q