-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift 5.9.2 #157113
swift 5.9.2 #157113
Conversation
Will have more time to look into issues here unlike last time now that Ruby 3 is basically done. All the changes in the original Swift 5.9 PR should however apply here (except the CMake patch) |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a |
We'll need to try this again later I guess. The self-hosted runner: 12-arm64-7978145460-2 lost communication with the server. Verify the machine is running and has a healthy network connection. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error. |
I doubt that, since it worked with 5.8, though as you say we cannot account for spuriously installed headers. You can try running the failing SwiftPM command manually with the |
You can reproduce the same issue in the official Docker image. That indicates to me that it's not a Homebrew-specific problem: $ docker run --rm -it swift:5.9.2
# apt update
# apt install g++ make cmake curl
# cd /root
# curl -LO https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz
# tar xf sqlite-autoconf-3450100.tar.gz
# cd sqlite-autoconf-3450100
# ./configure --prefix=/opt/prefix
# make install
# cd ..
# export PKG_CONFIG_PATH=/opt/prefix/lib/pkgconfig
# pkg-config --cflags sqlite3
-I/opt/prefix/include
# git clone https://github.com/apple/swift-package-manager
# cd swift-package-manager
# git checkout swift-5.9.2-RELEASE
# swift build
/root/swift-package-manager/.build/checkouts/swift-llbuild/lib/Core/SQLiteBuildDB.cpp:28:10: fatal error: 'sqlite3.h' file not found
#include <sqlite3.h>
^~~~~~~~~~~
1 error generated.
|
Oh, just thought of it and looked it up, maybe you need to add Homebrew as a linux packager in SwiftPM? |
That's a fair point that Homebrew for Linux should probably be added to that in order to make things work without needing to manually specify Though the result of that is always merged with |
Stick a
Obviously not, as something is going wrong: you'll probably need to step through with a debugger or build a SwiftPM that prints some output to figure this out. |
I see
but that's about it. And just to confirm pkg-config works, I ran: // swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "libTest",
targets: [
.systemLibrary(name: "testsqlite3", pkgConfig: "sqlite3"),
.target(name: "libTest", dependencies: ["testsqlite3"]),
]
) And it works fine (note the debug: pkg-config --variable pc_path pkg-config
Building for debugging...
/usr/bin/clang -target aarch64-unknown-linux-gnu -g -O0 -DSWIFT_PACKAGE=1 -DDEBUG=1 -fblocks -fmodules -fmodule-name=libTest -I /tmp/swifttest/Sources/libTest/include -fmodule-map-file=/tmp/swifttest/Sources/testsqlite3/module.modulemap -I/opt/prefix/include -fmodules-cache-path=/tmp/swifttest/.build/aarch64-unknown-linux-gnu/debug/ModuleCache -fPIC -fno-omit-frame-pointer -MD -MT dependencies -MF /tmp/swifttest/.build/aarch64-unknown-linux-gnu/debug/libTest.build/main.c.d -c /tmp/swifttest/Sources/libTest/main.c -o /tmp/swifttest/.build/aarch64-unknown-linux-gnu/debug/libTest.build/main.c.o It only doesn't work with llbuild's Package.swift, which doesn't use |
OK, so We'll need to dig into that next. |
Something to compare between us would be this verbose output of
Note that it's missing |
I'll schedule a build tomorrow and check. It's possible that since the Termux build also sets |
Alright, ran a verbose build that removed the It appears you are right that llbuild will require making its SQLite dependency explicit, and your previous 5.8 Homebrew build and my Termux builds happened to work for other reasons. |
Thanks for checking that! Indeed, final link seems to work as expected. I think we can consider this being reported as swiftlang/swift-llbuild#901 |
🤖 An automated task has requested bottles to be published to this PR. |
Created by
brew bump
Created with
brew bump-formula-pr
.resource
blocks have been checked for updates.