# Unreal Engine inaccurately reports "XCode is too old" when CommandLineTools installed

**URL:** <https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980>\
**Category:** Platform & Builds\
**Tags:** xcode, MAC-OS-X, metal, unreal-engine, question\
**Created:** [November 7, 2017, 5:30pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980 "2017-11-07T17:30:55Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_bff5939d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bff5939d](https://forums.unrealengine.com/u/anonymous_user_bff5939d)\
**Post date:** [November 7, 2017, 5:30pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/1 "2017-11-07T17:30:55Z")

</div>

**SUMMARY:**  
Unreal for Mac OS X, at startup, displays the error:  
“Xcode installed on this Mac is too old to be used for Metal shader compilation. Falling back to runtime compiled text shaders, which are slower. Please update to latest version of xcode for best performance.”  
…in cases where Xcode is at the newest version, but the “xcode-select” tool has selected Apple’s CommandLineTools package rather than Xcode.

A user can get into this state if when setting up their computer they install CommandLineTools, or the popular “Homebrew” utility, before they install Xcode. If this happens, Unreal will perpetually display a misleading error message at startup, and the user will likely not be able to figure out the cause of the error message on their own. In addition, the user will not get the benefit of Metal.

**REPRO STEPS:**  
Install UE 4.18 and the newest XCode on a Macintosh. Ensure the Command Line Tools package is installed. I think you can do this by running `xcode-select --install` [see here](https://developer.apple.com/library/content/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-DOWNLOADING_COMMAND_LINE_TOOLS_IS_NOT_AVAILABLE_IN_XCODE_FOR_MACOS_10_9__HOW_CAN_I_INSTALL_THEM_ON_MY_MACHINE_). Set the Command Line Tools package to be the standard command line tool provider by running  
`sudo xcode-select -s /Library/Developer/CommandLineTools`  
…in Terminal. This will simulate the state of having installed CommandLineTools before Xcode. You can see that you have a working compiler toolchain by typing `cc`  
Now open Unreal Editor. You will see the “Xcode installed on this Mac is too old” dialog.  
Close unreal editor and reset your command line tool provider by running  
`sudo xcode-select -r`  
Reopen unreal editor. The error will be gone.

**CONTEXT:**  
Apple in recent years has distributed two choices for getting C compilers: XCode, a full GUI IDE, and “CommandLineTools”, a minimal package containing basic tools for UNIX style development. `xcode-select` is a tool Apple providers for specifying what compiler version that the command line utilities `cc`, `xcrun` etc use, in case the user has multiple versions of XCode installed. CommandLineTools is automatically installed if you install the popular UNIX-tool package managers “homebrew” or “MacPorts”.

The CommandLineTools package does not contain the OS X or iPhone SDKs, and therefore does not contain the `metal` command line tool. If I use xcode-select to select CommandLineTools, then run `xcrun -sdk macosx metal`, the metal compiler is not found. If I use xcode-select to select XCode, `metal` is again found.

**HOW I EXPERIENCED THIS BUG:**  
When first setting up my laptop (last December), the first thing I did was install [Homebrew](https://brew.sh). A couple months later, I installed XCode. When I installed Unreal 4.18.0 yesterday, I got the “Xcode is too old” error message. I upgraded XCode to the newest (9.1, 9B55) but still got the error. I checked my XCode version with `xcode-select -p` and saw that CommandLineTools was selected. I reset my XCode with `xcode-select -r` and the error message went away.

**EXPECTED BEHAVIOR:**  
Because the case of CommandLineTools being selected and Metal therefore being absent is forseeable, Unreal should provide a helpful error message in this case and specifically recommend the correct fix (run `sudo xcode-select -r` in Terminal). Ways that Unreal could detect this include invoking `xcrun -sdk macosx metal -v` and detecting not-found; checking `xcodebuild -version` before blaming XCode’s version number; and checking `xcode-select -p` to detect a nonstandard xcode selection (although people using OS X betas often select unusual XCodes on purpose, anything other than `/Applications/Xcode.app/Contents/Developer` suggests a potential problem).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [November 13, 2017, 3:32pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/2 "2017-11-13T15:32:32Z")

</div>

Hi mcclure111,

Thank you for letting us know about this issue. I was able to reproduce the inaccurate warning message, and have entered [UE-52314](https://issues.unrealengine.com/issue/UE-52314) to have this investigated further.

---

<div class="post-metadata">

**Author:** ![Nelson\_Lim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nelson\_Lim](https://forums.unrealengine.com/u/Nelson_Lim)\
**Post date:** [March 2, 2018, 8:03pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/3 "2018-03-02T20:03:37Z")

</div>

Thanks for being detailed here with a workaround. I had bumped into this issue and it was slowing down my shader compiles so much on my mac. The workaround resolved my problems. I am using UE4.18.3 and XCode 9.2

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e89ae349](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e89ae349](https://forums.unrealengine.com/u/anonymous_user_e89ae349)\
**Post date:** [May 6, 2018, 9:40pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/4 "2018-05-06T21:40:51Z")

</div>

running `sudo xcode-select -r` solved “Your XCode is too old” warning for me and also creating new c++ class files is now possible! thank you so much.  
osx 10.13.4, XCode 9.3, UE 4.19.2

---

<div class="post-metadata">

**Author:** ![loot001](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@loot001](https://forums.unrealengine.com/u/loot001)\
**Post date:** [October 22, 2018, 4:06am UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/5 "2018-10-22T04:06:19Z")

</div>

Thank you! I had same problem on UE4.20.3. I had recently installed Homebrew. This solved the “old version error” on UE4 startup.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c120ce39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c120ce39](https://forums.unrealengine.com/u/anonymous_user_c120ce39)\
**Post date:** [October 23, 2018, 12:47pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/6 "2018-10-23T12:47:12Z")

</div>

Had the issue after installing OpenSSL for Codeworks (Android). That command in the terminal resolved it. Thanks!

---

<div class="post-metadata">

**Author:** ![ElBocanegra22](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ElBocanegra22](https://forums.unrealengine.com/u/ElBocanegra22)\
**Post date:** [November 9, 2018, 1:35pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/7 "2018-11-09T13:35:26Z")

</div>

Same problem, this line fix the problem, OS 10.14.1, Xcode 10.1, UE 4.20.

---

<div class="post-metadata">

**Author:** ![Antidamage](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/antidamage/32/918692_2.png) [@Antidamage](https://forums.unrealengine.com/u/Antidamage)\
**Post date:** [November 30, 2018, 11:25am UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/8 "2018-11-30T11:25:47Z")

</div>

This still exists in 4.21 but it’s clearly expected behaviour and at worst a problem with homebrew. I ran into this while going through a Jenkins setup guide.

We could be proactive and add a button to the iOS project config panel to make it use the latest (or select a) version of XCode, as finding this page was pretty painful. Something similar already exists for the Android section.

---

<div class="post-metadata">

**Author:** ![Nativecoder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nativecoder](https://forums.unrealengine.com/u/Nativecoder)\
**Post date:** [February 2, 2019, 12:50am UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/9 "2019-02-02T00:50:56Z")

</div>

Same problem here, this codeline fix the problem, OS 10.13.6, Xcode 10.1, UE 4.21.2 version.  
Thank you! Your precise answer helped me a lot.

---

<div class="post-metadata">

**Author:** ![savagejen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@savagejen](https://forums.unrealengine.com/u/savagejen)\
**Post date:** [July 3, 2019, 2:19pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/10 "2019-07-03T14:19:54Z")

</div>

Why is that issue marked as fixed? Still happening in 4.22.3

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_13486a40](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_13486a40](https://forums.unrealengine.com/u/anonymous_user_13486a40)\
**Post date:** [August 16, 2019, 7:36am UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/11 "2019-08-16T07:36:13Z")

</div>

Still exists in 4.21.2 and 4.22.3 with Xcode 10.3 (Current)  
Removing command line tools for Xcode isn’t an option. They are needed for many other projects.

---

<div class="post-metadata">

**Author:** ![VOXELIUM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VOXELIUM](https://forums.unrealengine.com/u/VOXELIUM)\
**Post date:** [April 12, 2020, 9:43am UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/12 "2020-04-12T09:43:11Z")

</div>

in my Unreal Engine 4.23.1 problem “Xcode was not detected on this Mac” although i have Xcode 10.1 on my HighSierra Mac  
running `sudo xcode-select -r does` not help

---

<div class="post-metadata">

**Author:** ![VOXELIUM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VOXELIUM](https://forums.unrealengine.com/u/VOXELIUM)\
**Post date:** [April 12, 2020, 9:43am UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/13 "2020-04-12T09:43:55Z")

</div>

in my Unreal Engine 4.23.1 problem “Xcode was not detected on this Mac” although i have Xcode 10.1 on my HighSierra Mac  
running `sudo xcode-select -r does` not help

---

<div class="post-metadata">

**Author:** ![VOXELIUM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VOXELIUM](https://forums.unrealengine.com/u/VOXELIUM)\
**Post date:** [April 12, 2020, 10:06am UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/14 "2020-04-12T10:06:47Z")

</div>

i did `sudo xcode-select -p` and renamed Xcode 10.1 into Xcode  
Now is work

---

<div class="post-metadata">

**Author:** ![Teibol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teibol](https://forums.unrealengine.com/u/Teibol)\
**Post date:** [April 18, 2020, 3:03pm UTC](https://forums.unrealengine.com/t/unreal-engine-inaccurately-reports-xcode-is-too-old-when-commandlinetools-installed/408980/15 "2020-04-18T15:03:42Z")

</div>

sudo xcode-select -r solved the problem

Unreal 4.23.1  
Catalina 10.15.4
