I have the following error:
Command /usr/bin/codesign failed with exit code 1
Here is what I already did for trying to fix this:
In my case, I had an extra expired distribution certificate in my keychain - I deleted the certificate from KeyChain Access and the compilation started working again.