Skip to content

[Windows] regression: swift --version, swift build does not output anything to console and returns immediately #80356

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

Open
bkhouri opened this issue Mar 27, 2025 · 11 comments · May be fixed by swiftlang/swift-docker#477
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build triage needed This issue needs more specific labels Windows Platform: Windows

Comments

@bkhouri
Copy link
Contributor

bkhouri commented Mar 27, 2025

Description

There appears to have been a regression on the nightly main Windows toolchain sometime between March 10 and March 25, 2025 OSS toolchain, where running swift build in a directory containing a Package.swift outputs nothing to the console and returns immediately.

Reproduction

Expected behavior

A build starts, but nothing happens.

Environment

PS C:\Users\bkhouri\Documents\git\swift-package-manager> swiftc -version
PS C:\Users\bkhouri\Documents\git\swift-package-manager>
PS C:\Users\bkhouri> swift --version
PS C:\Users\bkhouri> swift build --version
PS C:\Users\bkhouri> cd .\Documents\git\swift-package-manager\
PS C:\Users\bkhouri\Documents\git\swift-package-manager> swift build --version
PS C:\Users\bkhouri\Documents\git\swift-package-manager> swift build
PS C:\Users\bkhouri\Documents\git\swift-package-manager> git remote -v
origin  https://github.com/bkhouri/swift-package-manager.git (fetch)
origin  https://github.com/bkhouri/swift-package-manager.git (push)
upstream        https://github.com/swiftlang/swift-package-manager.git (fetch)
upstream        https://github.com/swiftlang/swift-package-manager.git (push)
PS C:\Users\bkhouri\Documents\git\swift-package-manager>

Additional information

@bkhouri bkhouri added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Mar 27, 2025
@bkhouri
Copy link
Contributor Author

bkhouri commented Mar 27, 2025

cc @compnerd

@bkhouri bkhouri changed the title regression: swift --version, swift build does not output anything to console and returns immediately [Windows] regression: swift --version, swift build does not output anything to console and returns immediately Mar 27, 2025
@jakepetroules
Copy link
Contributor

jakepetroules commented Mar 27, 2025

Analyzed the toolchain at https://download.swift.org/development/windows10/swift-DEVELOPMENT-SNAPSHOT-2025-03-25-a/swift-DEVELOPMENT-SNAPSHOT-2025-03-25-a-windows10.exe and confirmed that there are a mix of x86_64 and aarch64 binaries. This is an x86_64 toolchain, yet:

./Runtimes/0.0.0/usr/bin/plutil.exe: PE32+ executable (console) Aarch64, for MS Windows

./Runtimes/0.0.0/usr/bin/BlocksRuntime.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/dispatch.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/Foundation.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/FoundationEssentials.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/FoundationInternationalization.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/FoundationNetworking.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/FoundationXML.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftCore.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftCRT.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftDispatch.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftDistributed.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftObservation.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftRegexBuilder.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftRemoteMirror.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftSwiftOnoneSupport.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftSynchronization.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swiftWinSDK.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swift_Concurrency.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swift_Differentiation.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swift_RegexParser.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/swift_StringProcessing.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
./Runtimes/0.0.0/usr/bin/_FoundationICU.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows

The compiler runtimes appear correct:

./Runtimes/0.0.0/usr/bin/concrt140.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/msvcp140_1.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/msvcp140_2.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/msvcp140_atomic_wait.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/msvcp140_codecvt_ids.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/msvcp140.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/vccorlib140.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/vcruntime140_1.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/vcruntime140_threads.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
./Runtimes/0.0.0/usr/bin/vcruntime140.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows

And the toolchain content is all x86_64. So it seems just the runtime part has the wrong arch.

@jakepetroules
Copy link
Contributor

@compnerd Any idea what might've went wrong here which went in between March 10th and 25th?

@jakepetroules
Copy link
Contributor

Perhaps #80024 could be related?

@compnerd
Copy link
Member

It might be related to that PR - I have a follow up that I am working on right now. This sounds like there is an issue with the DLLs which are being packaged up.

@bkhouri
Copy link
Contributor Author

bkhouri commented Mar 28, 2025

once the issue is fixed, we will need to revert swiftlang/swift-docker#453 to ensure the Windows docker image are no longer pinned to an "older" toolchain version

@compnerd
Copy link
Member

I think that #80157 might fix the issue. Longer term, we need to figure out how to do some smoke testing for Windows with the toolchain itself.

@bkhouri
Copy link
Contributor Author

bkhouri commented Jun 10, 2025

I think that #80157 might fix the issue. Longer term, we need to figure out how to do some smoke testing for Windows with the toolchain itself.

@compnerd : I don't think #80157 fixed the issue. Installing the June 9 main nightly toolchain does not yield any results when running swift --version

@compnerd
Copy link
Member

compnerd commented Jun 10, 2025

@bkhouri that doesn't make sense - I just installed that locally in a Windows Sandbox:

C:\Users\WDAGUtilityAccount>swiftc -v
Swift version 6.2-dev (LLVM 3c4a54b02dd62b7, Swift a40a7be6945a895)
Target: x86_64-unknown-windows-msvc
C:\Users\WDAGUtilityAccount>swift --version
Swift version 6.2-dev (LLVM 3c4a54b02dd62b7, Swift a40a7be6945a895)
Target: x86_64-unknown-windows-msvc
Build config: +assertions

@bkhouri
Copy link
Contributor Author

bkhouri commented Jun 10, 2025

Just tried re-installing and it's working now.

@bkhouri bkhouri closed this as completed Jun 11, 2025
@bkhouri bkhouri reopened this Jun 11, 2025
@bkhouri
Copy link
Contributor Author

bkhouri commented Jun 11, 2025

Re-opening to track merging of swiftlang/swift-docker#477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build triage needed This issue needs more specific labels Windows Platform: Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants