Cross compiling for arm Linux

Hello,

I tried to cross compil for arm Linux. I follow this tutorial [link text][1] but, after edit the UEBuildLinux.cs files and un-comment “static private string DefaultArchitecture = “arm-unknown-linux-gnueabihf”;”, I have an issue with the files GenerateProjectFiles.bat.

I have these messages :
Linux\UEBuildLinux.cs(22,25): error CS0122: ‘LinuxPlatform.DefaultArchitecture’ est inaccessible en raison de son nivea
u de protection [D:\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
Linux\UEBuildLinux.cs(377,55): error CS0122: ‘LinuxPlatform.DefaultArchitecture’ est inaccessible en raison de son nive
au de protection [D:\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
Linux\UEBuildLinux.cs(379,127): error CS0122: ‘LinuxPlatform.DefaultArchitecture’ est inaccessible en raison de son niv
eau de protection [D:\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
Linux\UEBuildLinux.cs(207,31): warning CS0414: Le champ ‘LinuxPlatform.DefaultArchitecture’ est assigné, mais sa valeur
n’est jamais utilisée [D:\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]

I have the toolchain clang-3.5-arm installed and in LINUX_ROOT.
I don’t see what is the issue
[1]: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Cross-compiling for ARM in 4.13 requires more major changes. I hope to fix it for the next release.

The 4.13.1 or 4.14 ?

I would also like an ETA if you have one RCL :slight_smile: In the mean time will cross compilation work on 4.11 / 4.12?

was cross-compiling for ARM fixed in 4.14?
I have 4.14 and I can’t package the project, already followed all the steps in the wiki page, and I have clang-3.5-arm installed.
I’m using the binary version (from the Epic Launcher).
I keep getting redirected to the wiki “get started with linux” page.

I don’t try since 4.13

For 4.14, cross-compiling for ARM has been fixed. However you should use not the old clang-3.5-based separate cross-toolchain, but v8 toolchain that has support for all architectures.

In 4.15, compiling for different architectures became even easier. Now it is a matter of changing TargetArchitecture setting in your project’s DefaultEngine.ini.

There is no need to create GameServer.Target.cs ?
A new way, easier, exist for build a dedicated server on bots Windows and Linux ?

There was never a need to change .Target.cs file for the architecture. In 4.13 and 4.14 you would have to change UBT (UEBuildLinux.cs), in 4.15 you change TargetArchitecture in DefaultEngine.ini of your project (section [/Script/LinuxTargetPlatfrom.LinuxTargetSettings])

Can you please give an example (or a link to documentation) of how to set TargetArchitecture in DefaultEngine.ini for Linux ARM 64?

Not sure if the documentation is out yet, but here you are:

  1. Download v8 crosstoolchain from http://cdn.unrealengine.com/qfe/v8_clang-3.9.0-centos7.zip
  2. Set up LINUX_MULTIARCH_ROOT to point to its absolute location
  3. In your project, edit DefaultEngine.ini and add the section like this one: https://github.com/EpicGames/UnrealEngine/blob/4.15/Engine/Config/BaseEngine.ini#L2697
  4. Change TargetArchitecture to be either ArmUnknownLinuxGnueabihf or AArch64UnknownLinuxGnueabi dependeing on whether you target 32-bit or 64-bit ARM.
  5. Rebuild the Linux binary

Hi,
Thank you for your answer!
I followed your instructions, finally got it to package the project. However, the generated file is probably still in x86-64 and not ARM64 (I can’t run it on Linux ARM64, and when I look at the properties, it says the file is x86-64).

When you wrote “Rebuild the Linux binary”, did you mean to package the project again?
I’m using the 4.15 version from Epic Games Launcher (don’t know if it matters or not)

I thought so … What should I do in my case? (binary version from launcher, not full source version)

No, I meant building UE4Game in Linux Development from scratch (e.g. “rebuild” in Visual Studio).

I am afraid packaging for other architectures is impossible from a binary build, you need to download the sources and build from them :frowning: