Mac Catalyst target does not build on M1 with this error: Could not read serialized diagnostics file: error("Invalid diagnostics signature")

I have a project with a Mac Catalyst target that I can not build on my m1 mac (it works fine on my older intel mac). This is the error message: Could not read serialized diagnostics file: error("Invalid diagnostics signature") (in target 'LifeViewerMac' from project 'NoRegrets') Command CompileSwift failed with a nonzero exit code

Here's the xcode screenshot:

As far as I experience till now, the error Could not read serialized diagnostics file is temporary.

Please try Clean Build Folder, re-starting Xcode or re-starting your Mac and take sometime to see what happens next.

Having the same problem with XCode Version 13.2.1 (13C100), regular application project on 2016 MBP (the problem seems not to be Catalyst nor M1 related). Tried:

  • clean build folder
  • restart computer
  • reinstall XCode

Neither helped.

Only thing I noticed that all the *.dia files in the build folder have zero length. So whichever tool produces them must be crashing unexpectedly.

EDIT: Noticed that it crashes only when an error is inside of a function. If an error is at the top-level structure (class, function signature, ...), then it is being reported as expected.

Mac Catalyst target does not build on M1 with this error: Could not read serialized diagnostics file: error("Invalid diagnostics signature")
 
 
Q