Linux Build v4.7.4

I am trying to get UE4 built using clang on Windows and I am getting an error when trying to build it.

1>------ Build started: Project: UE4, Configuration: Linux_Development_Editor Win32 ------
1>  cmd.exe  /C "cmd.exe /C "C:\Development\Epic Games\Source\UnrealEngine\Engine\Intermediate\Build\Linux\x86_64-unknown-linux-gnu\UE4Editor\Development\FixDependencies.bat" && echo "" >> "C:\Development\Epic Games\Source\UnrealEngine\Engine\Intermediate\Build\Linux\x86_64-unknown-linux-gnu\UE4Editor\Development\" && copy /b "C:\Development\Epic Games\Source\UnrealEngine\Engine\Intermediate\Build\Linux\x86_64-unknown-linux-gnu\UE4Editor\Development\" +,,"
1>  Performing 125 actions (4 in parallel)
1>  [1/125] Link
1>  C:\Programs\v4_clang-3.5.0_ld-2.24_glibc-2.12.2	oolchain\bin\x86_64-unknown-linux-gnu-ld.exe: cannot find -lLND
1>clang++.exe : error : linker command failed with exit code 1 (use -v to see invocation)
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\Development\Epic Games\Source\UnrealEngine\Engine\Binaries\Linux\
1>  Cumulative action seconds (4 processors): 0.00 building projects, 0.00 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.15 linking, 0.00 other
1>  UBT execution time: 23.73 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UE4Editor Linux Development" exited with code -1.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

This worked prior to upgrading to 4.7.4.

I can’t find any information on this and I suspect that this might be an issue. Can anyone verify whether they are experiencing the same.

I think your title is a little miss-leading, you are building on windows not linux. And no you can’t, as far as I know, crosscompile the editor from windows to linux.

Yes building for Linux in Visual Studio … here are the steps I followed.

  1. Installed clang to “C:\Programs\v4_clang-3.5.0_ld-2.24_glibc-2.12.2”
  2. Set up my LINUX_ROOT environment variable to point to the path above
  3. Cloned the latest release version from GITHUB
  4. Ran Setup.bat
  5. Ran GenerateProjectFiles.bat
  6. Open UE4.sln file in Visual Studio
  7. Set my target to Development_Editor
  8. Built the 64BIT version of the Development_Editor for Window
  9. Try to build the same project for Linux … I get the error above

Compiling For Linux

I am also getting this error when I am trying to package for Linux.

MainFrameActions: Packaging (Linux): UnrealBuildTool: C:\Development\Gobbo Games\Kaboom Arena\KaboomArena\Intermediate\Build\Linux\x86_64-unknown-linux-gnu\KaboomArena\Shipping\KaboomArena\KaboomArena.h(4,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'C:\Development\Gobbo Games\
MainFrameActions: Packaging (Linux): Kaboom Arena\KaboomArena\Source\KaboomArena\KaboomArena.h', but encoding is not supported
MainFrameActions: Packaging (Linux): UnrealBuildTool: #include "C:\Development\Gobbo Games\Kaboom Arena\KaboomArena\Source\KaboomArena\KaboomArena.h"
MainFrameActions: Packaging (Linux): UnrealBuildTool:          ^
MainFrameActions: Packaging (Linux): UnrealBuildTool: 1 error generated.


To better understand this, you are just trying to cook/package your project for Linux, in Windows, correct?

You would build or use the Windows UE4Editor just as normal, but additionally, you need to compile UE4Game for Linux using Visual Studio. I generally compile Test build as it’s not Development and not Release, so it still has a bit of debugging and console works OOB (iirc, in Release I couldn’t get the console working without changing .ini).

After you compile the UE4Game, go to Engine/Binaries/Linux and rename UE4Game-Test-Linux to just UE4Game, as packager will complain it can’t find it otherwise (pattern matching seems to be broken?)

From there you just need to Package your project for Linux inside the Editor and select the staging folder.

The last error about include is just not right. All paths should be relative to your project/module - how did that C:\ come up?

Hey amigo … always wanted to say that. 8-}

That is the problem … I can’t build UE4 binaries from Linux using the source code version of the engine and I can’t package it for Linux either.

The last is error is what I don’t understand either … as stated … this was working prior to 4.7.4 … so I am not sure if there is a new issue in 4.7.4.

Hmm, I run epic/master and have not had any problems at all with cooking and packaging. I just built a Test build for Linux of UE4Game in VS - had no errors.

But master is generally unstable so not something anyone should use for real work. :slight_smile:

You also say you couldn’t build FROM Linux either, but that’s because you were using epic/4.7 branch, right?

Did you try our community branch at my repo (3dluvr/4.7-linux), because that one works really nicely in Linux. It has bunch of fixes that couldn’t make it for 4.7 release as well.

I also synced it last night with epic/4.7 so it’s up to date with it as well, 4.7.5 atm.

Hey amigo … I will give it a bash now. Thanks for the information … I will get back to you. 8-}