(swiftenv) can’t install recent toolchains, 'No space left on device'

lately, it’s been getting harder and harder to install the swift toolchain, because it is getting larger than it was in the past, and overwhelming the root partition.

[ec2-user@ip-172-31-83-118 ~]$ swiftenv install https://download.swift.org/development/amazonlinux2/swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a/swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a-amazonlinux2.tar.gz
Downloading https://download.swift.org/development/amazonlinux2/swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a/swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a-amazonlinux2.tar.gz
/tmp/swiftenv-DEVELOPMENT-SNAPSHOT-2022-07-06-a-ec2-user ~
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  589M  100  589M    0     0  42.5M      0  0:00:13  0:00:13 --:--:-- 43.9M
tar: swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a-amazonlinux2/usr/bin/lld: Wrote only 2048 of 10240 bytes
tar: swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a-amazonlinux2/usr/bin/plutil: Cannot open: No space left on device
tar: swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a-amazonlinux2/usr/bin/clangd: Cannot open: No space left on device
tar: swift-DEVELOPMENT-SNAPSHOT-2022-07-06-a-amazonlinux2/usr/bin/sourcekit-lsp: Cannot open: No space left on device

this is happening on both on my laptop, and on the cloud machine too. i’ve run into this problem before, but in the past i was able to fix it by uninstalling all prior toolchains and clearing the temp directory. not anymore though, because the toolchain itself is now too large to fit on the root partition.

anyone else experiencing this, and have a workaround?

https://forums.swift.org/t/toolchain-size-main-stable-20211026-vs-rebranch-stable-20220421 is a relevant thread. I've been seeing consistent increases on Windows over the past ~3 releases. Unfortunately, I have not been able to isolate the size increases. Help to investigate and isolate the incase would be appreciated.

1 Like