Complie error on Xcode 6:Shell Script Invocation Error, failed with exit code 5

Shell Script Invocation Error
Command /Users/Shared/UnrealEngine/4.8/Engine/Build/BatchFiles/Mac/ failed with exit code 5.

Hi MaJiming,

I’m going to need some more information before I can understand what the issue is.

  1. When is this issue happening? Are you attempting to create/compile a code project or are you trying to compile the source code for the engine?
  2. What version of XCode are you using?
  3. What OS are you using for your Mac?
  4. Are you building your project for a Mac or for another device?
  5. What region/language settings are you using? It is possible that anything other than English could be causing issues which would narrow down the problem.

Any more details you could provide would be helpful.

I am having the same issue.

  1. I am simply trying to build inside of XCode

  2. Version 6.4 (6E35b)

  3. 10.10.4 (14E46)

  4. Mac

  5. I am using English only

This is a project that I had first started on PC, and just brought over to my new Mac.

Hi ,

Does this issue only occur in this particular project that you’re mentioning or will it happen to all projects? If not, does it only happen to projects that you bring from Windows over to Mac? Did this issue only start occurring recently?

  1. When I create c++ project then build in XCode , it happened every time.But blueprint no problem.

  2. Version 6.4 (6E35b)

  3. OS X 10.10.4

  4. Mac only
    (MacBook Pro (15-inch, Mid 2010)
    8 GB 1067 MHz DDR3
    NVIDIA GeForce GT 330M 512 MB)

  5. I am using Chinese only.

It seems as though this issue could be fixed by regenerating some of the files that are made when the project is generated. Can you please try navigating to the project folder and deleting the ‘Intermediate’ folder? After that, right click the .uproject file and hit ‘Generate Project Files’. After that, try opening the solution (the .sln file) again and compiling to see if it worked.

If this doesn’t work, do either of you have Mono installed? If so, what version of Mono are you using? It could be causing this issue to occur.

Version of Mono is 3.2.6.

I installed MonoFramework-MDK-, build succeeded,but can not run on iOS , mac , UE4Game - ios.

Now UE4Game - Mac still build failed.

Hello MaJiming,

It seems that you may be building for the wrong Scheme. In XCode, please go to Product > Scheme and select “project name here” - Mac

If you do this, you should be able to build without an issue. The Scheme that you’re currently set to would be trying to rebuild part of the engine itself which, if you’re using the binary version of the engine, is impossible as the files are set to Read-Only.

I’m still looking into the issue that you’re having building for iOS however.

Can you also try verifying your installation? You can do this from the Epic Games Launcher by navigating to Library and clicking the drop down arrow beside the engine version and selecting ‘Verify’. This will fix any issues related to the installation that could be causing this problem.

Hi MaJiming,

We haven’t heard from you in a while. Was my solution helpful or are you still experiencing this issue? In the meantime, I’ll be setting this issue to resolved for tracking purposes. If you need further assistance, please comment and this post will reopen.

Have a nice day,

Hi Mathew,

I have a similar error to MaJiming. I tried everything described on this page, but I still get this error. Any ideas you have would be greatly appreciated.


I have verified my installation,but the issue still exist.

If I use the mono 3.2.6,pop up the dialog and build error in Xcode:

If I use the mono,build succeeded,but can not run.

Hi MaJiming,

Have you tried building a fresh project while using the Scheme that I previously mentioned? I’ve attached an image to demonstrate what I mean. Please let me know if this doesn’t solve the issue for you. Please try this as well, rmenon98.

Hello MaJiming, have you tried the possible solution from my previous comment? If so, was it helpful? If not, please let me know and we can continue looking into this issue further.

I have tried,the issue still exist.

Is this while you are still using Mono If not, can you try it with that? If you are able to build, please let me know what kind of errors you’re getting when you try to run it as that may be the root of the issue.