# Unable to cross-compile for Linux-ARM

**URL:** <https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171>\
**Category:** Platform & Builds\
**Tags:** cross-compiling, arm, Linux, unreal-engine, question\
**Created:** [July 31, 2015, 12:39pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171 "2015-07-31T12:39:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![StrangerGwenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strangergwenn/32/983202_2.png) [@StrangerGwenn](https://forums.unrealengine.com/u/StrangerGwenn)\
**Post date:** [July 31, 2015, 12:39pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/1 "2015-07-31T12:39:52Z")

</div>

Cross-compiling with clang 3.5 doesn’t work. Here is tht output at link time for CrashReportClient-Linux-Development ; UE4Game will do the same.

```
1> [24/24] Link CrashReportClient-Linux-Development
1> D:/Unreal/UnrealEngine-release/UnrealEngine-release/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/arm-unknown-linux-gnueabihf/libSDL2.a(SDL_rpivideo.c.o): In function `RPI_CreateWindow':
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpivideo.c:256: undefined reference to `vc_dispmanx_update_start'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpivideo.c:257: undefined reference to `vc_dispmanx_element_add'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpivideo.c:260: undefined reference to `vc_dispmanx_update_submit_sync'
1> D:/Unreal/UnrealEngine-release/UnrealEngine-release/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/arm-unknown-linux-gnueabihf/libSDL2.a(SDL_rpivideo.c.o): In function `RPI_VideoInit':
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpivideo.c:151: undefined reference to `bcm_host_init'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpivideo.c:155: undefined reference to `graphics_get_display_size'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpivideo.c:178: undefined reference to `vc_dispmanx_display_open'
1> D:/Unreal/UnrealEngine-release/UnrealEngine-release/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/arm-unknown-linux-gnueabihf/libSDL2.a(SDL_rpimouse.c.o): In function `RPI_WarpMouseGlobal':
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:231: undefined reference to `vc_dispmanx_update_start'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:233: undefined reference to `vc_dispmanx_rect_set'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:234: undefined reference to `vc_dispmanx_element_change_attributes'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:246: undefined reference to `vc_dispmanx_update_submit'
1> D:/Unreal/UnrealEngine-release/UnrealEngine-release/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/arm-unknown-linux-gnueabihf/libSDL2.a(SDL_rpimouse.c.o): In function `RPI_FreeCursor':
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:192: undefined reference to `vc_dispmanx_update_start'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:194: undefined reference to `vc_dispmanx_element_remove'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:196: undefined reference to `vc_dispmanx_update_submit_sync'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:201: undefined reference to `vc_dispmanx_resource_delete'
1> D:/Unreal/UnrealEngine-release/UnrealEngine-release/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/arm-unknown-linux-gnueabihf/libSDL2.a(SDL_rpimouse.c.o): In function `RPI_ShowCursor':
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:155: undefined reference to `vc_dispmanx_rect_set'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:156: undefined reference to `vc_dispmanx_rect_set'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:158: undefined reference to `vc_dispmanx_update_start'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:161: undefined reference to `vc_dispmanx_element_add'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:172: undefined reference to `vc_dispmanx_update_submit_sync'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:123: undefined reference to `vc_dispmanx_update_start'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:125: undefined reference to `vc_dispmanx_element_remove'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:127: undefined reference to `vc_dispmanx_update_submit_sync'
1> D:/Unreal/UnrealEngine-release/UnrealEngine-release/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/arm-unknown-linux-gnueabihf/libSDL2.a(SDL_rpimouse.c.o): In function `RPI_CreateCursor':
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:81: undefined reference to `vc_dispmanx_resource_create'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:83: undefined reference to `vc_dispmanx_rect_set'
1> /home/rcl/build/2015-05-01/SDL-gui-backend/src/video/raspberry/SDL_rpimouse.c:90: undefined reference to `vc_dispmanx_resource_write_data'

```

I have no idea where this RPi stuff comes from, Iam not targetting Raspberry at all.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [August 4, 2015, 3:59pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/2 "2015-08-04T15:59:54Z")

</div>

Hey -

You may want to check the wiki page for compiling on Linux ([A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums](https://wiki.unrealengine.com/Compiling_For_Linux)) There is a specific section at the bottom of the page dealing with additional steps for Linux-ARM.

Cheers

---

<div class="post-metadata">

**Author:** ![StrangerGwenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strangergwenn/32/983202_2.png) [@StrangerGwenn](https://forums.unrealengine.com/u/StrangerGwenn)\
**Post date:** [August 10, 2015, 7:34am UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/3 "2015-08-10T07:34:07Z")

</div>

Hi ,

Unfortunately I am already following this guide. The first “Setup” step fails, I can’t even build the engine in the first place.

I have reset my working dir, reinstalled dependencies, removed the project files and rebuilt from scratch, but nothing changes. Can you try to reproduce the issue ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [August 11, 2015, 2:29pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/4 "2015-08-11T14:29:47Z")

</div>

Hey -

I tried to setup cross-compile as well. I did not get the same errors you posted however it did not complete successfully. I have entered a report about this (Ue-19887) for further investigation.

Cheers

---

<div class="post-metadata">

**Author:** ![StrangerGwenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strangergwenn/32/983202_2.png) [@StrangerGwenn](https://forums.unrealengine.com/u/StrangerGwenn)\
**Post date:** [August 12, 2015, 9:43am UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/5 "2015-08-12T09:43:09Z")

</div>

Hi Dough, thanks for the update.

For the record I tried reproducing the process with clean source builds on the latest releases from Github :

- 4.8.3 fails with the issue described ;
- 4.9.0 fails with a different error.

Here is the build log for 4.9.3 when building UnrealPak.

```
1> [4/12] Compile Module.Json.cpp
1> In file included from F:\UnrealEngine-4.9.0-preview-3\Engine\Intermediate\Build\Linux\x86_64-unknown-linux-gnu\UnrealPak\Development\PakFile\Module.PakFile.cpp:2:
1> In file included from F:\UnrealEngine-4.9.0-preview-3\Engine\Source\Runtime\PakFile\Private\IPlatformFilePak.cpp:3:
1> In file included from F:\UnrealEngine-4.9.0-preview-3\Engine\Source\Runtime\PakFile\Private/PakFilePrivatePCH.h:5:
1> In file included from Runtime/Core/Public\Core.h:16:
1>Runtime/Core/Public/HAL\PlatformIncludes.h(5,10): fatal error : 'new' file not found

```

The same thing happens with UE4.

```
1> [4/203] Compile UdpMessaging.generated.cpp
1> In file included from F:\UnrealEngine-4.9.0-preview-3\Engine\Intermediate\Build\Linux\x86_64-unknown-linux-gnu\UE4\Development\Renderer\RendererPrivate.h:4:
1> In file included from F:\UnrealEngine-4.9.0-preview-3\Engine\Source\Runtime\Renderer\Private\RendererPrivate.h:10:
1> In file included from Runtime/Engine/Public\Engine.h:9:
1> In file included from Runtime/Core/Public\Core.h:16:
1>Runtime/Core/Public/HAL\PlatformIncludes.h(5,10): fatal error : 'new' file not found

```

I’m currently evaulating the Unreal Engine for projects on Linux-ARM ; is this target supported ?

Thanks,

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [August 12, 2015, 5:49pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/6 "2015-08-12T17:49:40Z")

</div>

The “new” file error looks unrelated, please make sure that you are using ARM cross toolchain as the sysroot will be different.

I fixed the ARM builds in this commit (applicable to 4.9.x and 4.8.x, but it’s unclear whether it is going to be merged to these branches): [https://github.com/EpicGames/UnrealEngine/commit/929c1047523829cf9d16be05e78f246034590589](https://github.com/EpicGames/UnrealEngine/commit/929c1047523829cf9d16be05e78f246034590589) - you can cherry pick it to your repo.

Regarding Linux ARM support: we provide libraries and the cross-toolchain that make compilation possible with only slight changes; however, we do not CIS nor test ARM Linux builds.

---

<div class="post-metadata">

**Author:** ![StrangerGwenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strangergwenn/32/983202_2.png) [@StrangerGwenn](https://forums.unrealengine.com/u/StrangerGwenn)\
**Post date:** [August 12, 2015, 5:52pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/7 "2015-08-12T17:52:45Z")

</div>

The two different errors are yielded by the same toolchain - the 3.5 cross clang linked on the Wiki. I have 4.8.3 and 4.9 P3 installed from source in a folder and they use the exact same setup, both were downloaded this morning.

I will try your commit ASAP.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [August 12, 2015, 5:59pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/8 "2015-08-12T17:59:56Z")

</div>

You might have not changed DefaultArchitecture in UEBuildLinux.cs for 4.9 then, and it is still trying to pass -target x86\_64…

---

<div class="post-metadata">

**Author:** ![StrangerGwenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strangergwenn/32/983202_2.png) [@StrangerGwenn](https://forums.unrealengine.com/u/StrangerGwenn)\
**Post date:** [August 12, 2015, 6:10pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/9 "2015-08-12T18:10:35Z")

</div>

Actually I’m pretty sure I did since I had the file opened side by side for both UE versions, but I will confirm tomorrow when I’m back at work.

Thank you for your support.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [August 12, 2015, 6:12pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/10 "2015-08-12T18:12:41Z")

</div>

You’re welcome. Judging by your logs (where intermediate directory is named “x86\_64-unknown-linux-gnu”) UEBuildLinux.cs was not switched to ARM; that switch + the commit should get it built.

---

<div class="post-metadata">

**Author:** ![StrangerGwenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strangergwenn/32/983202_2.png) [@StrangerGwenn](https://forums.unrealengine.com/u/StrangerGwenn)\
**Post date:** [August 12, 2015, 6:14pm UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/11 "2015-08-12T18:14:41Z")

</div>

My mistake then. Thanks a lot for the quick fix !

---

<div class="post-metadata">

**Author:** ![StrangerGwenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strangergwenn/32/983202_2.png) [@StrangerGwenn](https://forums.unrealengine.com/u/StrangerGwenn)\
**Post date:** [August 13, 2015, 9:05am UTC](https://forums.unrealengine.com/t/unable-to-cross-compile-for-linux-arm/327171/12 "2015-08-13T09:05:45Z")

</div>

I can confirm that the patch fixes the build issues.
