Linux Shipping Package Size

Current:

  • WindowsNoEditor (32-bit): 136 MB
  • MacNoEditor (64-bit): 222 MB
  • LinuxNoEditor (64-bit): 605 MB

Expected: Linux should not be 6x the size of Windows build.

Project setup:

  • Source engine build (including some C++ project files)
  • Windows DevelopmentEditor target built on Windows 10 using Visual Studio 2015 Update 3
  • Mac DevelopmentEditor target built on macOS 10.11.6 using XCode 7.3.1
  • Linux Development target built on Windows 10 using CrossToolchain_Linux/v7_clang-3.7.0_ld-2.24_glibc-2.12.2.zip
  • Shipping
  • Full rebuild
  • For distribution
  • Exclude debug files
  • Exclude prerequisites
  • Exclude crash reporter
  • Create compressed cooked packages
  • Build shipping package from editor > file > package project > platform

It is not a critical issue but I feel like something is wrong with at least the default Linux build settings since the file size is way bigger than both Mac and Windows and most of this comes from the executable. This could probably be reproduced with the C++ game templates.

Hey dgrishofer-

When packaging for Windows/Mac were you using a source version of the project or the binary version from the Launcher? This may be one cause for the difference in file size that you’re seeing as building for Linux requires a source build. You will see similar differences when building a binary project vs a source project for the same OS. I have entered a report for this difference that you can follow here: Unreal Engine Issues and Bug Tracker (UE-35067)

Cheers

Hey , thanks for entering the report. I was using the source version for all builds:

Windows DevelopmentEditor target built on Windows 10 using Visual Studio 2015 Update 3

Mac DevelopmentEditor target built on macOS 10.11.6 using XCode 7.3.1

Linux Development target built on Windows 10 using CrossToolchain_Linux/v7_clang-3.7.0_ld-2.24_glibc-2.12.2.zip
Btw why exactly does it differ if you package the same project in shipping mode using different builds of the engine (binary, source)? Shouldn’t they both have the same (or very similar) optimized output?

Linux is built with debug info, so the callstacks in Shipping have filename and line number. This is a default setting because for our own needs that’s crucial, however I understand why you may not need this. Unfortunately as of now there’s no setting that could be flipped, but you can run strip manually (it’s included in the cross-toolchain too).

Thanks! I ran

[ToolchainPath]\bin\x86_64-unknown-linux-gnu-strip.exe -s [BuildPath]\LinuxNoEditor\[ProjectName]\Binaries\Linux\[ProjectName]-Linux-Shipping

which reduces the linux build from 605 MB to 171 MB and resolves the issue for me.

This was of great help to me!
@dgrieshofer Thanks for asking this question (and for sharing the syntax too!). Also thanks to @RCL for the solution and for your work on Unreal Linux :slight_smile: