Swift on Red Hat Enterprise Linux 8

FYI, Swift 5.1 will be available in the EPEL8 repository, so Red Hat Enterprise Linux 8 (and eventually CentOS 8) will also be able to run Swift.

Pull request for LLDB is here.
First successful official 'scratch' build of Swift 5.1-Dev on a RHEL 8 test box is documented here.

Ron

15 Likes

That is amazing to hear! I am wondering what the plan is that RHEL/CentOS/Fedora have around dealing with ABI breakage. I assume that it largely doesn't matter since you do a full system build on each release, but I'm not sure if there are means of installing builds from a previous release or if the upgrade path can preserve packages from the previous release. I would love to hear the approaches taken to mitigate that, if any, as that seems like something which other distributions could learn from.

1 Like

I try to mitigate that on Fedora by having a sub-package called swift-lang-runtime that just includes the necessary files to actually run a swift binary. I've tested including the necessary .so files with the binary and, assuming LD_LIBRARY_PATH is set, it seems to work.

Not a solution per se, but a temporary mitigation. I've actually been looking into how ABI stability might work on Linux as it relates to macOS, but not seriously until 5.1 ships. I noticed that dev versions started including a FrameworkABIBaseline directory, I'm planning on exploring that further.

Just to provide a little background:

One thing to keep in mind is that part of the reason why Swift is not ABI stable on Linux yet is that there is ABI in the runtime needed on macOS that is benign on Linux but not needed and thus should be removed (I think mostly related to objc). Before Linux becomes stabilized, we definitely will want to eliminate that overhead from the ABI.

But I would also like to give a big +1 to your efforts here = ).

Terms of Service

Privacy Policy

Cookie Policy