If disable PCH in Target.cs, an error will occur when building for Android. The log is as follows.
LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(40,3): error: use of undeclared identifier 'GShaderPlatformForFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES2] = SP_VULKAN_PCES3_1; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(40,34): error: use of undeclared identifier 'ERHIFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES2] = SP_VULKAN_PCES3_1; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(40,59): error: use of undeclared identifier 'SP_VULKAN_PCES3_1' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES2] = SP_VULKAN_PCES3_1; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(41,3): error: use of undeclared identifier 'GShaderPlatformForFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES3_1] = SP_VULKAN_PCES3_1; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(41,34): error: use of undeclared identifier 'ERHIFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES3_1] = SP_VULKAN_PCES3_1; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(41,61): error: use of undeclared identifier 'SP_VULKAN_PCES3_1' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES3_1] = SP_VULKAN_PCES3_1; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(42,3): error: use of undeclared identifier 'GShaderPlatformForFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::SM4] = SP_VULKAN_SM4; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(42,34): error: use of undeclared identifier 'ERHIFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::SM4] = SP_VULKAN_SM4; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(42,59): error: use of undeclared identifier 'SP_VULKAN_SM4' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::SM4] = SP_VULKAN_SM4; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(43,3): error: use of undeclared identifier 'GShaderPlatformForFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::SM5] = SP_VULKAN_SM5; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(43,34): error: use of undeclared identifier 'ERHIFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::SM5] = SP_VULKAN_SM5; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/../VulkanGenericPlatform.h(43,59): error: use of undeclared identifier 'SP_VULKAN_SM5' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::SM5] = SP_VULKAN_SM5; LogPlayLevel: ^ LogPlayLevel: In file included from D:/UnrealProject/TestAndroid/Intermediate/Build/Android/Test421_all/Development/VulkanRHI/Module.VulkanRHI.1_of_3.cpp:2: LogPlayLevel: In file included from D:\Build\Release-4_21_0\Engine\Source\Runtime\VulkanRHI\Private\Android\VulkanAndroidPlatform.cpp:13: LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/VulkanAndroidPlatform.h(60,3): error: use of undeclared identifier 'GShaderPlatformForFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES2] = SP_VULKAN_ES3_1_ANDROID; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/VulkanAndroidPlatform.h(60,34): error: use of undeclared identifier 'ERHIFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES2] = SP_VULKAN_ES3_1_ANDROID; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/VulkanAndroidPlatform.h(60,59): error: use of undeclared identifier 'SP_VULKAN_ES3_1_ANDROID' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES2] = SP_VULKAN_ES3_1_ANDROID; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/VulkanAndroidPlatform.h(61,3): error: use of undeclared identifier 'GShaderPlatformForFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES3_1] = SP_VULKAN_ES3_1_ANDROID; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/VulkanAndroidPlatform.h(61,34): error: use of undeclared identifier 'ERHIFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES3_1] = SP_VULKAN_ES3_1_ANDROID; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/VulkanAndroidPlatform.h(61,61): error: use of undeclared identifier 'SP_VULKAN_ES3_1_ANDROID' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::ES3_1] = SP_VULKAN_ES3_1_ANDROID; LogPlayLevel: ^ LogPlayLevel: Error: D:/Build/Release-4_21_0/Engine/Source/Runtime/VulkanRHI/Private/Android/VulkanAndroidPlatform.h(62,3): error: use of undeclared identifier 'GShaderPlatformForFeatureLevel' LogPlayLevel: GShaderPlatformForFeatureLevel[ERHIFeatureLevel::SM4] = SP_NumPlatforms; LogPlayLevel: ^ LogPlayLevel: Error: fatal error: too many errors emitted, stopping now [-ferror-limit=] LogPlayLevel: 20 errors generated. LogPlayLevel: Error executing C:\NVPACK\android-ndk-r14b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe (tool returned code: 1) LogPlayLevel: ---------------------- Done ---------------------- LogPlayLevel: Rebuild All: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped LogPlayLevel: Took 2.2823151s to run xgConsole.exe, ExitCode=1 LogPlayLevel: Error: ERROR: Command failed (Result:1): C:\Program Files (x86)\Xoreax\IncrediBuild\xgConsole.exe "D:\Build\Release-4_21_0\Engine\Programs\AutomationTool\Saved\Logs\UAT_XGE.xml" /Rebuild /NoLogo /ShowAgent /ShowTime /no_watchdog_thread. See logfile for details: 'xgConsole-2018.12.06-11.51.59.txt' LogPlayLevel: (see D:\Build\Release-4_21_0\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace) LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown) LogPlayLevel: Completed Launch On Stage: Build Task, Time: 9.250432 LogPlayLevel: BUILD FAILED PackagingResults: Error: Launch failed! Unknown Error
After adding #include "RHI.h" to VulkanGenericPlatform.h, this issue does not occur.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-67241 in the post.
0 |
Component | UE - Graphics Features |
---|---|
Affects Versions | 4.21 |
Target Fix | 4.22 |
Created | Dec 6, 2018 |
---|---|
Resolved | Dec 12, 2018 |
Updated | Sep 16, 2019 |