'metal_stdlib' has been modified since the precompiled header , Material not working

Please help.
What i have tried

  1. Remove ~/Library/Developer/Xcode/DerivedData
  2. Remove /tmp/*
  3. Reinstall Xcode
  4. Reinstall UE4
  5. Clean saved/intermediate folders
    Nothing helped.

[SM5] /tmp/20442_442749496.metal(0): Failed to compile to bytecode locally, code: 1, output: fatal error: file ‘/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/lib/clang/802.1/include/metal/metal_stdlib’ has been modified since the precompiled header ‘/tmp/metal_stdlib_11323578694557174BFFB3187C02FFDD1FEA6808C9FF88FEA28EFmetalfe-802.1.34-mmacosx-version-min_10.12-ffast-math-std_osx-metal1.2.pch’ was built
note: please rebuild precompiled header ‘/tmp/metal_stdlib_11323578694557174BFFB3187C02FFDD1FEA6808C9FF88FEA28EFmetalfe-802.1.34-mmacosx-version-min_10.12-ffast-math-std_osx-metal1.2.pch’
1 error generated.

Btw, xcode version 9.1, ue 4.18

Hi h0per,

Are you using the binary version of the Engine that is installed through the Launcher, or did you build the Engine from source code? What are you trying to do when you see the error message that you mentioned?

Hi , Thanks for response. It seems, that all broke when i update Xcode to v9.1 and launch Unreal Engine 4.18 from Launcher. Today i have built engine from Github Sources and it fixes my problem. (BUT!! on UE4 , started from launcher it’s still not working).

I have made a few more attempts to reproduce this error using 4.18 installed through the Launcher and Xcode 9.1. Unfortunately everything still appears to be working fine for me.

Were you building a code project in Xcode when this occurred? If so, what were your scheme settings? Did this only happen with your own project, or were you also able to reproduce it with a new test project?

Were you building a code project in Xcode when this occurred? - no
Did this only happen with your own project, or were you also able to reproduce it with a new test project? - on all projects.
Steps:

  1. update to 4.18
  2. convert project to new version (not copy, convert source)
  3. update xcode

Update:

  1. Today i have tried to reproduce on second mac, but with additional steps
  2. update to 4.18
  3. change projectproperties->mac->metal v.2.0
  4. restart ue
  5. crash
  6. go to config and remove all below ‘mac’
  7. start ue
  8. it doesnt work again

P.S.-> The biggest fun is when i compile github version, it seems that launcher version fixed too :smiley:

I tried again by creating a new project in 4.17 (both a Blueprint and a Code project), which I then upgraded to 4.18 by converting in place (did not create a copy of the project). After upgrading the project, I changed to Metal v. 2.0 and restarted the Editor. It restarted without any issues for me.

With your observation about it working after building the Engine from source code, I wonder if it is working for me because I had already built the Engine from source code previously. Is this working normally for you, now?

It seems that Unreal Engine (Launcher Version) caches some shaders, and just copy them into /tmp even after shaders was force deleted by me. And only compiling UE4.18 from sources rebuilded cache for both Unreal Engines (Launcher and Github).
But yes, now problem was fixed by compiling Engine from sources.

Unfortunately we do not have any “clean” Macs that we can test this theory with, since all of them have had the Engine built from source code on them. Please let us know if you run into this issue again, and we can try taking another look at it.