[ARM] Linux Compile for ARM

“the toolchain is not yet public, but if you want we can make it available.”

YES PLEASE, i would like to have some instruction on how to compile UE4 for ARM

I would also be interested in getting a working toolchain and tips for any other code modifications, as I want to try getting the Oculus Rift DK2 working with my Tegra TK1 Jetson board.

The link to the toolchain that allows you to compile UE4 for ARM Linux: https://s3.amazonaws.com/unrealengine/qfe/arm-unknown-linux-gnueabihf_v5_clang-3.5.0-ld-2.23.1-glibc-2.13.zip

Note that the toolchain itself runs on Windows (the set up is basically the same as our normal cross-toolchain for x64 Linux). To make UBT choose ARM, you need to edit UEBuildLinux.cs and set DefaultArchitecture to “arm-unknown-linux-gnueabihf”.

You of course need third-party ARM libraries (which are included for 4.6 and should be picked up by UBT automatically).

You can build server, games and programs. You cannot build the editor (e.g. because there’s no FBX for ARM, although you may try working around that). Note that for all targets except the server you will need a desktop GL (currently only Jetson has it).

Problem, I DL the 4.6.1 and in the

UEBuildLinux.cs

there is no:
DefaultArchitecture to “arm-unknown-linux-gnueabihf”.

am I missing something?

There is a variable called DefaultArchitecture, please set it to that value (take a look at lines 24-26).

I minor issue, the same game I compiled works on PC, but when it is for ARM Linux, it will crash when there is an audio play back (this does not occur in the PC/Windows)

It may be because libopenal.so (and other .so) in Engine/Binaries/Linux are still x86-64. There’s currently no separate, per-architecture directories for run-time libraries, so you need to pay extra attention when deploying an ARM build.

does that means i have some files need to compile in VS2013? or does it means there is no runtime file for ARMs at all?(until Epic update them?)

Neither of these. A subset of .so files that the engine links against (notably OpenAL) needs to be placed in Engine/Binaries/Linux directory. Since Binaries/Linux directory does not have architecture-specific sub-directories (which need to be added to rpath), only x86 files are present there by default.

For now, when packaging for Linux ARM, you need to take care of that manually, replacing x64 libraries by respective ARM ones, which can be found in Engine/Source/ThirdParty/*.

I have compiled all the information here and add them to the cross compile for linux wiki page (A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums). Have also verified for myself that these steps allowed me compile, package, and run SunTemple demo for Jetson TK1. Please review and correct or let me know if there are any mistakes.

Thanks.

the only ARM specific so file I found in 3rd party:

libopenal.so
libopenal.so.1

those 2 files replace the one :> C:\UnrealEngine-4.6.1-release\Engine\Binaries\Linux

but it still crash when audio triggered… is there s specific log that indicate the crash?

Feel free to post a callstack you get (you should be getting it in the *.log file, but you can also run under gdb and do a bt). I think opening a new AnswerHub question would be more appropriate for it (other users will have it easier to discover without having to read all the thread above).

Hi,
Just to clarify, you are replacing the libopenal.so.1 in the packaged output of the project right ? Also is there a publicly available project that runs into the same issue you are seeing ? I can give it a look.

Thanks

I replaced both libopenal.so & libopenal.so.1 to the C:\UnrealEngine-4.6.1-release\Engine\Binaries\Linux

can you show me where is the tread discussion?

hum… even following the wiki page still crash…

Hi, I received through email your comment that you can’t find libopenal.so for linux-arm, which seems to have been solved. For some reason I can’t find that comment here. Does this mean you were previously using a different file for libopenal.so ? If so does using the new file fix the crash issue ?

it turn out that my Jetson’s audio is not functional in Linux, it shows no audio devices, that is why i believe is the problem… does your audio works? or does it show a X on the speaker?

My regular install of Jetson TK1 has audio working. I verified this by plugging in a headphone and doing a sound test from within ubuntu. I didn’t do anything special. It seemed to work from just standard installation. Unfortunately I don’t think SunTemple has audio. Do you have any simple demo app with audio that I can try ?

got the solution, just need to flash it differently

Hi! I’m stuck on this last step (replacing the libopenal.so file). I’m on UE4.19 and have successfully built a simple project for Linux ARM, but when I go to the release directory\Engine\Binaries\Linux, there’s only one file: UE4Game-Linux-Shipping.

Does this mean we don’t need to replace libopenal.so anymore on UE4.19?

Thanks a lot in advance :slight_smile: