Unreal Engine build from source Mac issues

I’ve tried to build unreal from source on Mac but every time the build never completes as my Mac will ‘restart itself because of an error’.

I cannot attach screenshots sadly as you cant take screenshots of restarting messages…

Has anyone solved the problem? I built using Xcode.