Windows Cross-Compling onto Linux Packaging Error

Unreal Engine Version: 5.3.2
Cesium Version: 2.3.0
Clang: 15.0.1

I am currently trying to compile my project on Windows for Linux and running into some packaging errors. I uninstalled the download from the Epic games marketplace since I read a separate post of how it doesn’t work well with Linux, and installed it from the Cesium github repository directly.

Can I get any insights on what is happening or ways I can fix this?

Sample of Error Messages, all of them are pretty similar:
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_loc) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_abbrev) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_info) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_ranges) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_str) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_gnu_pubnames) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_gnu_pubtypes) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_line) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_loc) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_abbrev) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_info) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_ranges) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_str) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_gnu_pubnames) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_loc) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_abbrev) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_info) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_ranges) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_str) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_gnu_pubnames) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_gnu_pubtypes) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.1.cpp.o:(.debug_line) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_loc) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_abbrev) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_info) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_ranges) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_str) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
PackagingResults: Error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_gnu_pubnames) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_gnu_pubtypes) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.2.cpp.o:(.debug_line) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.3.cpp.o:(.debug_loc) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.3.cpp.o:(.debug_abbrev) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.3.cpp.o:(.debug_info) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: C:/Program Files/Epic Games/UE_5.3/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/Module.CesiumRuntime.3.cpp.o:(.debug_ranges) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support
UATHelper: Packaging (Linux): ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
UATHelper: Packaging (Linux): clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Hi @KevinHNguyen,

Welcome to the community! We just shipped a new release of Cesium for Unreal. Could you try reinstalling the plugin from the v2.4.0 tag and seeing if it compiles?

If you still have issues with the new release, let us know and we’ll try to troubleshoot. Thanks!

I just updated Cesium for Unreal to 2.4.0 directly from the github repository, and I am still getting the same error. Is there anything else I can try?

Your error might be related to this PR

Looks like a similar issue was discovered on the Unreal forum. It’s also occurred in other projects if you just internet search “lld is not built with zlib support”

The cesium for unreal plugin is compressing its debug sections for Linux as of the latest, which is most likely causing these errors.

I’m written an issue in our repo for this…

I also think that right now on the marketplace store is not available the “Linux” folder in Build due this problem of cross-compiling for Zlib compression of the files.

Thank you so much for creating this bug report, i spent a few hours to figure it out it.

So the only way for me to achieve the cross-compiling from Windows to Linux, is to manually compile from source code?

As a workaround, that would be my guess. Compile the plugin yourself (essentially generating your own .o files without debug compression), or find a way to strip the debug symbols out of the shipped .o files (if you don’t need them).

And if you go the direction of cross compiling the plugin for Linux, feel free to use our developer guide as reference.

We have some notes for cross compiling for Android, but none for Linux. If you’re inspired to add some steps here, we’d welcome a PR.