# UE 5.1.0 preview 2 - Failing to build for Oculus Quest 2 (linker errors)

**URL:** <https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209>\
**Category:** XR Development\
**Tags:** Builds, unreal-engine, question\
**Created:** [October 20, 2022, 3:18am UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209 "2022-10-20T03:18:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CashGarman](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cashgarman/32/583635_2.png) [@CashGarman](https://forums.unrealengine.com/u/CashGarman)\
**Post date:** [October 20, 2022, 3:18am UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/1 "2022-10-20T03:18:48Z")

</div>

Hi fellow VR devs!

I’m having an issue building to the Oculus Quest 2 using the new UE 5.1.0 preview 2.

I’m getting a series of the following errors from what appear to be unrelated parts of the engine:

Error: UAT: ld.lld: error: undefined symbol: \_\_aarch64\_swp4\_acq\_rel

Then finally:  
Error: UAT: ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)  
Error: UAT: clang++: error: linker command failed with exit code 1 (use -v to see invocation)

This is a freshly created VR template project. It builds ok on 5.0.3 from the launcher and source, as well as 5.2.0 from source.

[My editor log file](https://pastebin.com/5mgsrusn) (I’m unable to attach my log file as I’m a new user)

EDIT: [Hopefully working link](https://drive.google.com/file/d/1RY0E-Ft0YHK1L6bLVz5FGQtuy9toa5Cy/view?usp=sharing)

Has anyone had similar problems before or any ideas about what might be the cause? If there is any more information I can provide let me know!

Thanks!

---

<div class="post-metadata">

**Author:** ![Metaberse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Metaberse](https://forums.unrealengine.com/u/Metaberse)\
**Post date:** [October 24, 2022, 4:28pm UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/2 "2022-10-24T16:28:33Z")

</div>

Same error for me when building. Im only using 5.1 because vulcan shader for 5.0 just bricks my project.

---

<div class="post-metadata">

**Author:** ![Thoth\_FN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thoth\_FN](https://forums.unrealengine.com/u/Thoth_FN)\
**Post date:** [November 8, 2022, 2:19am UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/3 "2022-11-08T02:19:57Z")

</div>

For anyone else that runs into this issue, I fixed it by upgrading my Android NDK. I was getting this error when I was still on 21

---

<div class="post-metadata">

**Author:** ![Ben\_C\_Unsworth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben\_C\_Unsworth](https://forums.unrealengine.com/u/Ben_C_Unsworth)\
**Post date:** [November 15, 2022, 8:34pm UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/4 "2022-11-15T20:34:41Z")

</div>

Thank you! Had the same issue – was banging my head – upgrade to NDK 25 fixed it.

---

<div class="post-metadata">

**Author:** ![AriettyBorger](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ariettyborger/32/595238_2.png) [@AriettyBorger](https://forums.unrealengine.com/u/AriettyBorger)\
**Post date:** [November 20, 2022, 1:36pm UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/5 "2022-11-20T13:36:26Z")

</div>

I had the same error and the new NDK works, thanks!

- Android Studio: Install the NDK 25.1.8937393

To switch from UE5.0 to UE5.1 I had to do more changes. Maybe it helps somebody:

- Android Studio: SDK Platform to 29 (Quest 2 is Android 10)
- Android Studio: Android SDK Tools to 30.0.3
- Android Studio: Command-line to 8.0 latest
- Android Studio: CMake to 3.10.2.4988404
- SetupAndroid.bat to Update SDK
- UE5.1: Settings, Platforms, Android SDK change the NDK path
- UE5.1: Settings, Platforms, Android change Target SDK Version to 29 (Android 10)
- UE5.1: Platforms (Launch), Android, Quest 2 do Update Device and restart UE to get SDK Managment “Installed: r25b”

---

<div class="post-metadata">

**Author:** ![nickknyc](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nickknyc/32/681780_2.png) [@nickknyc](https://forums.unrealengine.com/u/nickknyc)\
**Post date:** [November 26, 2022, 1:57am UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/6 "2022-11-26T01:57:12Z")

</div>

@airetyBorger thanks for documenting the changes you made moving up to 5.1. Reminder to re-run SetupAndroid.bat

I am still getting errors trying to build for Quest 2 - I believe the core problem is in error bunches 1 and 3

1. First set of errors -  
UATHelper: Packaging (Android (ASTC)): LogShaderCompilers: Warning: 2 Shader compiler errors compiling global shaders for platform VULKAN\_ES3\_1\_ANDROID:  
UATHelper: Packaging (Android (ASTC)): LogShaderCompilers: Warning: Shader debug info dumped to: “D:/S13/\_Proto\_Active/\_unreal/S13cityQuest2\_51/S13cityQuest2\_51/Saved/ShaderDebugInfo/VULKAN\_ES3\_1\_ANDROID/Global/FCCRStencilMergerPS/0”  
UATHelper: Packaging (Android (ASTC)): D:/Program Files/Epic Games/UE\_5.1/Engine/Plugins/Experimental/ColorCorrectRegions/Shaders/Private/ColorCorrectRegionsCommon.usf(294,37): Shader FCCRStencilMergerPS, Permutation 0, VF None:  
UATHelper: Packaging (Android (ASTC)): /ColorCorrectRegionsShaders/Private/ColorCorrectRegionsCommon.usf(294,37): error: use of undeclared identifier ‘GetScreenSpaceData’  
UATHelper: Packaging (Android (ASTC)): FScreenSpaceData ScreenSpaceData = GetScreenSpaceData(UV, false);  
UATHelper: Packaging (Android (ASTC)): ^  
UATHelper: Packaging (Android (ASTC)): LogShaderCompilers: Warning: D:/Program Files/Epic Games/UE\_5.1/Engine/Plugins/Experimental/ColorCorrectRegions/Shaders/Private/ColorCorrectRegionsStencilMerger.usf(22,28): Shader FCCRStencilMergerPS, Permutation 0, VF None:  
UATHelper: Packaging (Android (ASTC)): /ColorCorrectRegionsShaders/Private/ColorCorrectRegionsStencilMerger.usf(22,28): error: use of undeclared identifier ‘CalcSceneCustomDepth’; did you mean ‘CalcSceneDepth’?  
UATHelper: Packaging (Android (ASTC)): min16float CustomDepth = CalcSceneCustomDepth(UVAndScreenPos.xy);  
UATHelper: Packaging (Android (ASTC)): ^ ~~~~~~~~~~~~~~~~~~~  
UATHelper: Packaging (Android (ASTC)): LogShaderCompilers: Error: Errors compiling global shader FCCRStencilMergerPS :  
UATHelper: Packaging (Android (ASTC)): LogShaderCompilers: Display: /Engine/Private/Common.ush:272:9: warning: conversion from larger type ‘vector\<float, 4\>’ to smaller type ‘min16float4’, possible loss of data  
UATHelper: Packaging (Android (ASTC)): return Tex.Sample(Sampler, UV);

2. Later I get this

UATHelper: Packaging (Android (ASTC)): LogShaderCompilers: Display: /Engine/Private/GBufferHelpers.ush:437:20: warning: conversion from larger type ‘float3’ to smaller type ‘\_\_restrict min16float3’, possible loss of data  
PackagingResults: Warning: 2 Shader compiler errors compiling global shaders for platform VULKAN\_ES3\_1\_ANDROID:  
PackagingResults: Warning: Shader debug info dumped to: “D:/S13/\_Proto\_Active/\_unreal/S13cityQuest2\_51/S13cityQuest2\_51/Saved/ShaderDebugInfo/VULKAN\_ES3\_1\_ANDROID/Global/FCCRStencilMergerPS/0”  
PackagingResults: Error: use of undeclared identifier ‘GetScreenSpaceData’  
PackagingResults: Warning: D:/Program Files/Epic Games/UE\_5.1/Engine/Plugins/Experimental/ColorCorrectRegions/Shaders/Private/ColorCorrectRegionsStencilMerger.usf(22,28): Shader FCCRStencilMergerPS, Permutation 0, VF None:  
PackagingResults: Error: use of undeclared identifier ‘CalcSceneCustomDepth’; did you mean ‘CalcSceneDepth’?  
PackagingResults: Error: Errors compiling global shader FCCRStencilMergerPS :  
PackagingResults: Warning: conversion from larger type ‘vector\<float, 4\>’ to smaller type ‘min16float4’, possible loss of data  
PackagingResults: Warning: conversion from larger type ‘vector\<float, 4\>’ to smaller type ‘min16float4’, possible loss of data

1. And finally this

UATHelper: Packaging (Android (ASTC)): LogOutputDevice: Warning:  
UATHelper: Packaging (Android (ASTC)): Script Stack (0 frames) :  
UATHelper: Packaging (Android (ASTC)): LogWindows: Error: appError called: Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7999]  
UATHelper: Packaging (Android (ASTC)): Failed to compile global shader FCCRStencilMergerPS . Enable ‘r.ShaderDevelopmentMode’ in ConsoleVariables.ini for retries.  
PackagingResults: Warning: conversion from larger type ‘float’ to smaller type ‘min16float’, possible loss of data  
PackagingResults: Error: appError called: Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7999]  
UATHelper: Packaging (Android (ASTC)): LogWindows: Error: begin: stack for UAT  
UATHelper: Packaging (Android (ASTC)): LogWindows: Error: === Critical error: ===  
UATHelper: Packaging (Android (ASTC)): LogWindows: Error:  
UATHelper: Packaging (Android (ASTC)): LogWindows: Error: Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7999]  
UATHelper: Packaging (Android (ASTC)): LogWindows: Error: Failed to compile global shader FCCRStencilMergerPS . Enable ‘r.ShaderDevelopmentMode’ in ConsoleVariables.ini for retries.  
UATHelper: Packaging (Android (ASTC)): LogWindows: Error:

---

<div class="post-metadata">

**Author:** ![CILabs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CILabs](https://forums.unrealengine.com/u/CILabs)\
**Post date:** [January 11, 2023, 3:16pm UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/7 "2023-01-11T15:16:19Z")

</div>

@nickknyc Did you find a solution for this error? Running into the same issues.

---

<div class="post-metadata">

**Author:** ![Arq\_Juan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arq\_Juan](https://forums.unrealengine.com/u/Arq_Juan)\
**Post date:** [March 29, 2023, 1:03am UTC](https://forums.unrealengine.com/t/ue-5-1-0-preview-2-failing-to-build-for-oculus-quest-2-linker-errors/673209/8 "2023-03-29T01:03:49Z")

</div>

Tuve el problema  
conversion from larger type ‘vector\<float, 4\>’ to smaller type ‘min16float4’, possible loss of data  
y resulta que fue por una metodología de trabajo que sigo para evitar perder el avance. La situación es que para probar caminos alternativos, suelo realizar copias de los archivos completos que realizo, es decir de la Carpeta madre del proyecto realizado, primero solucioné parcialmente el mismo tema con respecto a los materiales reduciendoles la calidad desde el editor de imagen pero luego aparecieron los floats y los vectores. Es entonces que no recuerdo si encontré un artí■■■■ o se me pasó por la cabeza intentar con el archivo principal del cual realicé copias y fue entonces que se me solucionó este problema, aunque tuve otros problemas aparte.

Execution failed for task ‘:app:packageDebug’.  
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

o este otro problema que no entiendo

java.lang.OutOfMemoryError (no error message)
