Unreal 4.27.2 source code version + Rider 2023.1 + MacbookPro 2023(M2 Max) + macOS Ventura 13.3.1(a).
During the cook process, an error occurred (which actually caused the cook to not start at all) FMacPlatformMisc::GenerateCrashInfoAndLaunchReporter: posix_spawn() failed (13, Permission denied)
Solution:
chmod +x Engine/Binaries/ThirdParty/ImgTec/PVRTexToolCLI
Analysis process (if the above solution is invalid, then you can refer to the following process):
Modify the code: Engine/Source/Runtime/Core/Private/Mac/MacPlatformProcess.cpp
L359 UE_LOG(LogHAL, Verbose, TEXT("FMacPlatformProcess::CreateProc: '%s'"), *Commandline);
Change Verbose
to Warning
.
Then see which specific process is reporting an error.
PackagingResults: Warning: FMacPlatformProcess::CreateProc: '"/Users/mixer76/work/path/Engine/Binaries/ThirdParty/ImgTec/PVRTexToolCLI" -i "../../../Projects/P/Intermediate/Cache/372f9d3294fa2e2f40f29a7f4f8436RGBToPVRIn.pvr" -o "../../../Projects/P/Intermediate/Cache/372f9d3294fa2e2f40f29a7f4f8436RGBToPVROut.pvr" -legacypvr -q pvrtcfast -f
PVRTC1_4'
Then execute
ls -al /Users/mixer76/work/path/Engine/Binaries/ThirdParty/ImgTec/PVRTexToolCLI
It was found that only read permission was granted.
So
chmod +x Engine/Binaries/ThirdParty/ImgTec/PVRTexToolCLI
Problem solved.
Chinese version: https://zhuanlan.zhihu.com/p/631536913