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

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 (I’m unable to attach my log file as I’m a new user)

EDIT: Hopefully working link

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!

3 Likes

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

1 Like

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

3 Likes

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

1 Like

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”
4 Likes

@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:

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

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)

1 Like