Building swiftpm fail with missing required module 'Foundation'

Hi there, i have been trying to build swift-5.1 on Ubuntu 18.04 using the build-script. And my building command is really simple

/home/ubuntu/swift-5.1/swift/utils/build-script --preset=buildbot_linux install_destdir=/home/ubuntu/swift-5.1/swift-install installable_package=/home/ubuntu/swift-5.1/swift-install/install.tar.gz

But it failed at building swiftpm with following error:

...
Compiling Swift Module 'swift_build' (1 sources)
--- bootstrap: note: building self-hosted 'swift-build': env SWIFT_EXEC=/home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x/s390x-unknown-linux/release/swiftc SWIFTPM_BUILD_DIR=/home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x SWIFTPM_BOOTSTRAP=1 /home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x/s390x-unknown-linux/release/swift-build-stage1 --disable-sandbox -Xlinker -rpath -Xlinker $ORIGIN/../lib/swift/linux -Xswiftc -Xcc -Xswiftc -DSPM_BUILD_IDENT=d20ff72a -Xswiftc -I/home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x/.bootstrap/lib/swift/linux/s390x -Xswiftc -Xcc -Xswiftc -F/home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x/.bootstrap/lib/swift/linux/s390x -Xswiftc -I/home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x/.bootstrap/lib/swift/linux/s390x/dispatch -Xlinker -L/home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x/.bootstrap/lib/swift/linux -Xlinker -rpath -Xlinker /home/ubuntu/swift-5.1/build/buildbot_linux/swiftpm-linux-s390x/.bootstrap/lib/swift/linux -Xswiftc -I/home/ubuntu/swift-5.1/build/buildbot_linux/llbuild-linux-s390x/products/llbuildSwift -Xswiftc -I/home/ubuntu/swift-5.1/llbuild/products/libllbuild/include -Xlinker -rpath -Xlinker $ORIGIN/../lib/swift/pm/llbuild -Xlinker -L/home/ubuntu/swift-5.1/build/buildbot_linux/llbuild-linux-s390x/lib -Xlinker -rpath -Xlinker /home/ubuntu/swift-5.1/build/buildbot_linux/llbuild-linux-s390x/lib -Xswiftc -enable-testing --configuration release --build-tests
/home/ubuntu/swift-5.1/swiftpm: error: manifest parse error(s):
/home/ubuntu/swift-5.1/swiftpm/Package.swift:13:8: error: missing required module 'Foundation'
import PackageDescription
       ^
--- bootstrap: error: build failed with exit status 1
Building the standard library for: swift-stdlib-linux-s390x
Running Swift tests for: check-swift-all-linux-s390x check-swift-all-optimize-linux-s390x
/home/ubuntu/swift-5.1/swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
/home/ubuntu/swift-5.1/swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Am i missing something?

Terms of Service

Privacy Policy

Cookie Policy