The error message should have been printed in the install log before ninja is failing, so you would have to recheck the log.
In case you cannot fix the error, feel free to post it here and we can have a look.