The portion of the build output that you've shared just summarizes which files failed to compile. It doesn't include any of the error output that would help in understanding why they failed to compile. You'd need to share the complete output.
As a sanity check, did you check out the submodules of realm-cocoa's Git repository prior to building (
git submodule update --init --recursive)?