Additional Linux Distributions

Fix for binutils on Debian 10

I have been testing a work around for the bug in Debian 10 binutils version. While there is no backport for the Debian 11 version it is possible to install this version on Debian 10 without any issues or conflicts.
This is the method I have been using.

# add the bullseye source to sources list
echo "deb http://deb.debian.org/debian bullseye main" | tee -a /etc/apt/sources.list

# update and install binutils
apt-get update && apt-get --no-install-recommends install -y binutils

# remove bullseye source
sed -i '$ d' /etc/apt/sources.list

Make sure you immediately remove the bullseye source.

I have done several full Swift toolchain builds for 5.4.2-release and main branch developer snapshots without any problems or errors.

Building for Debian 11

Debian 11 doesn't have any of the binutils issues that version 10 had but it does have some python3 issues causing a couple of test failures.
You will need to add the following patches to build 5.4.2 -

The main branch is building without any issues.

Debian 10 and Debian 11 Apt Install Packages

Both Debian 10 and 11 are now available with apt install swiftlang on the new community Swift repository.
More info on the repository here - New Swift Package Repository for Ubuntu/Debian Linux Distributions

6 Likes