Unable to compile the "hello world" example. Any advice for Ubuntu 24.04.2 LTS ?
I installed 6.1.2 from swift.org, then followed the "getting started" for a CLI program but it failed with an enormous and cryptic error message about the manifest being invalid which I passed to ChatGPT. That indicated an incompatibility with glibc.
Then I switched to the Docker version and that at least was able to compile and run.
Next I dabbled with remote access to the Docker version (as its on a separate PC) via VS Code, but its not worth the hassle.
So I then I went for the statically linked Linux SDK and its back to complaining about the manifest. Latest output below.
Any advice would be welcome!
john@NUC8i3BEH:~/Projects/Swift/testStatic$ cd /home/john/Projects/Swift
john@NUC8i3BEH:~/Projects/Swift$ cd /home/john/Projects/Swift/test
john@NUC8i3BEH:~/Projects/Swift/test$ swift package init --type executable
Creating executable package: test
Creating Package.swift
Creating .gitignore
Creating Sources/
Creating Sources/main.swift
john@NUC8i3BEH:~/Projects/Swift/test$ swift build --swift-sdk x86_64-swift-linux-musl
error: 'test': Invalid manifest (compiled with: ["/home/john/.local/share/swiftly/toolchains/6.1.2/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.yGoEL5/vfs.yaml", "-L", "/home/john/.local/share/swiftly/toolchains/6.1.2/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/home/john/.local/share/swiftly/toolchains/6.1.2/usr/lib/swift/pm/ManifestAPI", "-swift-version", "6", "-I", "/home/john/.local/share/swiftly/toolchains/6.1.2/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "6.1.0", "/home/john/Projects/Swift/test/Package.swift", "-o", "/tmp/TemporaryDirectory.VtzE4I/test-manifest"])
error: link command failed due to signal 6 (use -v to see invocation)
pure virtual method called
terminate called without an active exception
error: 'test': Invalid manifest (compiled with: ["/home/john/.local/share/swiftly/toolchains/6.1.2/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.b5jgvm/vfs.yaml", "-L", "/home/john/.local/share/swiftly/toolchains/6.1.2/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/home/john/.local/share/swiftly/toolchains/6.1.2/usr/lib/swift/pm/ManifestAPI", "-swift-version", "6", "-I", "/home/john/.local/share/swiftly/toolchains/6.1.2/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "6.1.0", "/home/john/Projects/Swift/test/Package.swift", "-o", "/tmp/TemporaryDirectory.PNmSBb/test-manifest"])
error: link command failed due to signal 6 (use -v to see invocation)
pure virtual method called
terminate called without an active exception
john@NUC8i3BEH:~/Projects/Swift/test$