x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Build for linux on windows in 4.14

Hi

I want to package my game for linux (on windows) - so I'v installed CLANG, configured all the envs, and now I'm compiling (from vc) Shipping|Linux [after long long struggle with FMOD and other third party libs] - my 'main' executable is built (BTW it's huge - 1.2 GB :/ (it's 103MB on windows))

12> Performing 1 actions (9 in parallel) 12> [1/1] Link MySuperGame-Linux-Shipping 12> Total build time: 112,83 seconds

but the other one fails:

9> Using LINUX_MULTIARCH_ROOT, building with toolchain 'f:\CLANG\x86_64-unknown-linux-gnu' 9> Performing 2 actions (9 in parallel) 9> [1/2] Compile BootstrapPackagedGame.cpp 9> In file included from D:\Unreal\Projects\UnrealEngine4\UE4_14_CONSOLES\Engine\Source\Programs\Windows\BootstrapPackagedGame\Private\BootstrapPackagedGame.cpp:3: 9>D:\Unreal\Projects\UnrealEngine4\UE4_14_CONSOLES\Engine\Source\Programs\Windows\BootstrapPackagedGame\Private/BootstrapPackagedGame.h(5,10): fatal error : 'windows.h' file not found 9> #include 9> ^ 9> 1 error generated. 9>ERROR : UBT error : Failed to produce item: D:\Unreal\Projects\UnrealEngine4\UE4_14_CONSOLES\Engine\Binaries\Linux\BootstrapPackagedGame-Linux-Shipping 9> Total build time: 115,49 seconds

obviously BootstrapPackagedGame.h is taken from WRONG directory - why - I'm missed some setup ? (I'm using latest 4.14 from unreal perforce, I'm able to successfully package both for ps4 and xbox1, so my setup seems to be correct for most of the part ...)

Product Version: UE 4.14
Tags:
more ▼

asked Feb 04 '17 at 02:55 PM in Packaging & Deployment

avatar image

Mariusz.Szaflik
31 1 3 4

avatar image 锋之痕 Feb 06 '17 at 02:49 AM

You also need to rerun Setup.bat or .../UnrealEngine/Engine/Binaries/DotNET/GitDependencies.exe because that step will grab/copy libc++ stuff to .../UnrealEngine/Engine/Source/ThirdParty/Linux/LibCxx/. Otherwise, cross-compiling will fails with saying it cannot find standard C++ headers. If you haven't explicitly defined and set an environment variable of UE4_LINUX_USE_LIBCXX to 0, cross-compiling will use libc++ headers/libraries in there by default instead of the one inside the clang toolchain.

For packaging for Linux platforms (both x86_64 and ARM) the CrashReportClient is also needed to be built for the Linux configuration in addition to the default UE4Game project.

Notice that you may want to (re)build the Editor for your platform to get Linux target modules built. They are built for your current platform (i.e. select Win64 in configuration), and they are needed so that Unreal Editor and Unreal Frontend know how to cook/package games for Linux.

Note: If packaging for Linux (see below) fails it may be necessary to explicitly build UnrealPak and ShaderCompileWorker for the host platform, which in this case is windows (Win32 or Win64). To do this right-click on each of this project in the solution explorer and execute the "Build" command.

avatar image Doug E ♦♦ STAFF Feb 06 '17 at 05:55 PM

Hey Mariusz-

There is a that describes the process of packaging a project for Linux from a Windows machine: https://wiki.unrealengine.com/Compiling_For_Linux . Please let me know if you're able to follow the steps provided and package your project or, if you do run into errors, please detail where in the process the error occurs.

avatar image aspartamed Jun 15 '17 at 06:45 PM

I attempted to follow these steps and ran into similar errors. I get these errors When trying to build the Linux Target from the unreal source

 5>  In file included from Programs/UnrealLightmass/Private/LightmassCore\LMCore.h:12:
 5>Programs/UnrealLightmass/Private/LightmassCore/Misc\LMStats.h(11,27): error : definition of builtin function '__rdtsc'
 5>  inline unsigned long long __rdtsc()
 5>                            ^
 5>  In file included from D:\dev\UnrealEngineSource_latest\UnrealEngine\Engine\Intermediate\Build\Linux\B4D820EA\UnrealLightmass\Development\UnrealLightmass\Module.UnrealLightmass.1_of_3.cpp:2:

 
 9>  [1/2] Compile BootstrapPackagedGame.cpp
 9>  In file included from D:\dev\UnrealEngineSource_latest\UnrealEngine\Engine\Source\Programs\Windows\BootstrapPackagedGame\Private\BootstrapPackagedGame.cpp:3:
 9>D:\dev\UnrealEngineSource_latest\UnrealEngine\Engine\Source\Programs\Windows\BootstrapPackagedGame\Private/BootstrapPackagedGame.h(5,10): fatal error : 'windows.h' file not found
 9>  #include <windows.h>
 9>           ^~~~~~~~~~~
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Ok, I'v solved this - by accident - I'v done identical setup on the second machine - but that machine had win7pro instead of win10 ... and on that machine everything built just fine !

the commandline to package on windows for linux for me looks like this now:

%ENGINEDIRECTORY%\Build\BatchFiles\runUAT BuildCookRun -project=%UPROJECTNAME% -noP4 -platform=Linux -clientconfig=Shipping -serverconfig=Shipping -cook -build -stage -pak -compressed -archive -archivedirectory=%LINSTAGINGDIR%

more ▼

answered Feb 07 '17 at 08:03 AM

avatar image

Mariusz.Szaflik
31 1 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

me too for tjis problem at least 3 months !

more ▼

answered Feb 06 '17 at 02:39 AM

avatar image

锋之痕
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

C:/ue4-14/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrossCompilerTool/Development/ShaderFormatOpenGL/Module.ShaderFormatOpenGL.cpp.o: In function FOpenGLFrontend::PrecompileShader(FShaderCompilerOutput&, FShaderCompilerInput const&, char const*, GLSLVersion, EHlslShaderFrequency)': 14> C:\ue4-14\UnrealEngine\Engine\Source\Developer\ShaderFormatOpenGL\Private/OpenGLShaderCompiler.cpp:1154: undefined reference to glCreateShader'

14> C:\ue4-14\UnrealEngine\Engine\Source\Developer\ShaderFormatOpenGL\Private/OpenGLShaderCompiler.cpp:1157: undefined reference to glShaderSource' 14> C:\ue4-14\UnrealEngine\Engine\Source\Developer\ShaderFormatOpenGL\Private/OpenGLShaderCompiler.cpp:1161: undefined reference to glCompileShader' 14> C:\ue4-14\UnrealEngine\Engine\Source\Developer\ShaderFormatOpenGL\Private/OpenGLShaderCompiler.cpp:1164: undefined reference to glGetShaderiv' 14> C:\ue4-14\UnrealEngine\Engine\Source\Developer\ShaderFormatOpenGL\Private/OpenGLShaderCompiler.cpp:1179: undefined reference to glGetShaderiv' 14> C:\ue4-14\UnrealEngine\Engine\Source\Developer\ShaderFormatOpenGL\Private/OpenGLShaderCompiler.cpp:1188: undefined reference to glGetShaderInfoLog' 14> C:\ue4-14\UnrealEngine\Engine\Source\Developer\ShaderFormatOpenGL\Private/OpenGLShaderCompiler.cpp:1216: undefined reference to glDeleteShader' 14>clang++.exe : error : linker command failed with exit code 1 (use -v to see invocation)
more ▼

answered Feb 07 '17 at 07:03 AM

avatar image

锋之痕
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question