Closed n-insaidoo closed 1 year ago
I think what would work for me is building SwiftPM from source following the bootstrap script approach
The bootstrap script is designed for building SwiftPM on systems that do not have Xcode or a toolchain installed. It is used on bare systems to bootstrap the Swift toolchain (including SwiftPM), and as such not typically used outside the Swift team.
But it appears I'm missing something as the script exits alerting me that swiftc
is not installed
# ls -l
total 32
drwxr-xr-x 17 root root 4096 Feb 24 18:00 llbuild
drwxr-xr-x 11 root root 4096 Feb 24 17:58 swift-argument-parser
drwxr-xr-x 10 root root 4096 Feb 24 18:02 swift-collections
drwxr-xr-x 8 root root 4096 Feb 24 18:01 swift-driver
drwxr-xr-x 13 root root 4096 Feb 27 07:36 swift-package-manager
drwxr-xr-x 7 root root 4096 Feb 24 18:02 swift-system
drwxr-xr-x 7 root root 4096 Feb 24 18:00 swift-tools-support-core
drwxr-xr-x 8 root root 4096 Feb 24 18:00 yams
# cd swift-package-manager/
# Utilities/bootstrap build
which swiftc
--- bootstrap: error: Command '['which', 'swiftc']' returned non-zero exit status 1.
the slim version does not contain the toolchain, only the swift runtime libraries. it cannot be used to compile code. it is designed for deployment of precompiled versions of swift based applications that dynamically link to the swift runtime
Alright I understand. Thanks for getting back to me.
Hi, based on the slim Dockerfile if one was interested to add just the package module (pm) what should they extract from
swift.tar.gz
? Will it be sufficient to just extract parts of the archive?