Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to newer Linux base container image by default #296

Closed
slonopotamus opened this issue Feb 22, 2023 · 8 comments
Closed

Switch to newer Linux base container image by default #296

slonopotamus opened this issue Feb 22, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@slonopotamus
Copy link
Collaborator

We're currently defaulting to Ubuntu 18.04 whose main support cycle ends in April, 2023.

GitHub Actions, for example, is going to fully drop 18.04 support on 2023-04-01: actions/runner-images#6002

I think we should change default to something newer.

@slonopotamus slonopotamus added the enhancement New feature or request label Feb 22, 2023
@slonopotamus slonopotamus changed the title Switch to newer default Linux base container by default Switch to newer default Linux base container image by default Feb 22, 2023
@TBBle
Copy link
Collaborator

TBBle commented Feb 22, 2023

The main risks that come to mind:

  • UE supported build platforms, particularly for older UE releases that are still supported.
  • Building things against a newer libc that end up unexpectedly not runnable on older-libc releases that are still expected to be supported.

With Ubuntu 18.04 falling out of support, it absolutely makes sense to default to something upstream-supported, so the above should be taken as input on what to move to, not as against the move. I assume nothing will intrinsically block manually using an older Ubuntu release if that is necessary (legacy toolchain, old UE4 release, i386 support, etc.), although of course future evolution might have that effect (and can be addressed then if anyone turns out to care).

@slonopotamus slonopotamus self-assigned this Feb 22, 2023
@slonopotamus slonopotamus changed the title Switch to newer default Linux base container image by default Switch to newer Linux base container image by default Feb 22, 2023
@slonopotamus slonopotamus removed their assignment Feb 22, 2023
@slonopotamus
Copy link
Collaborator Author

I assume nothing will intrinsically block manually using an older Ubuntu release if that is necessary

Sure, I'm only suggesting to change default value. If user wants to do something custom, they are absolutely free to do that.

@adamrehn
Copy link
Owner

adamrehn commented Mar 2, 2023

UE supported build platforms, particularly for older UE releases that are still supported.

There's a good chance that migrating to a newer version of Ubuntu will break Unreal Engine 4.20, which still had version checking logic in Setup.sh to install system packages for Mono. UE 4.21 and newer should theoretically be fine, since they bundle Mono (and later .NET Core), and only ever try to install the build-essential system package, a behaviour that remains unchanged as of the latest 5.1.1 release.

With this in mind, I would recommend that we drop official support for Unreal Engine 4.20 when we bump the default Ubuntu version, and update the README + docs to list 4.21 as the minimum supported version. Users who need to work with UE 4.20 can override the default value, or pin their version of ue4-docker to v0.0.103 to avoid any breaking changes that we may introduce in future releases when we no longer care about maintaining compatibility with 4.20.

Building things against a newer libc that end up unexpectedly not runnable on older-libc releases that are still expected to be supported.

Fortunately, this is a non-issue for the Unreal Engine itself, thanks to the fact that it bundles a CentOS 7 sysroot alongside the clang compiler toolchain and links against the copy of glibc 2.17 from that. The only situation where people could potentially run into issues is if they're linking against system libraries from their projects or engine forks, and inadvertently introduce a transitive dependency on a newer version of glibc as a result. In that scenario, I would argue that the onus is on the user to understand the implications of linking against system libraries, and that they should override the default with an appropriate value when building images to suit their requirements.

@adamrehn
Copy link
Owner

In addition to Ubuntu 18.04 reaching EOL, another reason to update has now presented itself: evidently Unreal Engine 5.2 crashes with Vulkan errors under Ubuntu 18.04, and updating to 20.04 or newer fixes it. This will break scenarios where users run the Editor interactively from a container, whether via bind-mounting the host system's X11 socket or via Editor Pixel Streaming.

As per this discussion in Discord, I'm gonna have a look at updating the default to a newer Ubuntu base image and verifying that it works with Unreal Engine 4.21 and newer. I figure we'll aim for Ubuntu 22.04, since that gives us glibc 2.35 and eliminates the need to apply the DSO sorting patch.

@adamrehn adamrehn self-assigned this Jul 21, 2023
@slonopotamus
Copy link
Collaborator Author

@adamrehn any progress on adding Ubuntu 22.04 support?

@slonopotamus
Copy link
Collaborator Author

https://hub.docker.com/layers/nvidia/opengl/1.0-glvnd-devel-ubuntu22.04/images/sha256-c030a21588ddb89c245c8a2a24d6e68772cfa5939d312bab19f0833b90e9620a?context=explore

Oh. It turns out, Nvidia has published base image for 22.04. And I have evidence that someone already managed to build UE-5.2.0 with -basetag ubuntu22.04.

slonopotamus added a commit to slonopotamus/ue4-docker that referenced this issue Oct 9, 2023
@adamrehn
Copy link
Owner

Belated test results: I ran tests for all supported versions of Unreal Engine (4.21 and newer), and everything seemed to work fine with the exception of Unreal Engine 5.0, which failed with the error No usable version of libssl was found due to its bundled .NET runtime looking for libssl 1.1 when Ubuntu 22.04 only ships with libssl 3.0 by default. This was a known compatibility issue for that release, and the workarounds were awkward at best.

Perhaps we should add something to the documentation warning users that they'll need to specify a different base image if they're building a 5.0.x release? In theory we could detect it and emit an error with a more helpful message, but the only way to reliably do so in the face of custom forks would be to parse Build.version after the engine source has already been cloned, which means it'd be erroring out at basically the exact same point in the build process anyway.

(Side note: the fallout from the changes Epic made to their CDN a while back certainly makes testing older Unreal Engine releases more annoying. I ended up creating branches for each release in a fork, and then committing the updated Commit.gitdeps.xml file for each branch.)

@adamrehn
Copy link
Owner

Added a note to the docs in commit c363409.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants