Packaging Linux ARM64, exec format error

I’m trying to package on Windows for Linux ARM64 (Jetson running Ubuntu).
I have 4.15 (installed from Epic Game Launcher) and did all the steps:

  • Used latest clang cross compiler (3.9.0)
  • set both LINUX_ROOT and LINUX_MULTIARCH_ROOT to correct paths
  • changed DefaultEngine.ini in my project to have the section:
    [/Script/LinuxTargetPlatform.LinuxTargetSettings]
    TargetArchitecture=AArch64UnknownLinuxGnueabi

I managed to package the project, but couldn’t run it on Linux.
I tried to run the file UE4Game in LinuxNoEditor\Engine\Binaries\Linux, but I got an error:

“Cannot execute binary file: Exec format error”.

When I looked at the file properties, it wrote:

ELF 64-bit LS executable, x86-64, version a (SYSV)

I’m new to Linux and UE4 so I might be doing something wrong, but it looks like although I tried to package for Linux ARM, it packaged for x86-64.

Also, wasn’t there supposed to be a “*.out” file?

1 Like

Hey ronir-

In your LinuxNoEditor folder, right click on the ProjectName.sh file and select Properties. In the new window, go to the Permissions tab and set the check box for “Allow executing file as program”. Running ./ProjectName.sh from the terminal window should launch the game as expected.

Cheers

I have also met this on 4.27 branch, and I’m using Jetson Orin.
Is there any command from consol can solve the issue?

~/UnrealEngine$ ./Setup.sh
Registering git hooks… (this will override existing ones!)
Fixing inconsistent case in filenames.
Setting up Mono
Engine/Build/BatchFiles/Linux/GitDependencies.sh: line 25: /home/daniel/UnrealEngine/Engine/Build/BatchFiles/Linux/…/…/…/Binaries/ThirdParty/Mono/Linux/bin/mono: cannot execute binary file: Exec format error
Result: 126

I have changed build script, but it seems doesn’t work.

— a/Engine/Build/BatchFiles/Linux/SetupMono.sh
+++ b/Engine/Build/BatchFiles/Linux/SetupMono.sh
@@ -5,7 +5,8 @@
START_DIR=pwd
cd “$1”

-export HOST_ARCH=x86_64-unknown-linux-gnu
+#export HOST_ARCH=x86_64-unknown-linux-gnu
+export HOST_ARCH=x86_64_aarch64-linux-gnu