Menu Close

UE4.23.1 packaging to Linux ARM

This are my old notes about “HowTo_UE4_LinuxArm64.txt”, I’m saving and sharing here if anyone else wants to try.

You need access to Unreal Engine 4.23.1 Source Code, download it and build it one time to assure everything is working. I used the path D:\Unreal\UE_4.23 .

Reference and additional info:
I used this tutorial, it’s outdated and it breaks with newer UE4 versions: (backup link)

Preparing to cross-compile to Linux ARM :
Install the full CLang8 from .
I used the path D:\Unreal\clang8 . Be careful with spaces on your folder name or paths because it can cause troubles later.

Install the additional CLang8 package for Linux ARM architeture from
Unzip all folders (bin, include, lib, etcs) to clang8\arm-unknown-linux-gnueabihf .
Duplicate the arm-unknown-linux-gnueabihf to another folder named aarch64-unknown-linux-gnueabi .

Download the Unreal Engine 4 Linux-x86_64 cross compile toolchain binaries from
Unzip and copy arm-linux-gnueabihf to clang8\arm-unknown-linux-gnueabihf .
Unzip and copy aarch64-unknown-linux-gnueabi to clang8\aarch64-unknown-linux-gnueabi .
Overwrite duplicates.

Change UE4.23.1 Source:
File :
VSSolutionExplorer :

Change the following lines:
static private string DefaultArchitecture = “x86_64-unknown-linux-gnu”;
//static private string DefaultArchitecture = “x86_64-unknown-linux-gnu”;

//static private string DefaultArchitecture = “aarch64-unknown-linux-gnueabi”;
static private string DefaultArchitecture = “aarch64-unknown-linux-gnueabi”;

Build UnrealBuildTool with this changes.
Change aarch64-unknown-linux-gnueabi to arm-unknown-linux-gnueabihf if you want to build packages to Linux Arm 32bits OS (like Raspberry Pi, Asus Thinkerboard and others SBCs).

Change your UE4 Project:
Edit your UE4Project\Config\DefaultEngine.ini, find or add the following lines :

; Possible values for architecture:
;   X86_64UnknownLinuxGnu
;   ArmUnknownLinuxGnueabihf
;   AArch64UnknownLinuxGnueabi

Change TargetArchitecture to TargetArchitecture=AArch64UnknownLinuxGnueabi
Or TargetArchitecture=ArmUnknownLinuxGnueabihf (for Linux Arm 32bits OS).

Right-click your UE4Project .project file , “Switch Unreal Engine Version” and make sure it’s using your UE4 compiled source code.

Change your Enviroment Variables:
Create an environment variable LINUX_MULTIARCH_ROOT with the folder path to your clang++ v8 directory containing the multiple linux architecture directories.
Create an environment variable of UE4_LINUX_USE_LIBCXX to 0.

Reboot your PC.

Try to package your project to Linux in UE4.
If everything worked, it will create an Linux Arm64 package.
If something fails, read the Errors and Fixes below.

If you turn off AmbientOcclusion and do some tweaks on scalability settings , set the resolution to 720p (ex: 1080p fullscreen set r.ScreenPercentage to 50) it can run Unreal Engine blank project template at 60fps on Nvidia Jetson Nano .

Nvidia Jetson Nano UE4LinuxArm64Vulkan screenshot

Sample UE4LinuxArm64 Vulkan:
Download here . (73.8 MB)
This sample only works with Linux Arm64 OS with Vulkan drivers (ex: Nvidia Jetson Nano and other Nvidia Jetsons). It doesn’t run on Raspberry PI (yet) because the new Vulkan Driver is currently working only on Linux Arm32 OS.

Any sample for LinuxArm32 or LinuxArm64 with OpenGL to test on Raspberry PI?
Not yet. My PC power supply died while I was upgrading my nvme to 1TB… Bad luck… It will take a few weeks before I’m able to try to reinstall everything and apply this instructions again.

Errors and Fixes:
Err: Third-party or plugin errors:
Fix: Duplicating the Third-party linux_x86 folders to linux_arm64 copies.

UATHelper: Packaging (Linux): [236/372] Module.Core.6_of_11.cpp
UATHelper: Packaging (Linux): D:/UnrealEngine/Engine/Source/Runtime/Core/Private/Misc/AutomationTest.cpp(1074,27): note: to match this ‘(‘
UATHelper: Packaging (Linux): AddError(FString::Printf(TEXT(“Expected ‘%s’ to be %” PRId64 “, but it was %” PRId64 “.”), What, Expected, Actual), 1);
UATHelper: Packaging (Linux): ^
UATHelper: Packaging (Linux): 1 error generated.
PackagingResults: Error: expected ‘)’
UATHelper: Packaging (Linux): [237/372] Module.Core.9_of_11.cpp
Find and change the bold line to
AddError(FString::Printf(TEXT(“Expected ‘%s’ to be %d, but it was %d.”), What, Expected, Actual), 1);

“This version of the Unreal Engine can only be compiled with clang 8.0, 7.0 and 6.0. clang {0} may not build it – please use a different version.”
Comment LinuxToolChain.cs lines 180:
//throw new BuildException(
// string.Format(“This version of the Unreal Engine can only be compiled with clang 8.0, 7.0 and 6.0. clang {0} may not build it – please use a different version.”,
// CompilerVersionString)
// );

ERROR: Unhandled exception: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
This happens when you change something on Project Settings and the engine changes your .ini . Edit your UE4Project\Config\DefaultEngine.ini and add TargetArchitecture again.

Additional references:
Not exactly LinuxARM but this video cover almost the same process described here:

How to Cross-Compile for Linux in Unreal Engine - Setting up the Toolchain
Watch this video on YouTube.

PS: To the person at Epic Games that maintains Linux ARM on Unreal Engine, you’re my hero||heroine!


1 Comment

  1. Anonymous

    This reference is greatly appreciated. I’ve been looking for some Nano/ARMUE4-related build process information, and this is exactly what I needed. So glad you left it for others to find! Also, your “about” is empty… on purpose? Man of mystery!


Comments are welcome.

%d bloggers like this: