I had this problem as well after a massive merge conflict in my project.pbxproj file.
Turns out the "Compile Sources" step was shown twice in my build phases.
Manually editing the project.pbxproj file and checking the PBXNativeTarget section fixed this issue for me: I had to remove the duplicate "Sources"-key there.