-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Disable earlyswiftdriver on non-Darwin hosts
#38204
Conversation
|
@swift-ci please test |
|
Build failed |
|
Build failed |
Host toolchains on Linux are not yet capable of building the driver because it depends on the presence of Foundation .cmake files which are not shipped as part of the Linux toolchain.
a71c3b6
to
de8bca6
Compare
|
@swift-ci please test |
|
Are you sure? It builds fine for me on Fedora Core 33 with the native Swift from their package manager. |
Oh interesting! The Swift package there must ship more than we include in Linux toolchains on Swift.org. |
|
@swift-ci please test Windows platform |
I don't think so, I just checked and it doesn't include any CMake files. I will try building it again this evening and report what I find. |
|
I just checked out latest trunk and ran
|
|
On Ubuntu 20.04, using just the latest snapshot toolchain from swift.org (June 12, 2021), I am hitting: I think out of the reasons you listed above the different CMake version seems likely to me. I'll try to see if I can reproduce with a newer CMake. |
|
Yeah, that must be a CMake issue. Since you're building trunk and the system CMake is old, doesn't it build CMake from source? If not, you may need to reorder CMake to build first. |
|
To be clear what I was talking about with reordering the CMake build, It appears that is correctly done before the early swift-driver is built so no reordering is necessary, but either something else is going wrong with getting the right CMake version or it is somehow failing with a recent CMake too for you. Can you check what CMake version is being used when it is failing for you? |
|
Btw, I just tried building the latest July 24 trunk source snapshot on Fedora core 33 with this early swift driver and while it built fine with the system Swift 5.4.1, it would cause problems later when trying to build the trunk stdlib: Disabling with Also, if I build the corelibs after disabling the early swift driver then go back and remove that flag to try using it again, now building it fails because it passes in the newly built trunk Foundation directory and that causes a Swift version mismatch with the system Swift 5.4.1, which is fixed by deleting that newly built Foundation. This is because the early swift driver setup assumes the prebuilt host Swift toolchain is the same version as the toolchain being built from source, which shouldn't need to be the case. None of this is tested by the linux CI as I just checked and it doesn't have a prebuilt host Swift toolchain installed. |
|
Looked into the error pasted above, the problem is that you're symlinking against the early swift-driver binary, rather than copying it over into the Swift compiler build directory. This means This may work fine if the host toolchain used to build the early swift-driver is reasonably similar to the new toolchain being built from source, but it doesn't work when the host toolchain is Fedora's system Swift 5.4.2, which doesn't put You could fix this by copying the early swift-driver binaries over instead, as is done later on in the build with |
Host toolchains on Linux are not yet capable of building the driver because it depends on the presence of Foundation .cmake files which are not shipped as part of the Linux toolchain.