Error generating Xcode project, compiler exits with error 255

I’ve been trying unsuccessfully for the past week or so trying to generate an Xcode project using the GenerateProjectFiles.command file for what was originally a PC-only project. After fixing the dreaded EOL character issue that happens when transferring shell files from Windows to Unix-based machines, I was greeted by this different error below:

User-MacBook-Pro:~ User$ /Users/User/Desktop/SourceFiles/GenerateProjectFiles.command ; exit;
Setting up Unreal Engine 4 project files...

Setting up Mono
/Users/User/Desktop/SourceFiles/Engine/Binaries/ThirdParty/Mono/Mac/lib/mono/4.0/Microsoft.CSharp.targets: error : Compiler crashed with code: 255.
UnrealBuildTool Exception: ERROR: Failed to launch compiler to compile assembly from source files 'System.Collections.Generic.List`1[System.String]' (Exception: Compiler failed to produce the assembly. Output: '')
logout

[Process completed]

Does anyone know how to fix this/what I might have done wrong? I found a similar question on the forums, saying that I might be lacking some dependencies on the Mac side, but unfortunately the links provided were dead.

If you copied Engine/Binary/ThirdParty/Mono folder from Windows, try downloading it from GitHub on Mac (or better yet, download whole source and Required zips on Mac). There’s plenty of shell scripts in there that don’t have .sh extension, maybe you didn’t convert them. If that doesn’t help, let me know. Thanks.