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

**URL:** <https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600>\
**Category:** Platform & Builds\
**Tags:** os-x, xcode, unreal-engine, question\
**Created:** [July 26, 2015, 4:46pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600 "2015-07-26T16:46:15Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaJiming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaJiming](https://forums.unrealengine.com/u/MaJiming)\
**Post date:** [July 26, 2015, 4:46pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/1 "2015-07-26T16:46:15Z")

</div>

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

 ![51565-abc.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/7/06767f663c4a417000f11210d8facc3702363572.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 27, 2015, 7:03pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/2 "2015-07-27T19:03:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Qael](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Qael](https://forums.unrealengine.com/u/Qael)\
**Post date:** [July 28, 2015, 1:37am UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/3 "2015-07-28T01:37:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 28, 2015, 6:36pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/4 "2015-07-28T18:36:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![MaJiming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaJiming](https://forums.unrealengine.com/u/MaJiming)\
**Post date:** [July 29, 2015, 4:28pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/5 "2015-07-29T16:28:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 29, 2015, 6:25pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/6 "2015-07-29T18:25:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MaJiming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaJiming](https://forums.unrealengine.com/u/MaJiming)\
**Post date:** [July 29, 2015, 11:35pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/7 "2015-07-29T23:35:15Z")

</div>

Version of Mono is 3.2.6.

---

<div class="post-metadata">

**Author:** ![MaJiming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaJiming](https://forums.unrealengine.com/u/MaJiming)\
**Post date:** [July 30, 2015, 1:15am UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/8 "2015-07-30T01:15:51Z")

</div>

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

 ![51994-001.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/f/17f201877a59befa527ee9f8577782cc32659764.jpeg)

 ![51995-002.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/b/8eb88cc791ee610efed5be858228b45ef074cc4f.jpeg)

Now UE4Game - Mac still build failed.

 ![51996-003.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/c/7ac4bc83bcee8fcc0b409c37387e42cc2631b79f.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 30, 2015, 6:53pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/9 "2015-07-30T18:53:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 30, 2015, 8:31pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/10 "2015-07-30T20:31:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [August 3, 2015, 9:44pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/11 "2015-08-03T21:44:10Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a86f3523](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a86f3523](https://forums.unrealengine.com/u/anonymous_user_a86f3523)\
**Post date:** [August 3, 2015, 10:57pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/12 "2015-08-03T22:57:13Z")

</div>

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.

Thanks,

 ![52682-screen+shot+2015-08-03+at+11.52.06+am.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/e/30eb5798b57d22e1f16a450c48fa3d720cb29ab8.png)

---

<div class="post-metadata">

**Author:** ![MaJiming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaJiming](https://forums.unrealengine.com/u/MaJiming)\
**Post date:** [August 7, 2015, 9:51am UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/13 "2015-08-07T09:51:36Z")

</div>

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:

 ![53151-009.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/d/9dd2c93c23805cb8b86886bc5f308f84bd48e910.jpeg)

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [August 10, 2015, 7:28pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/14 "2015-08-10T19:28:43Z")

</div>

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.

 ![53542-screen+shot+2015-08-10+at+3.24.24+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/e/faeb59c104f47935be208cc829028a46e63b68b2.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [August 17, 2015, 9:33pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/15 "2015-08-17T21:33:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MaJiming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaJiming](https://forums.unrealengine.com/u/MaJiming)\
**Post date:** [August 18, 2015, 12:13am UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/16 "2015-08-18T00:13:46Z")

</div>

I have tried,the issue still exist.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [August 19, 2015, 3:56pm UTC](https://forums.unrealengine.com/t/complie-error-on-xcode-6-shell-script-invocation-error-failed-with-exit-code-5/326600/17 "2015-08-19T15:56:29Z")

</div>

Is this while you are still using Mono 4.0.2.5? 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.
