swiftlang / swiftly

A Swift toolchain installer and manager, written in Swift.
https://swiftlang.github.io/swiftly/
Apache License 2.0
490 stars 28 forks source link

Swiftly doesn't reliably install dependencies #144

Closed MahdiBM closed 3 months ago

MahdiBM commented 3 months ago

For the full discussion, see this thread in Swift Open Source Slack.

Apparently Swiftly did not automatically install libcurl4-openssl-dev on my fresh VPS, which caused build failures when using --static-swift-stdlib.

For the sake of search-ability if someone steps into this issue, here's also part of the error pasted here:

error: link command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld.gold: error: cannot find -lcurl
/root/.local/share/swiftly/toolchains/5.10.1/usr/lib/swift_static/linux/libFoundationNetworking.a(CFURLSessionInterface.c.o):CFURLSessionInterface.c:function CFURLSessionEasyCodeDescription: error: undefined reference to 'curl_easy_strerror'

I know the "find what dependencies to install" logic is not bulletproof and reads from the Dockerfiles, and that Swiftly is waiting on official ways to know what dependencies to install.

I did check the Dockerfiles, all seem to include libcurl4-openssl-dev for Ubuntu 22.04.

adam-fowler commented 3 months ago

Hmmm I really can't see how that happens as it installs what's in the Dockerfiles. But yeah we are waiting on a better method to decide on dependencies, so this probably won't get looked into.

MahdiBM commented 3 months ago

I really can't see how that happens

Me too, but it appears to me that it did happen 😅.

MahdiBM commented 3 months ago

Someone else also reported a not-installed dependency in Vapor's Discord server (zlib). Here's the last message of the conversation related to this issue. Just leaving it here as proof.

MahdiBM commented 3 months ago

I see there is a test here as well. Not sure what could be going wrong there (though in my limited bash experience, anything can go wrong at all times).

adam-fowler commented 3 months ago

Given the changes in #127 I don't think this is valid anymore.

MahdiBM commented 3 months ago

Hmmm it still relies on the dockerfiles? Though to be honest I don't think the issue was from parsing dockerfiles or something.

We can close for now.